trophy_api_client 1.2.1 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gemconfig.rb +1 -1
- data/lib/trophy_api_client/leaderboards/types/leaderboards_all_response_item.rb +12 -4
- data/lib/trophy_api_client/types/achievement_response.rb +23 -11
- data/lib/trophy_api_client/types/achievement_response_event_attribute.rb +2 -2
- data/lib/trophy_api_client/types/achievement_response_event_attributes_item.rb +66 -0
- data/lib/trophy_api_client/types/achievement_with_stats_response.rb +23 -11
- data/lib/trophy_api_client/types/leaderboard_response.rb +12 -4
- data/lib/trophy_api_client/types/leaderboard_response_with_rankings.rb +12 -4
- data/lib/trophy_api_client/types/metric_event_leaderboard_response.rb +30 -8
- data/lib/trophy_api_client/types/metric_event_leaderboard_response_breakdown_attribute_values_item.rb +67 -0
- data/lib/trophy_api_client/types/points_system_response.rb +4 -4
- data/lib/trophy_api_client/types/points_trigger.rb +101 -9
- data/lib/trophy_api_client/types/{points_trigger_response_event_attribute.rb → points_trigger_event_attribute.rb} +7 -7
- data/lib/trophy_api_client/types/points_trigger_event_attributes_item.rb +65 -0
- data/lib/trophy_api_client/types/{points_trigger_response_status.rb → points_trigger_status.rb} +2 -1
- data/lib/trophy_api_client/types/{points_trigger_response_user_attributes_item.rb → points_trigger_user_attributes_item.rb} +7 -9
- data/lib/trophy_api_client/types/streak_response.rb +4 -2
- data/lib/trophy_api_client/types/user_achievement_response.rb +23 -11
- data/lib/trophy_api_client/types/user_achievement_with_stats_response.rb +23 -11
- data/lib/trophy_api_client/types/user_leaderboard_response.rb +12 -4
- data/lib/trophy_api_client/types/user_leaderboard_response_with_history.rb +12 -4
- data/lib/trophy_api_client/types/webhook_user_leaderboard_response.rb +11 -3
- data/lib/trophy_api_client/version.rb +1 -1
- data/lib/types_export.rb +6 -6
- metadata +7 -7
- data/lib/trophy_api_client/types/points_trigger_response.rb +0 -211
- data/lib/trophy_api_client/types/points_trigger_response_time_unit.rb +0 -9
- data/lib/trophy_api_client/types/points_trigger_response_type.rb +0 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4cb9d52fcaab5cf68909f48fb282a528d76efa4d788b57fe4ca290590a27126e
|
|
4
|
+
data.tar.gz: 07be917c807d0d55ff077b67e758f1265c5bf2e34e98af77fc7835ef14b525d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d012a7bb3f7adf0a59a1e538a5e5baa3861b6ab771a88d0b54cbc30d837aa5cee38d21df5e8aa3b7dd70bb10b30cd05e1966d9cf90b48faef932ceb5b97ed5fb
|
|
7
|
+
data.tar.gz: a224b34e74c972fddbfad0ba495c1ca61327146d523120203e9c1401da8dc8a096ae4fcb40a21a76a717c0b58e23713a84f9b3f3a7346d1a03b083794c1511f7
|
data/lib/gemconfig.rb
CHANGED
|
@@ -19,8 +19,10 @@ module TrophyApiClient
|
|
|
19
19
|
attr_reader :key
|
|
20
20
|
# @return [TrophyApiClient::LeaderboardResponseRankBy] What the leaderboard ranks by.
|
|
21
21
|
attr_reader :rank_by
|
|
22
|
-
# @return [String] The key of the attribute to break down this leaderboard by.
|
|
22
|
+
# @return [String] Deprecated. The key of the attribute to break down this leaderboard by.
|
|
23
23
|
attr_reader :breakdown_attribute
|
|
24
|
+
# @return [Array<String>] The user attribute keys that this leaderboard is broken down by.
|
|
25
|
+
attr_reader :breakdown_attributes
|
|
24
26
|
# @return [String] The key of the metric to rank by, if rankBy is 'metric'.
|
|
25
27
|
attr_reader :metric_key
|
|
26
28
|
# @return [String] The name of the metric to rank by, if rankBy is 'metric'.
|
|
@@ -57,7 +59,8 @@ module TrophyApiClient
|
|
|
57
59
|
# @param name [String] The user-facing name of the leaderboard.
|
|
58
60
|
# @param key [String] The unique key used to reference the leaderboard in APIs.
|
|
59
61
|
# @param rank_by [TrophyApiClient::LeaderboardResponseRankBy] What the leaderboard ranks by.
|
|
60
|
-
# @param breakdown_attribute [String] The key of the attribute to break down this leaderboard by.
|
|
62
|
+
# @param breakdown_attribute [String] Deprecated. The key of the attribute to break down this leaderboard by.
|
|
63
|
+
# @param breakdown_attributes [Array<String>] The user attribute keys that this leaderboard is broken down by.
|
|
61
64
|
# @param metric_key [String] The key of the metric to rank by, if rankBy is 'metric'.
|
|
62
65
|
# @param metric_name [String] The name of the metric to rank by, if rankBy is 'metric'.
|
|
63
66
|
# @param points_system_key [String] The key of the points system to rank by, if rankBy is 'points'.
|
|
@@ -73,14 +76,15 @@ module TrophyApiClient
|
|
|
73
76
|
# type. Null for one-time leaderboards.
|
|
74
77
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
75
78
|
# @return [TrophyApiClient::Leaderboards::LeaderboardsAllResponseItem]
|
|
76
|
-
def initialize(status:, id:, name:, key:, rank_by:, start:, max_participants:, breakdown_attribute: OMIT,
|
|
77
|
-
metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
|
|
79
|
+
def initialize(status:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, breakdown_attribute: OMIT,
|
|
80
|
+
metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
|
|
78
81
|
@status = status
|
|
79
82
|
@id = id
|
|
80
83
|
@name = name
|
|
81
84
|
@key = key
|
|
82
85
|
@rank_by = rank_by
|
|
83
86
|
@breakdown_attribute = breakdown_attribute if breakdown_attribute != OMIT
|
|
87
|
+
@breakdown_attributes = breakdown_attributes
|
|
84
88
|
@metric_key = metric_key if metric_key != OMIT
|
|
85
89
|
@metric_name = metric_name if metric_name != OMIT
|
|
86
90
|
@points_system_key = points_system_key if points_system_key != OMIT
|
|
@@ -99,6 +103,7 @@ module TrophyApiClient
|
|
|
99
103
|
"key": key,
|
|
100
104
|
"rankBy": rank_by,
|
|
101
105
|
"breakdownAttribute": breakdown_attribute,
|
|
106
|
+
"breakdownAttributes": breakdown_attributes,
|
|
102
107
|
"metricKey": metric_key,
|
|
103
108
|
"metricName": metric_name,
|
|
104
109
|
"pointsSystemKey": points_system_key,
|
|
@@ -127,6 +132,7 @@ module TrophyApiClient
|
|
|
127
132
|
key = parsed_json["key"]
|
|
128
133
|
rank_by = parsed_json["rankBy"]
|
|
129
134
|
breakdown_attribute = parsed_json["breakdownAttribute"]
|
|
135
|
+
breakdown_attributes = parsed_json["breakdownAttributes"]
|
|
130
136
|
metric_key = parsed_json["metricKey"]
|
|
131
137
|
metric_name = parsed_json["metricName"]
|
|
132
138
|
points_system_key = parsed_json["pointsSystemKey"]
|
|
@@ -144,6 +150,7 @@ module TrophyApiClient
|
|
|
144
150
|
key: key,
|
|
145
151
|
rank_by: rank_by,
|
|
146
152
|
breakdown_attribute: breakdown_attribute,
|
|
153
|
+
breakdown_attributes: breakdown_attributes,
|
|
147
154
|
metric_key: metric_key,
|
|
148
155
|
metric_name: metric_name,
|
|
149
156
|
points_system_key: points_system_key,
|
|
@@ -178,6 +185,7 @@ module TrophyApiClient
|
|
|
178
185
|
obj.key.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
|
|
179
186
|
obj.rank_by.is_a?(TrophyApiClient::LeaderboardResponseRankBy) != false || raise("Passed value for field obj.rank_by is not the expected type, validation failed.")
|
|
180
187
|
obj.breakdown_attribute&.is_a?(String) != false || raise("Passed value for field obj.breakdown_attribute is not the expected type, validation failed.")
|
|
188
|
+
obj.breakdown_attributes.is_a?(Array) != false || raise("Passed value for field obj.breakdown_attributes is not the expected type, validation failed.")
|
|
181
189
|
obj.metric_key&.is_a?(String) != false || raise("Passed value for field obj.metric_key is not the expected type, validation failed.")
|
|
182
190
|
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")
|
|
183
191
|
obj.points_system_key&.is_a?(String) != false || raise("Passed value for field obj.points_system_key is not the expected type, validation failed.")
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require_relative "achievement_response_trigger"
|
|
4
4
|
require_relative "achievement_response_user_attributes_item"
|
|
5
5
|
require_relative "achievement_response_event_attribute"
|
|
6
|
+
require_relative "achievement_response_event_attributes_item"
|
|
6
7
|
require "ostruct"
|
|
7
8
|
require "json"
|
|
8
9
|
|
|
@@ -37,11 +38,13 @@ module TrophyApiClient
|
|
|
37
38
|
# trigger = 'metric')
|
|
38
39
|
attr_reader :metric_name
|
|
39
40
|
# @return [Array<TrophyApiClient::AchievementResponseUserAttributesItem>] User attribute filters that must be met for this achievement to be completed.
|
|
40
|
-
# Only present if the achievement has user attribute filters configured.
|
|
41
41
|
attr_reader :user_attributes
|
|
42
|
-
# @return [TrophyApiClient::AchievementResponseEventAttribute] Event attribute filter that must be met for this achievement to be
|
|
43
|
-
# Only present if the achievement has an event filter configured.
|
|
42
|
+
# @return [TrophyApiClient::AchievementResponseEventAttribute] Deprecated. Event attribute filter that must be met for this achievement to be
|
|
43
|
+
# completed. Only present if the achievement has an event filter configured.
|
|
44
44
|
attr_reader :event_attribute
|
|
45
|
+
# @return [Array<TrophyApiClient::AchievementResponseEventAttributesItem>] Event attribute filters that must be met for this achievement to be completed.
|
|
46
|
+
# Omitted for non-metric achievements.
|
|
47
|
+
attr_reader :event_attributes
|
|
45
48
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
46
49
|
attr_reader :additional_properties
|
|
47
50
|
# @return [Object]
|
|
@@ -68,13 +71,14 @@ module TrophyApiClient
|
|
|
68
71
|
# @param metric_name [String] The name of the metric associated with this achievement (only applicable if
|
|
69
72
|
# trigger = 'metric')
|
|
70
73
|
# @param user_attributes [Array<TrophyApiClient::AchievementResponseUserAttributesItem>] User attribute filters that must be met for this achievement to be completed.
|
|
71
|
-
#
|
|
72
|
-
#
|
|
73
|
-
#
|
|
74
|
+
# @param event_attribute [TrophyApiClient::AchievementResponseEventAttribute] Deprecated. Event attribute filter that must be met for this achievement to be
|
|
75
|
+
# completed. Only present if the achievement has an event filter configured.
|
|
76
|
+
# @param event_attributes [Array<TrophyApiClient::AchievementResponseEventAttributesItem>] Event attribute filters that must be met for this achievement to be completed.
|
|
77
|
+
# Omitted for non-metric achievements.
|
|
74
78
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
75
79
|
# @return [TrophyApiClient::AchievementResponse]
|
|
76
|
-
def initialize(id:, name:, trigger:, description: OMIT, badge_url: OMIT, key: OMIT, streak_length: OMIT,
|
|
77
|
-
achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT,
|
|
80
|
+
def initialize(id:, name:, trigger:, user_attributes:, description: OMIT, badge_url: OMIT, key: OMIT, streak_length: OMIT,
|
|
81
|
+
achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, event_attribute: OMIT, event_attributes: OMIT, additional_properties: nil)
|
|
78
82
|
@id = id
|
|
79
83
|
@name = name
|
|
80
84
|
@trigger = trigger
|
|
@@ -86,8 +90,9 @@ module TrophyApiClient
|
|
|
86
90
|
@metric_id = metric_id if metric_id != OMIT
|
|
87
91
|
@metric_value = metric_value if metric_value != OMIT
|
|
88
92
|
@metric_name = metric_name if metric_name != OMIT
|
|
89
|
-
@user_attributes = user_attributes
|
|
93
|
+
@user_attributes = user_attributes
|
|
90
94
|
@event_attribute = event_attribute if event_attribute != OMIT
|
|
95
|
+
@event_attributes = event_attributes if event_attributes != OMIT
|
|
91
96
|
@additional_properties = additional_properties
|
|
92
97
|
@_field_set = {
|
|
93
98
|
"id": id,
|
|
@@ -102,7 +107,8 @@ module TrophyApiClient
|
|
|
102
107
|
"metricValue": metric_value,
|
|
103
108
|
"metricName": metric_name,
|
|
104
109
|
"userAttributes": user_attributes,
|
|
105
|
-
"eventAttribute": event_attribute
|
|
110
|
+
"eventAttribute": event_attribute,
|
|
111
|
+
"eventAttributes": event_attributes
|
|
106
112
|
}.reject do |_k, v|
|
|
107
113
|
v == OMIT
|
|
108
114
|
end
|
|
@@ -136,6 +142,10 @@ module TrophyApiClient
|
|
|
136
142
|
event_attribute = parsed_json["eventAttribute"].to_json
|
|
137
143
|
event_attribute = TrophyApiClient::AchievementResponseEventAttribute.from_json(json_object: event_attribute)
|
|
138
144
|
end
|
|
145
|
+
event_attributes = parsed_json["eventAttributes"]&.map do |item|
|
|
146
|
+
item = item.to_json
|
|
147
|
+
TrophyApiClient::AchievementResponseEventAttributesItem.from_json(json_object: item)
|
|
148
|
+
end
|
|
139
149
|
new(
|
|
140
150
|
id: id,
|
|
141
151
|
name: name,
|
|
@@ -150,6 +160,7 @@ module TrophyApiClient
|
|
|
150
160
|
metric_name: metric_name,
|
|
151
161
|
user_attributes: user_attributes,
|
|
152
162
|
event_attribute: event_attribute,
|
|
163
|
+
event_attributes: event_attributes,
|
|
153
164
|
additional_properties: struct
|
|
154
165
|
)
|
|
155
166
|
end
|
|
@@ -179,8 +190,9 @@ module TrophyApiClient
|
|
|
179
190
|
obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
|
|
180
191
|
obj.metric_value&.is_a?(Float) != false || raise("Passed value for field obj.metric_value is not the expected type, validation failed.")
|
|
181
192
|
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")
|
|
182
|
-
obj.user_attributes
|
|
193
|
+
obj.user_attributes.is_a?(Array) != false || raise("Passed value for field obj.user_attributes is not the expected type, validation failed.")
|
|
183
194
|
obj.event_attribute.nil? || TrophyApiClient::AchievementResponseEventAttribute.validate_raw(obj: obj.event_attribute)
|
|
195
|
+
obj.event_attributes&.is_a?(Array) != false || raise("Passed value for field obj.event_attributes is not the expected type, validation failed.")
|
|
184
196
|
end
|
|
185
197
|
end
|
|
186
198
|
end
|
|
@@ -4,8 +4,8 @@ require "ostruct"
|
|
|
4
4
|
require "json"
|
|
5
5
|
|
|
6
6
|
module TrophyApiClient
|
|
7
|
-
# Event attribute filter that must be met for this achievement to be
|
|
8
|
-
# Only present if the achievement has an event filter configured.
|
|
7
|
+
# Deprecated. Event attribute filter that must be met for this achievement to be
|
|
8
|
+
# completed. Only present if the achievement has an event filter configured.
|
|
9
9
|
class AchievementResponseEventAttribute
|
|
10
10
|
# @return [String] The key of the event attribute.
|
|
11
11
|
attr_reader :key
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module TrophyApiClient
|
|
7
|
+
class AchievementResponseEventAttributesItem
|
|
8
|
+
# @return [String] The key of the event attribute.
|
|
9
|
+
attr_reader :key
|
|
10
|
+
# @return [String] The value of the event attribute.
|
|
11
|
+
attr_reader :value
|
|
12
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
13
|
+
attr_reader :additional_properties
|
|
14
|
+
# @return [Object]
|
|
15
|
+
attr_reader :_field_set
|
|
16
|
+
protected :_field_set
|
|
17
|
+
|
|
18
|
+
OMIT = Object.new
|
|
19
|
+
|
|
20
|
+
# @param key [String] The key of the event attribute.
|
|
21
|
+
# @param value [String] The value of the event attribute.
|
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
23
|
+
# @return [TrophyApiClient::AchievementResponseEventAttributesItem]
|
|
24
|
+
def initialize(key:, value:, additional_properties: nil)
|
|
25
|
+
@key = key
|
|
26
|
+
@value = value
|
|
27
|
+
@additional_properties = additional_properties
|
|
28
|
+
@_field_set = { "key": key, "value": value }
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Deserialize a JSON object to an instance of
|
|
32
|
+
# AchievementResponseEventAttributesItem
|
|
33
|
+
#
|
|
34
|
+
# @param json_object [String]
|
|
35
|
+
# @return [TrophyApiClient::AchievementResponseEventAttributesItem]
|
|
36
|
+
def self.from_json(json_object:)
|
|
37
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
38
|
+
parsed_json = JSON.parse(json_object)
|
|
39
|
+
key = parsed_json["key"]
|
|
40
|
+
value = parsed_json["value"]
|
|
41
|
+
new(
|
|
42
|
+
key: key,
|
|
43
|
+
value: value,
|
|
44
|
+
additional_properties: struct
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Serialize an instance of AchievementResponseEventAttributesItem to a JSON object
|
|
49
|
+
#
|
|
50
|
+
# @return [String]
|
|
51
|
+
def to_json(*_args)
|
|
52
|
+
@_field_set&.to_json
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
56
|
+
# hash and check each fields type against the current object's property
|
|
57
|
+
# definitions.
|
|
58
|
+
#
|
|
59
|
+
# @param obj [Object]
|
|
60
|
+
# @return [Void]
|
|
61
|
+
def self.validate_raw(obj:)
|
|
62
|
+
obj.key.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
|
|
63
|
+
obj.value.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require_relative "achievement_response_trigger"
|
|
4
4
|
require_relative "achievement_response_user_attributes_item"
|
|
5
5
|
require_relative "achievement_response_event_attribute"
|
|
6
|
+
require_relative "achievement_response_event_attributes_item"
|
|
6
7
|
require "ostruct"
|
|
7
8
|
require "json"
|
|
8
9
|
|
|
@@ -41,11 +42,13 @@ module TrophyApiClient
|
|
|
41
42
|
# trigger = 'metric')
|
|
42
43
|
attr_reader :metric_name
|
|
43
44
|
# @return [Array<TrophyApiClient::AchievementResponseUserAttributesItem>] User attribute filters that must be met for this achievement to be completed.
|
|
44
|
-
# Only present if the achievement has user attribute filters configured.
|
|
45
45
|
attr_reader :user_attributes
|
|
46
|
-
# @return [TrophyApiClient::AchievementResponseEventAttribute] Event attribute filter that must be met for this achievement to be
|
|
47
|
-
# Only present if the achievement has an event filter configured.
|
|
46
|
+
# @return [TrophyApiClient::AchievementResponseEventAttribute] Deprecated. Event attribute filter that must be met for this achievement to be
|
|
47
|
+
# completed. Only present if the achievement has an event filter configured.
|
|
48
48
|
attr_reader :event_attribute
|
|
49
|
+
# @return [Array<TrophyApiClient::AchievementResponseEventAttributesItem>] Event attribute filters that must be met for this achievement to be completed.
|
|
50
|
+
# Omitted for non-metric achievements.
|
|
51
|
+
attr_reader :event_attributes
|
|
49
52
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
50
53
|
attr_reader :additional_properties
|
|
51
54
|
# @return [Object]
|
|
@@ -74,13 +77,14 @@ module TrophyApiClient
|
|
|
74
77
|
# @param metric_name [String] The name of the metric associated with this achievement (only applicable if
|
|
75
78
|
# trigger = 'metric')
|
|
76
79
|
# @param user_attributes [Array<TrophyApiClient::AchievementResponseUserAttributesItem>] User attribute filters that must be met for this achievement to be completed.
|
|
77
|
-
#
|
|
78
|
-
#
|
|
79
|
-
#
|
|
80
|
+
# @param event_attribute [TrophyApiClient::AchievementResponseEventAttribute] Deprecated. Event attribute filter that must be met for this achievement to be
|
|
81
|
+
# completed. Only present if the achievement has an event filter configured.
|
|
82
|
+
# @param event_attributes [Array<TrophyApiClient::AchievementResponseEventAttributesItem>] Event attribute filters that must be met for this achievement to be completed.
|
|
83
|
+
# Omitted for non-metric achievements.
|
|
80
84
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
81
85
|
# @return [TrophyApiClient::AchievementWithStatsResponse]
|
|
82
|
-
def initialize(completions:, rarity:, id:, name:, trigger:, description: OMIT, badge_url: OMIT, key: OMIT,
|
|
83
|
-
streak_length: OMIT, achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT,
|
|
86
|
+
def initialize(completions:, rarity:, id:, name:, trigger:, user_attributes:, description: OMIT, badge_url: OMIT, key: OMIT,
|
|
87
|
+
streak_length: OMIT, achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, event_attribute: OMIT, event_attributes: OMIT, additional_properties: nil)
|
|
84
88
|
@completions = completions
|
|
85
89
|
@rarity = rarity
|
|
86
90
|
@id = id
|
|
@@ -94,8 +98,9 @@ module TrophyApiClient
|
|
|
94
98
|
@metric_id = metric_id if metric_id != OMIT
|
|
95
99
|
@metric_value = metric_value if metric_value != OMIT
|
|
96
100
|
@metric_name = metric_name if metric_name != OMIT
|
|
97
|
-
@user_attributes = user_attributes
|
|
101
|
+
@user_attributes = user_attributes
|
|
98
102
|
@event_attribute = event_attribute if event_attribute != OMIT
|
|
103
|
+
@event_attributes = event_attributes if event_attributes != OMIT
|
|
99
104
|
@additional_properties = additional_properties
|
|
100
105
|
@_field_set = {
|
|
101
106
|
"completions": completions,
|
|
@@ -112,7 +117,8 @@ module TrophyApiClient
|
|
|
112
117
|
"metricValue": metric_value,
|
|
113
118
|
"metricName": metric_name,
|
|
114
119
|
"userAttributes": user_attributes,
|
|
115
|
-
"eventAttribute": event_attribute
|
|
120
|
+
"eventAttribute": event_attribute,
|
|
121
|
+
"eventAttributes": event_attributes
|
|
116
122
|
}.reject do |_k, v|
|
|
117
123
|
v == OMIT
|
|
118
124
|
end
|
|
@@ -148,6 +154,10 @@ module TrophyApiClient
|
|
|
148
154
|
event_attribute = parsed_json["eventAttribute"].to_json
|
|
149
155
|
event_attribute = TrophyApiClient::AchievementResponseEventAttribute.from_json(json_object: event_attribute)
|
|
150
156
|
end
|
|
157
|
+
event_attributes = parsed_json["eventAttributes"]&.map do |item|
|
|
158
|
+
item = item.to_json
|
|
159
|
+
TrophyApiClient::AchievementResponseEventAttributesItem.from_json(json_object: item)
|
|
160
|
+
end
|
|
151
161
|
new(
|
|
152
162
|
completions: completions,
|
|
153
163
|
rarity: rarity,
|
|
@@ -164,6 +174,7 @@ module TrophyApiClient
|
|
|
164
174
|
metric_name: metric_name,
|
|
165
175
|
user_attributes: user_attributes,
|
|
166
176
|
event_attribute: event_attribute,
|
|
177
|
+
event_attributes: event_attributes,
|
|
167
178
|
additional_properties: struct
|
|
168
179
|
)
|
|
169
180
|
end
|
|
@@ -195,8 +206,9 @@ module TrophyApiClient
|
|
|
195
206
|
obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
|
|
196
207
|
obj.metric_value&.is_a?(Float) != false || raise("Passed value for field obj.metric_value is not the expected type, validation failed.")
|
|
197
208
|
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")
|
|
198
|
-
obj.user_attributes
|
|
209
|
+
obj.user_attributes.is_a?(Array) != false || raise("Passed value for field obj.user_attributes is not the expected type, validation failed.")
|
|
199
210
|
obj.event_attribute.nil? || TrophyApiClient::AchievementResponseEventAttribute.validate_raw(obj: obj.event_attribute)
|
|
211
|
+
obj.event_attributes&.is_a?(Array) != false || raise("Passed value for field obj.event_attributes is not the expected type, validation failed.")
|
|
200
212
|
end
|
|
201
213
|
end
|
|
202
214
|
end
|
|
@@ -16,8 +16,10 @@ module TrophyApiClient
|
|
|
16
16
|
attr_reader :key
|
|
17
17
|
# @return [TrophyApiClient::LeaderboardResponseRankBy] What the leaderboard ranks by.
|
|
18
18
|
attr_reader :rank_by
|
|
19
|
-
# @return [String] The key of the attribute to break down this leaderboard by.
|
|
19
|
+
# @return [String] Deprecated. The key of the attribute to break down this leaderboard by.
|
|
20
20
|
attr_reader :breakdown_attribute
|
|
21
|
+
# @return [Array<String>] The user attribute keys that this leaderboard is broken down by.
|
|
22
|
+
attr_reader :breakdown_attributes
|
|
21
23
|
# @return [String] The key of the metric to rank by, if rankBy is 'metric'.
|
|
22
24
|
attr_reader :metric_key
|
|
23
25
|
# @return [String] The name of the metric to rank by, if rankBy is 'metric'.
|
|
@@ -53,7 +55,8 @@ module TrophyApiClient
|
|
|
53
55
|
# @param name [String] The user-facing name of the leaderboard.
|
|
54
56
|
# @param key [String] The unique key used to reference the leaderboard in APIs.
|
|
55
57
|
# @param rank_by [TrophyApiClient::LeaderboardResponseRankBy] What the leaderboard ranks by.
|
|
56
|
-
# @param breakdown_attribute [String] The key of the attribute to break down this leaderboard by.
|
|
58
|
+
# @param breakdown_attribute [String] Deprecated. The key of the attribute to break down this leaderboard by.
|
|
59
|
+
# @param breakdown_attributes [Array<String>] The user attribute keys that this leaderboard is broken down by.
|
|
57
60
|
# @param metric_key [String] The key of the metric to rank by, if rankBy is 'metric'.
|
|
58
61
|
# @param metric_name [String] The name of the metric to rank by, if rankBy is 'metric'.
|
|
59
62
|
# @param points_system_key [String] The key of the points system to rank by, if rankBy is 'points'.
|
|
@@ -69,13 +72,14 @@ module TrophyApiClient
|
|
|
69
72
|
# type. Null for one-time leaderboards.
|
|
70
73
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
71
74
|
# @return [TrophyApiClient::LeaderboardResponse]
|
|
72
|
-
def initialize(id:, name:, key:, rank_by:, start:, max_participants:, breakdown_attribute: OMIT, metric_key: OMIT,
|
|
73
|
-
points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
|
|
75
|
+
def initialize(id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, breakdown_attribute: OMIT, metric_key: OMIT,
|
|
76
|
+
metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
|
|
74
77
|
@id = id
|
|
75
78
|
@name = name
|
|
76
79
|
@key = key
|
|
77
80
|
@rank_by = rank_by
|
|
78
81
|
@breakdown_attribute = breakdown_attribute if breakdown_attribute != OMIT
|
|
82
|
+
@breakdown_attributes = breakdown_attributes
|
|
79
83
|
@metric_key = metric_key if metric_key != OMIT
|
|
80
84
|
@metric_name = metric_name if metric_name != OMIT
|
|
81
85
|
@points_system_key = points_system_key if points_system_key != OMIT
|
|
@@ -93,6 +97,7 @@ module TrophyApiClient
|
|
|
93
97
|
"key": key,
|
|
94
98
|
"rankBy": rank_by,
|
|
95
99
|
"breakdownAttribute": breakdown_attribute,
|
|
100
|
+
"breakdownAttributes": breakdown_attributes,
|
|
96
101
|
"metricKey": metric_key,
|
|
97
102
|
"metricName": metric_name,
|
|
98
103
|
"pointsSystemKey": points_system_key,
|
|
@@ -120,6 +125,7 @@ module TrophyApiClient
|
|
|
120
125
|
key = parsed_json["key"]
|
|
121
126
|
rank_by = parsed_json["rankBy"]
|
|
122
127
|
breakdown_attribute = parsed_json["breakdownAttribute"]
|
|
128
|
+
breakdown_attributes = parsed_json["breakdownAttributes"]
|
|
123
129
|
metric_key = parsed_json["metricKey"]
|
|
124
130
|
metric_name = parsed_json["metricName"]
|
|
125
131
|
points_system_key = parsed_json["pointsSystemKey"]
|
|
@@ -136,6 +142,7 @@ module TrophyApiClient
|
|
|
136
142
|
key: key,
|
|
137
143
|
rank_by: rank_by,
|
|
138
144
|
breakdown_attribute: breakdown_attribute,
|
|
145
|
+
breakdown_attributes: breakdown_attributes,
|
|
139
146
|
metric_key: metric_key,
|
|
140
147
|
metric_name: metric_name,
|
|
141
148
|
points_system_key: points_system_key,
|
|
@@ -169,6 +176,7 @@ module TrophyApiClient
|
|
|
169
176
|
obj.key.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
|
|
170
177
|
obj.rank_by.is_a?(TrophyApiClient::LeaderboardResponseRankBy) != false || raise("Passed value for field obj.rank_by is not the expected type, validation failed.")
|
|
171
178
|
obj.breakdown_attribute&.is_a?(String) != false || raise("Passed value for field obj.breakdown_attribute is not the expected type, validation failed.")
|
|
179
|
+
obj.breakdown_attributes.is_a?(Array) != false || raise("Passed value for field obj.breakdown_attributes is not the expected type, validation failed.")
|
|
172
180
|
obj.metric_key&.is_a?(String) != false || raise("Passed value for field obj.metric_key is not the expected type, validation failed.")
|
|
173
181
|
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")
|
|
174
182
|
obj.points_system_key&.is_a?(String) != false || raise("Passed value for field obj.points_system_key is not the expected type, validation failed.")
|
|
@@ -21,8 +21,10 @@ module TrophyApiClient
|
|
|
21
21
|
attr_reader :key
|
|
22
22
|
# @return [TrophyApiClient::LeaderboardResponseRankBy] What the leaderboard ranks by.
|
|
23
23
|
attr_reader :rank_by
|
|
24
|
-
# @return [String] The key of the attribute to break down this leaderboard by.
|
|
24
|
+
# @return [String] Deprecated. The key of the attribute to break down this leaderboard by.
|
|
25
25
|
attr_reader :breakdown_attribute
|
|
26
|
+
# @return [Array<String>] The user attribute keys that this leaderboard is broken down by.
|
|
27
|
+
attr_reader :breakdown_attributes
|
|
26
28
|
# @return [String] The key of the metric to rank by, if rankBy is 'metric'.
|
|
27
29
|
attr_reader :metric_key
|
|
28
30
|
# @return [String] The name of the metric to rank by, if rankBy is 'metric'.
|
|
@@ -60,7 +62,8 @@ module TrophyApiClient
|
|
|
60
62
|
# @param name [String] The user-facing name of the leaderboard.
|
|
61
63
|
# @param key [String] The unique key used to reference the leaderboard in APIs.
|
|
62
64
|
# @param rank_by [TrophyApiClient::LeaderboardResponseRankBy] What the leaderboard ranks by.
|
|
63
|
-
# @param breakdown_attribute [String] The key of the attribute to break down this leaderboard by.
|
|
65
|
+
# @param breakdown_attribute [String] Deprecated. The key of the attribute to break down this leaderboard by.
|
|
66
|
+
# @param breakdown_attributes [Array<String>] The user attribute keys that this leaderboard is broken down by.
|
|
64
67
|
# @param metric_key [String] The key of the metric to rank by, if rankBy is 'metric'.
|
|
65
68
|
# @param metric_name [String] The name of the metric to rank by, if rankBy is 'metric'.
|
|
66
69
|
# @param points_system_key [String] The key of the points system to rank by, if rankBy is 'points'.
|
|
@@ -76,8 +79,8 @@ module TrophyApiClient
|
|
|
76
79
|
# type. Null for one-time leaderboards.
|
|
77
80
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
78
81
|
# @return [TrophyApiClient::LeaderboardResponseWithRankings]
|
|
79
|
-
def initialize(status:, rankings:, id:, name:, key:, rank_by:, start:, max_participants:, breakdown_attribute: OMIT,
|
|
80
|
-
metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
|
|
82
|
+
def initialize(status:, rankings:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, breakdown_attribute: OMIT,
|
|
83
|
+
metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
|
|
81
84
|
@status = status
|
|
82
85
|
@rankings = rankings
|
|
83
86
|
@id = id
|
|
@@ -85,6 +88,7 @@ module TrophyApiClient
|
|
|
85
88
|
@key = key
|
|
86
89
|
@rank_by = rank_by
|
|
87
90
|
@breakdown_attribute = breakdown_attribute if breakdown_attribute != OMIT
|
|
91
|
+
@breakdown_attributes = breakdown_attributes
|
|
88
92
|
@metric_key = metric_key if metric_key != OMIT
|
|
89
93
|
@metric_name = metric_name if metric_name != OMIT
|
|
90
94
|
@points_system_key = points_system_key if points_system_key != OMIT
|
|
@@ -104,6 +108,7 @@ module TrophyApiClient
|
|
|
104
108
|
"key": key,
|
|
105
109
|
"rankBy": rank_by,
|
|
106
110
|
"breakdownAttribute": breakdown_attribute,
|
|
111
|
+
"breakdownAttributes": breakdown_attributes,
|
|
107
112
|
"metricKey": metric_key,
|
|
108
113
|
"metricName": metric_name,
|
|
109
114
|
"pointsSystemKey": points_system_key,
|
|
@@ -136,6 +141,7 @@ module TrophyApiClient
|
|
|
136
141
|
key = parsed_json["key"]
|
|
137
142
|
rank_by = parsed_json["rankBy"]
|
|
138
143
|
breakdown_attribute = parsed_json["breakdownAttribute"]
|
|
144
|
+
breakdown_attributes = parsed_json["breakdownAttributes"]
|
|
139
145
|
metric_key = parsed_json["metricKey"]
|
|
140
146
|
metric_name = parsed_json["metricName"]
|
|
141
147
|
points_system_key = parsed_json["pointsSystemKey"]
|
|
@@ -154,6 +160,7 @@ module TrophyApiClient
|
|
|
154
160
|
key: key,
|
|
155
161
|
rank_by: rank_by,
|
|
156
162
|
breakdown_attribute: breakdown_attribute,
|
|
163
|
+
breakdown_attributes: breakdown_attributes,
|
|
157
164
|
metric_key: metric_key,
|
|
158
165
|
metric_name: metric_name,
|
|
159
166
|
points_system_key: points_system_key,
|
|
@@ -189,6 +196,7 @@ module TrophyApiClient
|
|
|
189
196
|
obj.key.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
|
|
190
197
|
obj.rank_by.is_a?(TrophyApiClient::LeaderboardResponseRankBy) != false || raise("Passed value for field obj.rank_by is not the expected type, validation failed.")
|
|
191
198
|
obj.breakdown_attribute&.is_a?(String) != false || raise("Passed value for field obj.breakdown_attribute is not the expected type, validation failed.")
|
|
199
|
+
obj.breakdown_attributes.is_a?(Array) != false || raise("Passed value for field obj.breakdown_attributes is not the expected type, validation failed.")
|
|
192
200
|
obj.metric_key&.is_a?(String) != false || raise("Passed value for field obj.metric_key is not the expected type, validation failed.")
|
|
193
201
|
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")
|
|
194
202
|
obj.points_system_key&.is_a?(String) != false || raise("Passed value for field obj.points_system_key is not the expected type, validation failed.")
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative "metric_event_leaderboard_response_breakdown_attribute_values_item"
|
|
3
4
|
require_relative "leaderboard_response_rank_by"
|
|
4
5
|
require_relative "leaderboard_response_run_unit"
|
|
5
6
|
require "ostruct"
|
|
@@ -19,9 +20,12 @@ module TrophyApiClient
|
|
|
19
20
|
# @return [Integer] The minimum value required to enter the leaderboard according to its current
|
|
20
21
|
# rankings.
|
|
21
22
|
attr_reader :threshold
|
|
22
|
-
# @return [String] For leaderboards with a breakdown attribute, the value of
|
|
23
|
-
# user.
|
|
23
|
+
# @return [String] Deprecated. For leaderboards with a single breakdown attribute, the value of
|
|
24
|
+
# that attribute for the user.
|
|
24
25
|
attr_reader :breakdown_attribute_value
|
|
26
|
+
# @return [Array<TrophyApiClient::MetricEventLeaderboardResponseBreakdownAttributeValuesItem>] For leaderboards with breakdown attributes, the user's values for each breakdown
|
|
27
|
+
# attribute.
|
|
28
|
+
attr_reader :breakdown_attribute_values
|
|
25
29
|
# @return [String] The unique ID of the leaderboard.
|
|
26
30
|
attr_reader :id
|
|
27
31
|
# @return [String] The user-facing name of the leaderboard.
|
|
@@ -30,8 +34,10 @@ module TrophyApiClient
|
|
|
30
34
|
attr_reader :key
|
|
31
35
|
# @return [TrophyApiClient::LeaderboardResponseRankBy] What the leaderboard ranks by.
|
|
32
36
|
attr_reader :rank_by
|
|
33
|
-
# @return [String] The key of the attribute to break down this leaderboard by.
|
|
37
|
+
# @return [String] Deprecated. The key of the attribute to break down this leaderboard by.
|
|
34
38
|
attr_reader :breakdown_attribute
|
|
39
|
+
# @return [Array<String>] The user attribute keys that this leaderboard is broken down by.
|
|
40
|
+
attr_reader :breakdown_attributes
|
|
35
41
|
# @return [String] The key of the metric to rank by, if rankBy is 'metric'.
|
|
36
42
|
attr_reader :metric_key
|
|
37
43
|
# @return [String] The name of the metric to rank by, if rankBy is 'metric'.
|
|
@@ -68,13 +74,16 @@ module TrophyApiClient
|
|
|
68
74
|
# on the leaderboard before the event.
|
|
69
75
|
# @param threshold [Integer] The minimum value required to enter the leaderboard according to its current
|
|
70
76
|
# rankings.
|
|
71
|
-
# @param breakdown_attribute_value [String] For leaderboards with a breakdown attribute, the value of
|
|
72
|
-
# user.
|
|
77
|
+
# @param breakdown_attribute_value [String] Deprecated. For leaderboards with a single breakdown attribute, the value of
|
|
78
|
+
# that attribute for the user.
|
|
79
|
+
# @param breakdown_attribute_values [Array<TrophyApiClient::MetricEventLeaderboardResponseBreakdownAttributeValuesItem>] For leaderboards with breakdown attributes, the user's values for each breakdown
|
|
80
|
+
# attribute.
|
|
73
81
|
# @param id [String] The unique ID of the leaderboard.
|
|
74
82
|
# @param name [String] The user-facing name of the leaderboard.
|
|
75
83
|
# @param key [String] The unique key used to reference the leaderboard in APIs.
|
|
76
84
|
# @param rank_by [TrophyApiClient::LeaderboardResponseRankBy] What the leaderboard ranks by.
|
|
77
|
-
# @param breakdown_attribute [String] The key of the attribute to break down this leaderboard by.
|
|
85
|
+
# @param breakdown_attribute [String] Deprecated. The key of the attribute to break down this leaderboard by.
|
|
86
|
+
# @param breakdown_attributes [Array<String>] The user attribute keys that this leaderboard is broken down by.
|
|
78
87
|
# @param metric_key [String] The key of the metric to rank by, if rankBy is 'metric'.
|
|
79
88
|
# @param metric_name [String] The name of the metric to rank by, if rankBy is 'metric'.
|
|
80
89
|
# @param points_system_key [String] The key of the points system to rank by, if rankBy is 'points'.
|
|
@@ -88,18 +97,20 @@ module TrophyApiClient
|
|
|
88
97
|
# type. Null for one-time leaderboards.
|
|
89
98
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
90
99
|
# @return [TrophyApiClient::MetricEventLeaderboardResponse]
|
|
91
|
-
def initialize(threshold:, id:, name:, key:, rank_by:, start:, max_participants:, end_: OMIT, rank: OMIT,
|
|
92
|
-
|
|
100
|
+
def initialize(threshold:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, end_: OMIT, rank: OMIT, previous_rank: OMIT, breakdown_attribute_value: OMIT,
|
|
101
|
+
breakdown_attribute_values: OMIT, breakdown_attribute: OMIT, metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
|
|
93
102
|
@end_ = end_ if end_ != OMIT
|
|
94
103
|
@rank = rank if rank != OMIT
|
|
95
104
|
@previous_rank = previous_rank if previous_rank != OMIT
|
|
96
105
|
@threshold = threshold
|
|
97
106
|
@breakdown_attribute_value = breakdown_attribute_value if breakdown_attribute_value != OMIT
|
|
107
|
+
@breakdown_attribute_values = breakdown_attribute_values if breakdown_attribute_values != OMIT
|
|
98
108
|
@id = id
|
|
99
109
|
@name = name
|
|
100
110
|
@key = key
|
|
101
111
|
@rank_by = rank_by
|
|
102
112
|
@breakdown_attribute = breakdown_attribute if breakdown_attribute != OMIT
|
|
113
|
+
@breakdown_attributes = breakdown_attributes
|
|
103
114
|
@metric_key = metric_key if metric_key != OMIT
|
|
104
115
|
@metric_name = metric_name if metric_name != OMIT
|
|
105
116
|
@points_system_key = points_system_key if points_system_key != OMIT
|
|
@@ -116,11 +127,13 @@ module TrophyApiClient
|
|
|
116
127
|
"previousRank": previous_rank,
|
|
117
128
|
"threshold": threshold,
|
|
118
129
|
"breakdownAttributeValue": breakdown_attribute_value,
|
|
130
|
+
"breakdownAttributeValues": breakdown_attribute_values,
|
|
119
131
|
"id": id,
|
|
120
132
|
"name": name,
|
|
121
133
|
"key": key,
|
|
122
134
|
"rankBy": rank_by,
|
|
123
135
|
"breakdownAttribute": breakdown_attribute,
|
|
136
|
+
"breakdownAttributes": breakdown_attributes,
|
|
124
137
|
"metricKey": metric_key,
|
|
125
138
|
"metricName": metric_name,
|
|
126
139
|
"pointsSystemKey": points_system_key,
|
|
@@ -147,11 +160,16 @@ module TrophyApiClient
|
|
|
147
160
|
previous_rank = parsed_json["previousRank"]
|
|
148
161
|
threshold = parsed_json["threshold"]
|
|
149
162
|
breakdown_attribute_value = parsed_json["breakdownAttributeValue"]
|
|
163
|
+
breakdown_attribute_values = parsed_json["breakdownAttributeValues"]&.map do |item|
|
|
164
|
+
item = item.to_json
|
|
165
|
+
TrophyApiClient::MetricEventLeaderboardResponseBreakdownAttributeValuesItem.from_json(json_object: item)
|
|
166
|
+
end
|
|
150
167
|
id = parsed_json["id"]
|
|
151
168
|
name = parsed_json["name"]
|
|
152
169
|
key = parsed_json["key"]
|
|
153
170
|
rank_by = parsed_json["rankBy"]
|
|
154
171
|
breakdown_attribute = parsed_json["breakdownAttribute"]
|
|
172
|
+
breakdown_attributes = parsed_json["breakdownAttributes"]
|
|
155
173
|
metric_key = parsed_json["metricKey"]
|
|
156
174
|
metric_name = parsed_json["metricName"]
|
|
157
175
|
points_system_key = parsed_json["pointsSystemKey"]
|
|
@@ -167,11 +185,13 @@ module TrophyApiClient
|
|
|
167
185
|
previous_rank: previous_rank,
|
|
168
186
|
threshold: threshold,
|
|
169
187
|
breakdown_attribute_value: breakdown_attribute_value,
|
|
188
|
+
breakdown_attribute_values: breakdown_attribute_values,
|
|
170
189
|
id: id,
|
|
171
190
|
name: name,
|
|
172
191
|
key: key,
|
|
173
192
|
rank_by: rank_by,
|
|
174
193
|
breakdown_attribute: breakdown_attribute,
|
|
194
|
+
breakdown_attributes: breakdown_attributes,
|
|
175
195
|
metric_key: metric_key,
|
|
176
196
|
metric_name: metric_name,
|
|
177
197
|
points_system_key: points_system_key,
|
|
@@ -204,11 +224,13 @@ module TrophyApiClient
|
|
|
204
224
|
obj.previous_rank&.is_a?(Integer) != false || raise("Passed value for field obj.previous_rank is not the expected type, validation failed.")
|
|
205
225
|
obj.threshold.is_a?(Integer) != false || raise("Passed value for field obj.threshold is not the expected type, validation failed.")
|
|
206
226
|
obj.breakdown_attribute_value&.is_a?(String) != false || raise("Passed value for field obj.breakdown_attribute_value is not the expected type, validation failed.")
|
|
227
|
+
obj.breakdown_attribute_values&.is_a?(Array) != false || raise("Passed value for field obj.breakdown_attribute_values is not the expected type, validation failed.")
|
|
207
228
|
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
208
229
|
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
209
230
|
obj.key.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
|
|
210
231
|
obj.rank_by.is_a?(TrophyApiClient::LeaderboardResponseRankBy) != false || raise("Passed value for field obj.rank_by is not the expected type, validation failed.")
|
|
211
232
|
obj.breakdown_attribute&.is_a?(String) != false || raise("Passed value for field obj.breakdown_attribute is not the expected type, validation failed.")
|
|
233
|
+
obj.breakdown_attributes.is_a?(Array) != false || raise("Passed value for field obj.breakdown_attributes is not the expected type, validation failed.")
|
|
212
234
|
obj.metric_key&.is_a?(String) != false || raise("Passed value for field obj.metric_key is not the expected type, validation failed.")
|
|
213
235
|
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")
|
|
214
236
|
obj.points_system_key&.is_a?(String) != false || raise("Passed value for field obj.points_system_key is not the expected type, validation failed.")
|