trophy_api_client 1.0.35 → 1.0.36

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7e733021198dea1940f317242551238106a113bbcacdc42842c1f0a1bac227a
4
- data.tar.gz: b7c8c709ec771024cff3b54e77d4f1df7a8644a1b64e2be2c470256aee08d214
3
+ metadata.gz: 70c39a88f44a9a92618d3953c39a947513d02a2ea0dade3fd4fdbdf9de89ad94
4
+ data.tar.gz: 4d36287ce62401dd40657fac67764aff80c9c55315d2d611b832c92df533cdbb
5
5
  SHA512:
6
- metadata.gz: edb848789103d0159d69f8fe6b852e562bf408f47ae7724dce1984b5d03715f7fc0135975214c787425d13821ddc2dc047fe6a356a4879671af79cba9f721287
7
- data.tar.gz: 0117550ff5bfc745e68c913d18304861ae75b460c62391cda21b08cb21cae56a141f87457e5dd91f04e9f846af4fe3fd7875bdf11e0c6bf1d26131a68e3f78ef
6
+ metadata.gz: 137070ab6a7c5517ded89325942d327d876e4129c64dbb4929cbc466f73884bf401afe0ab1b61935cf0e5cbea57d86ebe1488f8f0fb2cf08d813e68aa9ec42ea
7
+ data.tar.gz: 6f9417b7950b6d2a8cec35da7a8780ae4ad13a59f17a25eb3af05ffed7a3955a05e42d6b8e3c956ef06b84ef95b9b0843023788f476d5961e209c701a865e187
data/lib/gemconfig.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module TrophyApiClient
4
4
  module Gemconfig
5
- VERSION = "1.0.35"
5
+ VERSION = "1.0.36"
6
6
  AUTHORS = ["Trophy Labs, Inc"].freeze
7
7
  EMAIL = ""
8
8
  SUMMARY = "Ruby library for the Trophy API."
@@ -10,7 +10,8 @@ module TrophyApiClient
10
10
  class AchievementCompletionResponseAchievement
11
11
  # @return [TrophyApiClient::MetricEventStreakResponse] The user's current streak for the metric, if the metric has streaks enabled.
12
12
  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.
14
15
  attr_reader :achieved_at
15
16
  # @return [String] The unique ID of the achievement.
16
17
  attr_reader :id
@@ -46,7 +47,8 @@ module TrophyApiClient
46
47
  OMIT = Object.new
47
48
 
48
49
  # @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.
50
52
  # @param id [String] The unique ID of the achievement.
51
53
  # @param name [String] The name of this achievement.
52
54
  # @param trigger [TrophyApiClient::AchievementResponseTrigger] The trigger of the achievement.
@@ -64,10 +66,10 @@ module TrophyApiClient
64
66
  # trigger = 'metric')
65
67
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
66
68
  # @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)
69
71
  @current_streak = current_streak if current_streak != OMIT
70
- @achieved_at = achieved_at
72
+ @achieved_at = achieved_at if achieved_at != OMIT
71
73
  @id = id
72
74
  @name = name
73
75
  @trigger = trigger
@@ -155,7 +157,7 @@ module TrophyApiClient
155
157
  # @return [Void]
156
158
  def self.validate_raw(obj:)
157
159
  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.")
159
161
  obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
160
162
  obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
161
163
  obj.trigger.is_a?(TrophyApiClient::AchievementResponseTrigger) != false || raise("Passed value for field obj.trigger is not the expected type, validation failed.")
@@ -7,7 +7,8 @@ require "json"
7
7
 
8
8
  module TrophyApiClient
9
9
  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.
11
12
  attr_reader :achieved_at
12
13
  # @return [String] The unique ID of the achievement.
13
14
  attr_reader :id
@@ -42,7 +43,8 @@ module TrophyApiClient
42
43
 
43
44
  OMIT = Object.new
44
45
 
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.
46
48
  # @param id [String] The unique ID of the achievement.
47
49
  # @param name [String] The name of this achievement.
48
50
  # @param trigger [TrophyApiClient::AchievementResponseTrigger] The trigger of the achievement.
@@ -60,9 +62,9 @@ module TrophyApiClient
60
62
  # trigger = 'metric')
61
63
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
62
64
  # @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
66
68
  @id = id
67
69
  @name = name
68
70
  @trigger = trigger
@@ -139,7 +141,7 @@ module TrophyApiClient
139
141
  # @param obj [Object]
140
142
  # @return [Void]
141
143
  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.")
143
145
  obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
144
146
  obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
145
147
  obj.trigger.is_a?(TrophyApiClient::AchievementResponseTrigger) != false || raise("Passed value for field obj.trigger is not the expected type, validation failed.")
@@ -1,3 +1,3 @@
1
1
  module MyGem
2
- VERSION = "1.0.35"
2
+ VERSION = "1.0.36"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trophy_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.35
4
+ version: 1.0.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trophy Labs, Inc