trophy_api_client 1.0.14 → 1.0.15

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: 8366072c3be65aa0e4fa350f5d0b0313f9d38e1d907cb59f63982b3da33f7700
4
- data.tar.gz: ec64eee7eb6cd567cdbc765933a6ca983cdbdb82179b53390cde72627988e91d
3
+ metadata.gz: 22ca6e786e9465669d99a5dd95d0f47dd3d6540745460229ba9c653c625684ca
4
+ data.tar.gz: 3a67f087e27f20ab7920dcafef051e75957479df65428f8ac39b23f057f492ce
5
5
  SHA512:
6
- metadata.gz: f7049e227b0c5609be15587e82dd7c76ea4e4b3075eb6a94ba70b24eeb640a4ae0e1210d00bc58cc251f82334d8c2e8cbc7a31f03375b7f1195daf303c0007f2
7
- data.tar.gz: '036865ebf9e563fb0feb20af8b457a732a9667a22521b6d0f757cf16a7f929b307f336b74c458a97f28a65b83b035e5ced77a00230b69fe76a97eef2b1d47b75'
6
+ metadata.gz: fec6c773ef0ffebdf10b3355052af939e2f99ac6c48ea2ffcd97e0225a57b96c98a4bd854b02a4de6979afbe6f429dbb9b91172f3d3d70be4a54a1b02c0f7081
7
+ data.tar.gz: 3047ca7d0d760b50297500768280b8a3226e52ec38e56d1476cc4aa809875b8fa18dfe086456a3a680e7b1aa08379c7675a25cb8c0bd12955ed2b708c68b716d
data/lib/gemconfig.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module TrophyApiClient
4
4
  module Gemconfig
5
- VERSION = "1.0.14"
5
+ VERSION = "1.0.15"
6
6
  AUTHORS = ["Trophy Labs, Inc"].freeze
7
7
  EMAIL = ""
8
8
  SUMMARY = "Ruby library for the Trophy API."
@@ -60,6 +60,7 @@ module TrophyApiClient
60
60
  # * :email (String)
61
61
  # * :name (String)
62
62
  # * :tz (String)
63
+ # * :device_tokens (Array<String>)
63
64
  # * :subscribe_to_emails (Boolean)
64
65
  # @param request_options [TrophyApiClient::RequestOptions]
65
66
  # @return [TrophyApiClient::AchievementCompletionResponse]
@@ -143,6 +144,7 @@ module TrophyApiClient
143
144
  # * :email (String)
144
145
  # * :name (String)
145
146
  # * :tz (String)
147
+ # * :device_tokens (Array<String>)
146
148
  # * :subscribe_to_emails (Boolean)
147
149
  # @param request_options [TrophyApiClient::RequestOptions]
148
150
  # @return [TrophyApiClient::AchievementCompletionResponse]
@@ -24,6 +24,7 @@ module TrophyApiClient
24
24
  # * :email (String)
25
25
  # * :name (String)
26
26
  # * :tz (String)
27
+ # * :device_tokens (Array<String>)
27
28
  # * :subscribe_to_emails (Boolean)
28
29
  # @param value [Float] The value to add to the user's current total for the given metric.
29
30
  # @param request_options [TrophyApiClient::RequestOptions]
@@ -76,6 +77,7 @@ module TrophyApiClient
76
77
  # * :email (String)
77
78
  # * :name (String)
78
79
  # * :tz (String)
80
+ # * :device_tokens (Array<String>)
79
81
  # * :subscribe_to_emails (Boolean)
80
82
  # @param value [Float] The value to add to the user's current total for the given metric.
81
83
  # @param request_options [TrophyApiClient::RequestOptions]
@@ -12,6 +12,8 @@ module TrophyApiClient
12
12
  attr_reader :name
13
13
  # @return [String] The user's timezone (used for email scheduling).
14
14
  attr_reader :tz
15
+ # @return [Array<String>] The user's device tokens, used for push notifications.
16
+ attr_reader :device_tokens
15
17
  # @return [Boolean] Whether the user should receive Trophy-powered emails. Cannot be false if an
16
18
  # email is provided.
17
19
  attr_reader :subscribe_to_emails
@@ -26,20 +28,24 @@ module TrophyApiClient
26
28
  # @param email [String] The user's email address. Required if subscribeToEmails is true.
27
29
  # @param name [String] The name to refer to the user by in emails.
28
30
  # @param tz [String] The user's timezone (used for email scheduling).
31
+ # @param device_tokens [Array<String>] The user's device tokens, used for push notifications.
29
32
  # @param subscribe_to_emails [Boolean] Whether the user should receive Trophy-powered emails. Cannot be false if an
30
33
  # email is provided.
31
34
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
32
35
  # @return [TrophyApiClient::UpdatedUser]
33
- def initialize(email: OMIT, name: OMIT, tz: OMIT, subscribe_to_emails: OMIT, additional_properties: nil)
36
+ def initialize(email: OMIT, name: OMIT, tz: OMIT, device_tokens: OMIT, subscribe_to_emails: OMIT,
37
+ additional_properties: nil)
34
38
  @email = email if email != OMIT
35
39
  @name = name if name != OMIT
36
40
  @tz = tz if tz != OMIT
41
+ @device_tokens = device_tokens if device_tokens != OMIT
37
42
  @subscribe_to_emails = subscribe_to_emails if subscribe_to_emails != OMIT
38
43
  @additional_properties = additional_properties
39
44
  @_field_set = {
40
45
  "email": email,
41
46
  "name": name,
42
47
  "tz": tz,
48
+ "deviceTokens": device_tokens,
43
49
  "subscribeToEmails": subscribe_to_emails
44
50
  }.reject do |_k, v|
45
51
  v == OMIT
@@ -56,11 +62,13 @@ module TrophyApiClient
56
62
  email = parsed_json["email"]
57
63
  name = parsed_json["name"]
58
64
  tz = parsed_json["tz"]
65
+ device_tokens = parsed_json["deviceTokens"]
59
66
  subscribe_to_emails = parsed_json["subscribeToEmails"]
60
67
  new(
61
68
  email: email,
62
69
  name: name,
63
70
  tz: tz,
71
+ device_tokens: device_tokens,
64
72
  subscribe_to_emails: subscribe_to_emails,
65
73
  additional_properties: struct
66
74
  )
@@ -83,6 +91,7 @@ module TrophyApiClient
83
91
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
84
92
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
85
93
  obj.tz&.is_a?(String) != false || raise("Passed value for field obj.tz is not the expected type, validation failed.")
94
+ obj.device_tokens&.is_a?(Array) != false || raise("Passed value for field obj.device_tokens is not the expected type, validation failed.")
86
95
  obj.subscribe_to_emails&.is_a?(Boolean) != false || raise("Passed value for field obj.subscribe_to_emails is not the expected type, validation failed.")
87
96
  end
88
97
  end
@@ -14,6 +14,8 @@ module TrophyApiClient
14
14
  attr_reader :name
15
15
  # @return [String] The user's timezone (used for email scheduling).
16
16
  attr_reader :tz
17
+ # @return [Array<String>] The user's device tokens, used for push notifications.
18
+ attr_reader :device_tokens
17
19
  # @return [Boolean] Whether the user should receive Trophy-powered emails. Cannot be false if an
18
20
  # email is provided.
19
21
  attr_reader :subscribe_to_emails
@@ -29,15 +31,18 @@ module TrophyApiClient
29
31
  # @param email [String] The user's email address. Required if subscribeToEmails is true.
30
32
  # @param name [String] The name to refer to the user by in emails.
31
33
  # @param tz [String] The user's timezone (used for email scheduling).
34
+ # @param device_tokens [Array<String>] The user's device tokens, used for push notifications.
32
35
  # @param subscribe_to_emails [Boolean] Whether the user should receive Trophy-powered emails. Cannot be false if an
33
36
  # email is provided.
34
37
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
35
38
  # @return [TrophyApiClient::UpsertedUser]
36
- def initialize(id:, email: OMIT, name: OMIT, tz: OMIT, subscribe_to_emails: OMIT, additional_properties: nil)
39
+ def initialize(id:, email: OMIT, name: OMIT, tz: OMIT, device_tokens: OMIT, subscribe_to_emails: OMIT,
40
+ additional_properties: nil)
37
41
  @id = id
38
42
  @email = email if email != OMIT
39
43
  @name = name if name != OMIT
40
44
  @tz = tz if tz != OMIT
45
+ @device_tokens = device_tokens if device_tokens != OMIT
41
46
  @subscribe_to_emails = subscribe_to_emails if subscribe_to_emails != OMIT
42
47
  @additional_properties = additional_properties
43
48
  @_field_set = {
@@ -45,6 +50,7 @@ module TrophyApiClient
45
50
  "email": email,
46
51
  "name": name,
47
52
  "tz": tz,
53
+ "deviceTokens": device_tokens,
48
54
  "subscribeToEmails": subscribe_to_emails
49
55
  }.reject do |_k, v|
50
56
  v == OMIT
@@ -62,12 +68,14 @@ module TrophyApiClient
62
68
  email = parsed_json["email"]
63
69
  name = parsed_json["name"]
64
70
  tz = parsed_json["tz"]
71
+ device_tokens = parsed_json["deviceTokens"]
65
72
  subscribe_to_emails = parsed_json["subscribeToEmails"]
66
73
  new(
67
74
  id: id,
68
75
  email: email,
69
76
  name: name,
70
77
  tz: tz,
78
+ device_tokens: device_tokens,
71
79
  subscribe_to_emails: subscribe_to_emails,
72
80
  additional_properties: struct
73
81
  )
@@ -91,6 +99,7 @@ module TrophyApiClient
91
99
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
92
100
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
93
101
  obj.tz&.is_a?(String) != false || raise("Passed value for field obj.tz is not the expected type, validation failed.")
102
+ obj.device_tokens&.is_a?(Array) != false || raise("Passed value for field obj.device_tokens is not the expected type, validation failed.")
94
103
  obj.subscribe_to_emails&.is_a?(Boolean) != false || raise("Passed value for field obj.subscribe_to_emails is not the expected type, validation failed.")
95
104
  end
96
105
  end
@@ -22,6 +22,8 @@ module TrophyApiClient
22
22
  attr_reader :name
23
23
  # @return [String] The user's timezone (used for email scheduling).
24
24
  attr_reader :tz
25
+ # @return [Array<String>] The user's device tokens, used for push notifications.
26
+ attr_reader :device_tokens
25
27
  # @return [Boolean] Whether the user should receive Trophy-powered emails. Cannot be false if an
26
28
  # email is provided.
27
29
  attr_reader :subscribe_to_emails
@@ -41,12 +43,13 @@ module TrophyApiClient
41
43
  # @param email [String] The user's email address. Required if subscribeToEmails is true.
42
44
  # @param name [String] The name to refer to the user by in emails.
43
45
  # @param tz [String] The user's timezone (used for email scheduling).
46
+ # @param device_tokens [Array<String>] The user's device tokens, used for push notifications.
44
47
  # @param subscribe_to_emails [Boolean] Whether the user should receive Trophy-powered emails. Cannot be false if an
45
48
  # email is provided.
46
49
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
47
50
  # @return [TrophyApiClient::User]
48
51
  def initialize(id:, control: OMIT, created: OMIT, updated: OMIT, email: OMIT, name: OMIT, tz: OMIT,
49
- subscribe_to_emails: OMIT, additional_properties: nil)
52
+ device_tokens: OMIT, subscribe_to_emails: OMIT, additional_properties: nil)
50
53
  @control = control if control != OMIT
51
54
  @created = created if created != OMIT
52
55
  @updated = updated if updated != OMIT
@@ -54,6 +57,7 @@ module TrophyApiClient
54
57
  @email = email if email != OMIT
55
58
  @name = name if name != OMIT
56
59
  @tz = tz if tz != OMIT
60
+ @device_tokens = device_tokens if device_tokens != OMIT
57
61
  @subscribe_to_emails = subscribe_to_emails if subscribe_to_emails != OMIT
58
62
  @additional_properties = additional_properties
59
63
  @_field_set = {
@@ -64,6 +68,7 @@ module TrophyApiClient
64
68
  "email": email,
65
69
  "name": name,
66
70
  "tz": tz,
71
+ "deviceTokens": device_tokens,
67
72
  "subscribeToEmails": subscribe_to_emails
68
73
  }.reject do |_k, v|
69
74
  v == OMIT
@@ -84,6 +89,7 @@ module TrophyApiClient
84
89
  email = parsed_json["email"]
85
90
  name = parsed_json["name"]
86
91
  tz = parsed_json["tz"]
92
+ device_tokens = parsed_json["deviceTokens"]
87
93
  subscribe_to_emails = parsed_json["subscribeToEmails"]
88
94
  new(
89
95
  control: control,
@@ -93,6 +99,7 @@ module TrophyApiClient
93
99
  email: email,
94
100
  name: name,
95
101
  tz: tz,
102
+ device_tokens: device_tokens,
96
103
  subscribe_to_emails: subscribe_to_emails,
97
104
  additional_properties: struct
98
105
  )
@@ -119,6 +126,7 @@ module TrophyApiClient
119
126
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
120
127
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
121
128
  obj.tz&.is_a?(String) != false || raise("Passed value for field obj.tz is not the expected type, validation failed.")
129
+ obj.device_tokens&.is_a?(Array) != false || raise("Passed value for field obj.device_tokens is not the expected type, validation failed.")
122
130
  obj.subscribe_to_emails&.is_a?(Boolean) != false || raise("Passed value for field obj.subscribe_to_emails is not the expected type, validation failed.")
123
131
  end
124
132
  end
@@ -33,6 +33,7 @@ module TrophyApiClient
33
33
  # * :email (String)
34
34
  # * :name (String)
35
35
  # * :tz (String)
36
+ # * :device_tokens (Array<String>)
36
37
  # * :subscribe_to_emails (Boolean)
37
38
  # @param request_options [TrophyApiClient::RequestOptions]
38
39
  # @return [TrophyApiClient::User]
@@ -100,6 +101,7 @@ module TrophyApiClient
100
101
  # * :email (String)
101
102
  # * :name (String)
102
103
  # * :tz (String)
104
+ # * :device_tokens (Array<String>)
103
105
  # * :subscribe_to_emails (Boolean)
104
106
  # @param request_options [TrophyApiClient::RequestOptions]
105
107
  # @return [TrophyApiClient::User]
@@ -135,6 +137,7 @@ module TrophyApiClient
135
137
  # * :email (String)
136
138
  # * :name (String)
137
139
  # * :tz (String)
140
+ # * :device_tokens (Array<String>)
138
141
  # * :subscribe_to_emails (Boolean)
139
142
  # @param request_options [TrophyApiClient::RequestOptions]
140
143
  # @return [TrophyApiClient::User]
@@ -452,6 +455,7 @@ module TrophyApiClient
452
455
  # * :email (String)
453
456
  # * :name (String)
454
457
  # * :tz (String)
458
+ # * :device_tokens (Array<String>)
455
459
  # * :subscribe_to_emails (Boolean)
456
460
  # @param request_options [TrophyApiClient::RequestOptions]
457
461
  # @return [TrophyApiClient::User]
@@ -523,6 +527,7 @@ module TrophyApiClient
523
527
  # * :email (String)
524
528
  # * :name (String)
525
529
  # * :tz (String)
530
+ # * :device_tokens (Array<String>)
526
531
  # * :subscribe_to_emails (Boolean)
527
532
  # @param request_options [TrophyApiClient::RequestOptions]
528
533
  # @return [TrophyApiClient::User]
@@ -560,6 +565,7 @@ module TrophyApiClient
560
565
  # * :email (String)
561
566
  # * :name (String)
562
567
  # * :tz (String)
568
+ # * :device_tokens (Array<String>)
563
569
  # * :subscribe_to_emails (Boolean)
564
570
  # @param request_options [TrophyApiClient::RequestOptions]
565
571
  # @return [TrophyApiClient::User]
@@ -1,3 +1,3 @@
1
1
  module MyGem
2
- VERSION = "1.0.14"
2
+ VERSION = "1.0.15"
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.14
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trophy Labs, Inc