Skip to content

Commit 3505c58

Browse files
Automatically update Ruby SDK
1 parent a32dcab commit 3505c58

7 files changed

Lines changed: 47 additions & 6 deletions

lib/gemconfig.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module TrophyApiClient
44
module Gemconfig
5-
VERSION = "1.1.1"
5+
VERSION = "1.1.2"
66
AUTHORS = ["Trophy Labs, Inc"].freeze
77
EMAIL = ""
88
SUMMARY = "Ruby library for the Trophy API."

lib/trophy_api_client/types/achievement_response.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ class AchievementResponse
2424
# @return [Integer] The length of the streak required to complete the achievement (only applicable
2525
# if trigger = 'streak')
2626
attr_reader :streak_length
27+
# @return [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
28+
# achievement (only applicable if trigger = 'achievement')
29+
attr_reader :achievement_ids
2730
# @return [String] The ID of the metric associated with this achievement (only applicable if
2831
# trigger = 'metric')
2932
attr_reader :metric_id
@@ -56,6 +59,8 @@ class AchievementResponse
5659
# trigger = 'api')
5760
# @param streak_length [Integer] The length of the streak required to complete the achievement (only applicable
5861
# if trigger = 'streak')
62+
# @param achievement_ids [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
63+
# achievement (only applicable if trigger = 'achievement')
5964
# @param metric_id [String] The ID of the metric associated with this achievement (only applicable if
6065
# trigger = 'metric')
6166
# @param metric_value [Float] The value of the metric required to complete the achievement (only applicable if
@@ -69,14 +74,15 @@ class AchievementResponse
6974
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
7075
# @return [TrophyApiClient::AchievementResponse]
7176
def initialize(id:, name:, trigger:, description: OMIT, badge_url: OMIT, key: OMIT, streak_length: OMIT,
72-
metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
77+
achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
7378
@id = id
7479
@name = name
7580
@trigger = trigger
7681
@description = description if description != OMIT
7782
@badge_url = badge_url if badge_url != OMIT
7883
@key = key if key != OMIT
7984
@streak_length = streak_length if streak_length != OMIT
85+
@achievement_ids = achievement_ids if achievement_ids != OMIT
8086
@metric_id = metric_id if metric_id != OMIT
8187
@metric_value = metric_value if metric_value != OMIT
8288
@metric_name = metric_name if metric_name != OMIT
@@ -91,6 +97,7 @@ def initialize(id:, name:, trigger:, description: OMIT, badge_url: OMIT, key: OM
9197
"badgeUrl": badge_url,
9298
"key": key,
9399
"streakLength": streak_length,
100+
"achievementIds": achievement_ids,
94101
"metricId": metric_id,
95102
"metricValue": metric_value,
96103
"metricName": metric_name,
@@ -115,6 +122,7 @@ def self.from_json(json_object:)
115122
badge_url = parsed_json["badgeUrl"]
116123
key = parsed_json["key"]
117124
streak_length = parsed_json["streakLength"]
125+
achievement_ids = parsed_json["achievementIds"]
118126
metric_id = parsed_json["metricId"]
119127
metric_value = parsed_json["metricValue"]
120128
metric_name = parsed_json["metricName"]
@@ -136,6 +144,7 @@ def self.from_json(json_object:)
136144
badge_url: badge_url,
137145
key: key,
138146
streak_length: streak_length,
147+
achievement_ids: achievement_ids,
139148
metric_id: metric_id,
140149
metric_value: metric_value,
141150
metric_name: metric_name,
@@ -166,6 +175,7 @@ def self.validate_raw(obj:)
166175
obj.badge_url&.is_a?(String) != false || raise("Passed value for field obj.badge_url is not the expected type, validation failed.")
167176
obj.key&.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
168177
obj.streak_length&.is_a?(Integer) != false || raise("Passed value for field obj.streak_length is not the expected type, validation failed.")
178+
obj.achievement_ids&.is_a?(Array) != false || raise("Passed value for field obj.achievement_ids is not the expected type, validation failed.")
169179
obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
170180
obj.metric_value&.is_a?(Float) != false || raise("Passed value for field obj.metric_value is not the expected type, validation failed.")
171181
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")

lib/trophy_api_client/types/achievement_response_trigger.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ class AchievementResponseTrigger
66
METRIC = "metric"
77
STREAK = "streak"
88
API = "api"
9+
ACHIEVEMENT = "achievement"
910
end
1011
end

lib/trophy_api_client/types/achievement_with_stats_response.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class AchievementWithStatsResponse
2828
# @return [Integer] The length of the streak required to complete the achievement (only applicable
2929
# if trigger = 'streak')
3030
attr_reader :streak_length
31+
# @return [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
32+
# achievement (only applicable if trigger = 'achievement')
33+
attr_reader :achievement_ids
3134
# @return [String] The ID of the metric associated with this achievement (only applicable if
3235
# trigger = 'metric')
3336
attr_reader :metric_id
@@ -62,6 +65,8 @@ class AchievementWithStatsResponse
6265
# trigger = 'api')
6366
# @param streak_length [Integer] The length of the streak required to complete the achievement (only applicable
6467
# if trigger = 'streak')
68+
# @param achievement_ids [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
69+
# achievement (only applicable if trigger = 'achievement')
6570
# @param metric_id [String] The ID of the metric associated with this achievement (only applicable if
6671
# trigger = 'metric')
6772
# @param metric_value [Float] The value of the metric required to complete the achievement (only applicable if
@@ -75,7 +80,7 @@ class AchievementWithStatsResponse
7580
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
7681
# @return [TrophyApiClient::AchievementWithStatsResponse]
7782
def initialize(completions:, rarity:, id:, name:, trigger:, description: OMIT, badge_url: OMIT, key: OMIT,
78-
streak_length: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
83+
streak_length: OMIT, achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
7984
@completions = completions
8085
@rarity = rarity
8186
@id = id
@@ -85,6 +90,7 @@ def initialize(completions:, rarity:, id:, name:, trigger:, description: OMIT, b
8590
@badge_url = badge_url if badge_url != OMIT
8691
@key = key if key != OMIT
8792
@streak_length = streak_length if streak_length != OMIT
93+
@achievement_ids = achievement_ids if achievement_ids != OMIT
8894
@metric_id = metric_id if metric_id != OMIT
8995
@metric_value = metric_value if metric_value != OMIT
9096
@metric_name = metric_name if metric_name != OMIT
@@ -101,6 +107,7 @@ def initialize(completions:, rarity:, id:, name:, trigger:, description: OMIT, b
101107
"badgeUrl": badge_url,
102108
"key": key,
103109
"streakLength": streak_length,
110+
"achievementIds": achievement_ids,
104111
"metricId": metric_id,
105112
"metricValue": metric_value,
106113
"metricName": metric_name,
@@ -127,6 +134,7 @@ def self.from_json(json_object:)
127134
badge_url = parsed_json["badgeUrl"]
128135
key = parsed_json["key"]
129136
streak_length = parsed_json["streakLength"]
137+
achievement_ids = parsed_json["achievementIds"]
130138
metric_id = parsed_json["metricId"]
131139
metric_value = parsed_json["metricValue"]
132140
metric_name = parsed_json["metricName"]
@@ -150,6 +158,7 @@ def self.from_json(json_object:)
150158
badge_url: badge_url,
151159
key: key,
152160
streak_length: streak_length,
161+
achievement_ids: achievement_ids,
153162
metric_id: metric_id,
154163
metric_value: metric_value,
155164
metric_name: metric_name,
@@ -182,6 +191,7 @@ def self.validate_raw(obj:)
182191
obj.badge_url&.is_a?(String) != false || raise("Passed value for field obj.badge_url is not the expected type, validation failed.")
183192
obj.key&.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
184193
obj.streak_length&.is_a?(Integer) != false || raise("Passed value for field obj.streak_length is not the expected type, validation failed.")
194+
obj.achievement_ids&.is_a?(Array) != false || raise("Passed value for field obj.achievement_ids is not the expected type, validation failed.")
185195
obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
186196
obj.metric_value&.is_a?(Float) != false || raise("Passed value for field obj.metric_value is not the expected type, validation failed.")
187197
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")

lib/trophy_api_client/types/user_achievement_response.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class UserAchievementResponse
2828
# @return [Integer] The length of the streak required to complete the achievement (only applicable
2929
# if trigger = 'streak')
3030
attr_reader :streak_length
31+
# @return [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
32+
# achievement (only applicable if trigger = 'achievement')
33+
attr_reader :achievement_ids
3134
# @return [String] The ID of the metric associated with this achievement (only applicable if
3235
# trigger = 'metric')
3336
attr_reader :metric_id
@@ -62,6 +65,8 @@ class UserAchievementResponse
6265
# trigger = 'api')
6366
# @param streak_length [Integer] The length of the streak required to complete the achievement (only applicable
6467
# if trigger = 'streak')
68+
# @param achievement_ids [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
69+
# achievement (only applicable if trigger = 'achievement')
6570
# @param metric_id [String] The ID of the metric associated with this achievement (only applicable if
6671
# trigger = 'metric')
6772
# @param metric_value [Float] The value of the metric required to complete the achievement (only applicable if
@@ -75,7 +80,7 @@ class UserAchievementResponse
7580
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
7681
# @return [TrophyApiClient::UserAchievementResponse]
7782
def initialize(id:, name:, trigger:, achieved_at: OMIT, description: OMIT, badge_url: OMIT, key: OMIT,
78-
streak_length: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
83+
streak_length: OMIT, achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
7984
@achieved_at = achieved_at if achieved_at != OMIT
8085
@id = id
8186
@name = name
@@ -84,6 +89,7 @@ def initialize(id:, name:, trigger:, achieved_at: OMIT, description: OMIT, badge
8489
@badge_url = badge_url if badge_url != OMIT
8590
@key = key if key != OMIT
8691
@streak_length = streak_length if streak_length != OMIT
92+
@achievement_ids = achievement_ids if achievement_ids != OMIT
8793
@metric_id = metric_id if metric_id != OMIT
8894
@metric_value = metric_value if metric_value != OMIT
8995
@metric_name = metric_name if metric_name != OMIT
@@ -99,6 +105,7 @@ def initialize(id:, name:, trigger:, achieved_at: OMIT, description: OMIT, badge
99105
"badgeUrl": badge_url,
100106
"key": key,
101107
"streakLength": streak_length,
108+
"achievementIds": achievement_ids,
102109
"metricId": metric_id,
103110
"metricValue": metric_value,
104111
"metricName": metric_name,
@@ -124,6 +131,7 @@ def self.from_json(json_object:)
124131
badge_url = parsed_json["badgeUrl"]
125132
key = parsed_json["key"]
126133
streak_length = parsed_json["streakLength"]
134+
achievement_ids = parsed_json["achievementIds"]
127135
metric_id = parsed_json["metricId"]
128136
metric_value = parsed_json["metricValue"]
129137
metric_name = parsed_json["metricName"]
@@ -146,6 +154,7 @@ def self.from_json(json_object:)
146154
badge_url: badge_url,
147155
key: key,
148156
streak_length: streak_length,
157+
achievement_ids: achievement_ids,
149158
metric_id: metric_id,
150159
metric_value: metric_value,
151160
metric_name: metric_name,
@@ -177,6 +186,7 @@ def self.validate_raw(obj:)
177186
obj.badge_url&.is_a?(String) != false || raise("Passed value for field obj.badge_url is not the expected type, validation failed.")
178187
obj.key&.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
179188
obj.streak_length&.is_a?(Integer) != false || raise("Passed value for field obj.streak_length is not the expected type, validation failed.")
189+
obj.achievement_ids&.is_a?(Array) != false || raise("Passed value for field obj.achievement_ids is not the expected type, validation failed.")
180190
obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
181191
obj.metric_value&.is_a?(Float) != false || raise("Passed value for field obj.metric_value is not the expected type, validation failed.")
182192
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")

lib/trophy_api_client/types/user_achievement_with_stats_response.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class UserAchievementWithStatsResponse
3232
# @return [Integer] The length of the streak required to complete the achievement (only applicable
3333
# if trigger = 'streak')
3434
attr_reader :streak_length
35+
# @return [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
36+
# achievement (only applicable if trigger = 'achievement')
37+
attr_reader :achievement_ids
3538
# @return [String] The ID of the metric associated with this achievement (only applicable if
3639
# trigger = 'metric')
3740
attr_reader :metric_id
@@ -68,6 +71,8 @@ class UserAchievementWithStatsResponse
6871
# trigger = 'api')
6972
# @param streak_length [Integer] The length of the streak required to complete the achievement (only applicable
7073
# if trigger = 'streak')
74+
# @param achievement_ids [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
75+
# achievement (only applicable if trigger = 'achievement')
7176
# @param metric_id [String] The ID of the metric associated with this achievement (only applicable if
7277
# trigger = 'metric')
7378
# @param metric_value [Float] The value of the metric required to complete the achievement (only applicable if
@@ -81,7 +86,7 @@ class UserAchievementWithStatsResponse
8186
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
8287
# @return [TrophyApiClient::UserAchievementWithStatsResponse]
8388
def initialize(completions:, rarity:, id:, name:, trigger:, achieved_at: OMIT, description: OMIT, badge_url: OMIT,
84-
key: OMIT, streak_length: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
89+
key: OMIT, streak_length: OMIT, achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
8590
@achieved_at = achieved_at if achieved_at != OMIT
8691
@completions = completions
8792
@rarity = rarity
@@ -92,6 +97,7 @@ def initialize(completions:, rarity:, id:, name:, trigger:, achieved_at: OMIT, d
9297
@badge_url = badge_url if badge_url != OMIT
9398
@key = key if key != OMIT
9499
@streak_length = streak_length if streak_length != OMIT
100+
@achievement_ids = achievement_ids if achievement_ids != OMIT
95101
@metric_id = metric_id if metric_id != OMIT
96102
@metric_value = metric_value if metric_value != OMIT
97103
@metric_name = metric_name if metric_name != OMIT
@@ -109,6 +115,7 @@ def initialize(completions:, rarity:, id:, name:, trigger:, achieved_at: OMIT, d
109115
"badgeUrl": badge_url,
110116
"key": key,
111117
"streakLength": streak_length,
118+
"achievementIds": achievement_ids,
112119
"metricId": metric_id,
113120
"metricValue": metric_value,
114121
"metricName": metric_name,
@@ -136,6 +143,7 @@ def self.from_json(json_object:)
136143
badge_url = parsed_json["badgeUrl"]
137144
key = parsed_json["key"]
138145
streak_length = parsed_json["streakLength"]
146+
achievement_ids = parsed_json["achievementIds"]
139147
metric_id = parsed_json["metricId"]
140148
metric_value = parsed_json["metricValue"]
141149
metric_name = parsed_json["metricName"]
@@ -160,6 +168,7 @@ def self.from_json(json_object:)
160168
badge_url: badge_url,
161169
key: key,
162170
streak_length: streak_length,
171+
achievement_ids: achievement_ids,
163172
metric_id: metric_id,
164173
metric_value: metric_value,
165174
metric_name: metric_name,
@@ -193,6 +202,7 @@ def self.validate_raw(obj:)
193202
obj.badge_url&.is_a?(String) != false || raise("Passed value for field obj.badge_url is not the expected type, validation failed.")
194203
obj.key&.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
195204
obj.streak_length&.is_a?(Integer) != false || raise("Passed value for field obj.streak_length is not the expected type, validation failed.")
205+
obj.achievement_ids&.is_a?(Array) != false || raise("Passed value for field obj.achievement_ids is not the expected type, validation failed.")
196206
obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
197207
obj.metric_value&.is_a?(Float) != false || raise("Passed value for field obj.metric_value is not the expected type, validation failed.")
198208
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")

lib/trophy_api_client/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module MyGem
2-
VERSION = "1.1.1"
2+
VERSION = "1.1.2"
33
end

0 commit comments

Comments
 (0)