Skip to content

Commit f4795f5

Browse files
Automatically update Ruby SDK
1 parent 4260daf commit f4795f5

4 files changed

Lines changed: 18 additions & 14 deletions

File tree

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.0.35"
5+
VERSION = "1.0.36"
66
AUTHORS = ["Trophy Labs, Inc"].freeze
77
EMAIL = ""
88
SUMMARY = "Ruby library for the Trophy API."

lib/trophy_api_client/types/achievement_completion_response_achievement.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ module TrophyApiClient
1010
class AchievementCompletionResponseAchievement
1111
# @return [TrophyApiClient::MetricEventStreakResponse] The user's current streak for the metric, if the metric has streaks enabled.
1212
attr_reader :current_streak
13-
# @return [DateTime] The date and time the achievement was completed, in ISO 8601 format.
13+
# @return [DateTime] The date and time the achievement was completed, in ISO 8601 format. Null if the
14+
# achievement has not been completed.
1415
attr_reader :achieved_at
1516
# @return [String] The unique ID of the achievement.
1617
attr_reader :id
@@ -46,7 +47,8 @@ class AchievementCompletionResponseAchievement
4647
OMIT = Object.new
4748

4849
# @param current_streak [TrophyApiClient::MetricEventStreakResponse] The user's current streak for the metric, if the metric has streaks enabled.
49-
# @param achieved_at [DateTime] The date and time the achievement was completed, in ISO 8601 format.
50+
# @param achieved_at [DateTime] The date and time the achievement was completed, in ISO 8601 format. Null if the
51+
# achievement has not been completed.
5052
# @param id [String] The unique ID of the achievement.
5153
# @param name [String] The name of this achievement.
5254
# @param trigger [TrophyApiClient::AchievementResponseTrigger] The trigger of the achievement.
@@ -64,10 +66,10 @@ class AchievementCompletionResponseAchievement
6466
# trigger = 'metric')
6567
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
6668
# @return [TrophyApiClient::AchievementCompletionResponseAchievement]
67-
def initialize(achieved_at:, id:, name:, trigger:, key:, current_streak: OMIT, description: OMIT, badge_url: OMIT,
68-
streak_length: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, additional_properties: nil)
69+
def initialize(id:, name:, trigger:, key:, current_streak: OMIT, achieved_at: OMIT, description: OMIT,
70+
badge_url: OMIT, streak_length: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, additional_properties: nil)
6971
@current_streak = current_streak if current_streak != OMIT
70-
@achieved_at = achieved_at
72+
@achieved_at = achieved_at if achieved_at != OMIT
7173
@id = id
7274
@name = name
7375
@trigger = trigger
@@ -155,7 +157,7 @@ def to_json(*_args)
155157
# @return [Void]
156158
def self.validate_raw(obj:)
157159
obj.current_streak.nil? || TrophyApiClient::MetricEventStreakResponse.validate_raw(obj: obj.current_streak)
158-
obj.achieved_at.is_a?(DateTime) != false || raise("Passed value for field obj.achieved_at is not the expected type, validation failed.")
160+
obj.achieved_at&.is_a?(DateTime) != false || raise("Passed value for field obj.achieved_at is not the expected type, validation failed.")
159161
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
160162
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
161163
obj.trigger.is_a?(TrophyApiClient::AchievementResponseTrigger) != false || raise("Passed value for field obj.trigger is not the expected type, validation failed.")

lib/trophy_api_client/types/completed_achievement_response.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
module TrophyApiClient
99
class CompletedAchievementResponse
10-
# @return [DateTime] The date and time the achievement was completed, in ISO 8601 format.
10+
# @return [DateTime] The date and time the achievement was completed, in ISO 8601 format. Null if the
11+
# achievement has not been completed.
1112
attr_reader :achieved_at
1213
# @return [String] The unique ID of the achievement.
1314
attr_reader :id
@@ -42,7 +43,8 @@ class CompletedAchievementResponse
4243

4344
OMIT = Object.new
4445

45-
# @param achieved_at [DateTime] The date and time the achievement was completed, in ISO 8601 format.
46+
# @param achieved_at [DateTime] The date and time the achievement was completed, in ISO 8601 format. Null if the
47+
# achievement has not been completed.
4648
# @param id [String] The unique ID of the achievement.
4749
# @param name [String] The name of this achievement.
4850
# @param trigger [TrophyApiClient::AchievementResponseTrigger] The trigger of the achievement.
@@ -60,9 +62,9 @@ class CompletedAchievementResponse
6062
# trigger = 'metric')
6163
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
6264
# @return [TrophyApiClient::CompletedAchievementResponse]
63-
def initialize(achieved_at:, id:, name:, trigger:, key:, description: OMIT, badge_url: OMIT, streak_length: OMIT,
64-
metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, additional_properties: nil)
65-
@achieved_at = achieved_at
65+
def initialize(id:, name:, trigger:, key:, achieved_at: OMIT, description: OMIT, badge_url: OMIT,
66+
streak_length: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, additional_properties: nil)
67+
@achieved_at = achieved_at if achieved_at != OMIT
6668
@id = id
6769
@name = name
6870
@trigger = trigger
@@ -139,7 +141,7 @@ def to_json(*_args)
139141
# @param obj [Object]
140142
# @return [Void]
141143
def self.validate_raw(obj:)
142-
obj.achieved_at.is_a?(DateTime) != false || raise("Passed value for field obj.achieved_at is not the expected type, validation failed.")
144+
obj.achieved_at&.is_a?(DateTime) != false || raise("Passed value for field obj.achieved_at is not the expected type, validation failed.")
143145
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
144146
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
145147
obj.trigger.is_a?(TrophyApiClient::AchievementResponseTrigger) != false || raise("Passed value for field obj.trigger 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.0.35"
2+
VERSION = "1.0.36"
33
end

0 commit comments

Comments
 (0)