trycourier 3.4.0.pre.alpha3 → 3.4.0.pre.alpha5

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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/trycourier/internal/type/base_model.rb +3 -5
  5. data/lib/trycourier/internal/util.rb +3 -2
  6. data/lib/trycourier/models/audience.rb +1 -0
  7. data/lib/trycourier/models/audit_event.rb +1 -0
  8. data/lib/trycourier/models/brand.rb +1 -0
  9. data/lib/trycourier/models/message_details.rb +1 -0
  10. data/lib/trycourier/models/notification_get_content.rb +1 -0
  11. data/lib/trycourier/models/subscription_list.rb +1 -0
  12. data/lib/trycourier/models/tenant.rb +1 -0
  13. data/lib/trycourier/models/users/preference_retrieve_response.rb +3 -3
  14. data/lib/trycourier/models/users/preference_retrieve_topic_response.rb +3 -3
  15. data/lib/trycourier/models/users/token_add_single_params.rb +1 -1
  16. data/lib/trycourier/models/users/token_list_response.rb +1 -1
  17. data/lib/trycourier/models/users/token_retrieve_response.rb +1 -1
  18. data/lib/trycourier/models/users/topic_preference.rb +55 -0
  19. data/lib/trycourier/models/users/user_token.rb +183 -0
  20. data/lib/trycourier/models.rb +0 -4
  21. data/lib/trycourier/resources/users/tokens.rb +5 -5
  22. data/lib/trycourier/version.rb +1 -1
  23. data/lib/trycourier.rb +2 -2
  24. data/rbi/trycourier/models/users/preference_retrieve_response.rbi +3 -3
  25. data/rbi/trycourier/models/users/preference_retrieve_topic_response.rbi +4 -4
  26. data/rbi/trycourier/models/users/token_add_single_params.rbi +1 -1
  27. data/rbi/trycourier/models/users/token_list_response.rbi +1 -1
  28. data/rbi/trycourier/models/users/token_retrieve_response.rbi +1 -1
  29. data/rbi/trycourier/models/users/topic_preference.rbi +80 -0
  30. data/rbi/trycourier/models/users/user_token.rbi +291 -0
  31. data/rbi/trycourier/models.rbi +0 -4
  32. data/rbi/trycourier/resources/users/tokens.rbi +6 -5
  33. data/sig/trycourier/models/users/preference_retrieve_response.rbs +4 -4
  34. data/sig/trycourier/models/users/preference_retrieve_topic_response.rbs +4 -4
  35. data/sig/trycourier/models/users/token_add_single_params.rbs +1 -1
  36. data/sig/trycourier/models/users/token_list_response.rbs +1 -1
  37. data/sig/trycourier/models/users/token_retrieve_response.rbs +1 -1
  38. data/sig/trycourier/models/users/topic_preference.rbs +47 -0
  39. data/sig/trycourier/models/users/user_token.rbs +141 -0
  40. data/sig/trycourier/models.rbs +0 -4
  41. data/sig/trycourier/resources/users/tokens.rbs +4 -4
  42. metadata +8 -8
  43. data/lib/trycourier/models/topic_preference.rb +0 -53
  44. data/lib/trycourier/models/user_token.rb +0 -179
  45. data/rbi/trycourier/models/topic_preference.rbi +0 -75
  46. data/rbi/trycourier/models/user_token.rbi +0 -267
  47. data/sig/trycourier/models/topic_preference.rbs +0 -45
  48. data/sig/trycourier/models/user_token.rbs +0 -137
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce6d2018ecff2969c444dbee05b4be1a4ee1b402c8928ed0996dea5cc25e5039
4
- data.tar.gz: b4fc39be3148da524690408549416327f3a2c395cd328694a09cd7df62cfc3bd
3
+ metadata.gz: f14ee1336a781820bc7322a988b66af49dc962deb69ca3d632678a9d87418dae
4
+ data.tar.gz: 48cf6121b3dfdea6d0333a4d3c099dcdff65a44e487312ff4c662e8132e7da96
5
5
  SHA512:
6
- metadata.gz: ef630e40f1f6f9af69104860bbfa724d81ad3677c94435a2f67015de8c109da43e530f116a1cb925796cf226c3b7cb17ea6a90feb7aa2a5e8d3306ed91127e21
7
- data.tar.gz: e4b3f42cbe652ed93353b98df89d1516abc420f3686477461b625593428df0310e7a6ca1c6b849b0e6c62c42b1cb3c81772b673e739aeec61466e01408f81c37
6
+ metadata.gz: 76668745729ceabd8103834ff1c0a4f314554bb7011cfed1602474b3d7209b742b6f68f62a25a24e8b49cdb1c72391a83ff4502c52df1ed34eb7c4173a05ffe5
7
+ data.tar.gz: eea8f1d219fd7253402ae012e2e5364d4e80b93e35eba7f124426ce03f95afdc2c776ad342c3af80ccf5b4005c36f2300780ceeca4358f926c82befcc3f9a215
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.4.0-alpha5 (2025-10-17)
4
+
5
+ Full Changelog: [v3.4.0-alpha4...v3.4.0-alpha5](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha4...v3.4.0-alpha5)
6
+
7
+ ### Bug Fixes
8
+
9
+ * Updated paths for each model and go example updates ([3589716](https://github.com/trycourier/courier-ruby/commit/358971631427bdec2f3c609aa0b96139ee285503))
10
+
11
+ ## 3.4.0-alpha4 (2025-10-16)
12
+
13
+ Full Changelog: [v3.4.0-alpha3...v3.4.0-alpha4](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha3...v3.4.0-alpha4)
14
+
15
+ ### Bug Fixes
16
+
17
+ * absolutely qualified uris should always override the default ([bfd4568](https://github.com/trycourier/courier-ruby/commit/bfd45688b3098e802b5dc1b0cced22900a0be21d))
18
+
3
19
  ## 3.4.0-alpha3 (2025-10-15)
4
20
 
5
21
  Full Changelog: [v3.4.0-alpha2...v3.4.0-alpha3](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha2...v3.4.0-alpha3)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "trycourier", "~> 3.4.0.pre.alpha3"
18
+ gem "trycourier", "~> 3.4.0.pre.alpha5"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -438,11 +438,9 @@ module Trycourier
438
438
  # @return [Hash{Symbol=>Object}]
439
439
  #
440
440
  # @example
441
- # # `audience` is a `Trycourier::Audience`
442
- # audience => {
443
- # id: id,
444
- # created_at: created_at,
445
- # description: description
441
+ # # `channel_preference` is a `Trycourier::ChannelPreference`
442
+ # channel_preference => {
443
+ # channel: channel
446
444
  # }
447
445
  def deconstruct_keys(keys)
448
446
  (keys || self.class.known_fields.keys)
@@ -346,8 +346,9 @@ module Trycourier
346
346
  base_path, base_query = lhs.fetch_values(:path, :query)
347
347
  slashed = base_path.end_with?("/") ? base_path : "#{base_path}/"
348
348
 
349
- parsed_path, parsed_query = parse_uri(rhs.fetch(:path)).fetch_values(:path, :query)
350
- override = URI::Generic.build(**rhs.slice(:scheme, :host, :port), path: parsed_path)
349
+ merged = {**parse_uri(rhs.fetch(:path)), **rhs.except(:path, :query)}
350
+ parsed_path, parsed_query = merged.fetch_values(:path, :query)
351
+ override = URI::Generic.build(**merged.slice(:scheme, :host, :port), path: parsed_path)
351
352
 
352
353
  joined = URI.join(URI::Generic.build(lhs.except(:path, :query)), slashed, override)
353
354
  query = deep_merge(
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Trycourier
4
4
  module Models
5
+ # @see Trycourier::Resources::Audiences#retrieve
5
6
  class Audience < Trycourier::Internal::Type::BaseModel
6
7
  # @!attribute id
7
8
  # A unique identifier representing the audience_id
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Trycourier
4
4
  module Models
5
+ # @see Trycourier::Resources::AuditEvents#retrieve
5
6
  class AuditEvent < Trycourier::Internal::Type::BaseModel
6
7
  # @!attribute actor
7
8
  #
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Trycourier
4
4
  module Models
5
+ # @see Trycourier::Resources::Brands#create
5
6
  class Brand < Trycourier::Internal::Type::BaseModel
6
7
  # @!attribute id
7
8
  #
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Trycourier
4
4
  module Models
5
+ # @see Trycourier::Resources::Messages#cancel
5
6
  class MessageDetails < Trycourier::Internal::Type::BaseModel
6
7
  # @!attribute id
7
8
  # A unique identifier associated with the message you wish to retrieve (results
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Trycourier
4
4
  module Models
5
+ # @see Trycourier::Resources::Notifications#retrieve_content
5
6
  class NotificationGetContent < Trycourier::Internal::Type::BaseModel
6
7
  # @!attribute blocks
7
8
  #
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Trycourier
4
4
  module Models
5
+ # @see Trycourier::Resources::Lists#retrieve
5
6
  class SubscriptionList < Trycourier::Internal::Type::BaseModel
6
7
  # @!attribute id
7
8
  #
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Trycourier
4
4
  module Models
5
+ # @see Trycourier::Resources::Tenants#retrieve
5
6
  class Tenant < Trycourier::Internal::Type::BaseModel
6
7
  # @!attribute id
7
8
  # Id of the tenant.
@@ -8,8 +8,8 @@ module Trycourier
8
8
  # @!attribute items
9
9
  # The Preferences associated with the user_id.
10
10
  #
11
- # @return [Array<Trycourier::Models::TopicPreference>]
12
- required :items, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::TopicPreference] }
11
+ # @return [Array<Trycourier::Models::Users::TopicPreference>]
12
+ required :items, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::Users::TopicPreference] }
13
13
 
14
14
  # @!attribute paging
15
15
  # Deprecated - Paging not implemented on this endpoint
@@ -18,7 +18,7 @@ module Trycourier
18
18
  required :paging, -> { Trycourier::Paging }
19
19
 
20
20
  # @!method initialize(items:, paging:)
21
- # @param items [Array<Trycourier::Models::TopicPreference>] The Preferences associated with the user_id.
21
+ # @param items [Array<Trycourier::Models::Users::TopicPreference>] The Preferences associated with the user_id.
22
22
  #
23
23
  # @param paging [Trycourier::Models::Paging] Deprecated - Paging not implemented on this endpoint
24
24
  end
@@ -7,11 +7,11 @@ module Trycourier
7
7
  class PreferenceRetrieveTopicResponse < Trycourier::Internal::Type::BaseModel
8
8
  # @!attribute topic
9
9
  #
10
- # @return [Trycourier::Models::TopicPreference]
11
- required :topic, -> { Trycourier::TopicPreference }
10
+ # @return [Trycourier::Models::Users::TopicPreference]
11
+ required :topic, -> { Trycourier::Users::TopicPreference }
12
12
 
13
13
  # @!method initialize(topic:)
14
- # @param topic [Trycourier::Models::TopicPreference]
14
+ # @param topic [Trycourier::Models::Users::TopicPreference]
15
15
  end
16
16
  end
17
17
  end
@@ -4,7 +4,7 @@ module Trycourier
4
4
  module Models
5
5
  module Users
6
6
  # @see Trycourier::Resources::Users::Tokens#add_single
7
- class TokenAddSingleParams < Trycourier::Models::UserToken
7
+ class TokenAddSingleParams < Trycourier::Models::Users::UserToken
8
8
  extend Trycourier::Internal::Type::RequestParameters::Converter
9
9
  include Trycourier::Internal::Type::RequestParameters
10
10
 
@@ -4,7 +4,7 @@ module Trycourier
4
4
  module Models
5
5
  module Users
6
6
  # @type [Trycourier::Internal::Type::Converter]
7
- TokenListResponse = Trycourier::Internal::Type::ArrayOf[-> { Trycourier::UserToken }]
7
+ TokenListResponse = Trycourier::Internal::Type::ArrayOf[-> { Trycourier::Users::UserToken }]
8
8
  end
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ module Trycourier
4
4
  module Models
5
5
  module Users
6
6
  # @see Trycourier::Resources::Users::Tokens#retrieve
7
- class TokenRetrieveResponse < Trycourier::Models::UserToken
7
+ class TokenRetrieveResponse < Trycourier::Models::Users::UserToken
8
8
  # @!attribute status
9
9
  #
10
10
  # @return [Symbol, Trycourier::Models::Users::TokenRetrieveResponse::Status, nil]
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ module Users
6
+ class TopicPreference < Trycourier::Internal::Type::BaseModel
7
+ # @!attribute default_status
8
+ #
9
+ # @return [Symbol, Trycourier::Models::PreferenceStatus]
10
+ required :default_status, enum: -> { Trycourier::PreferenceStatus }
11
+
12
+ # @!attribute status
13
+ #
14
+ # @return [Symbol, Trycourier::Models::PreferenceStatus]
15
+ required :status, enum: -> { Trycourier::PreferenceStatus }
16
+
17
+ # @!attribute topic_id
18
+ #
19
+ # @return [String]
20
+ required :topic_id, String
21
+
22
+ # @!attribute topic_name
23
+ #
24
+ # @return [String]
25
+ required :topic_name, String
26
+
27
+ # @!attribute custom_routing
28
+ # The Channels a user has chosen to receive notifications through for this topic
29
+ #
30
+ # @return [Array<Symbol, Trycourier::Models::ChannelClassification>, nil]
31
+ optional :custom_routing,
32
+ -> { Trycourier::Internal::Type::ArrayOf[enum: Trycourier::ChannelClassification] },
33
+ nil?: true
34
+
35
+ # @!attribute has_custom_routing
36
+ #
37
+ # @return [Boolean, nil]
38
+ optional :has_custom_routing, Trycourier::Internal::Type::Boolean, nil?: true
39
+
40
+ # @!method initialize(default_status:, status:, topic_id:, topic_name:, custom_routing: nil, has_custom_routing: nil)
41
+ # @param default_status [Symbol, Trycourier::Models::PreferenceStatus]
42
+ #
43
+ # @param status [Symbol, Trycourier::Models::PreferenceStatus]
44
+ #
45
+ # @param topic_id [String]
46
+ #
47
+ # @param topic_name [String]
48
+ #
49
+ # @param custom_routing [Array<Symbol, Trycourier::Models::ChannelClassification>, nil] The Channels a user has chosen to receive notifications through for this topic
50
+ #
51
+ # @param has_custom_routing [Boolean, nil]
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,183 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ module Users
6
+ class UserToken < Trycourier::Internal::Type::BaseModel
7
+ # @!attribute provider_key
8
+ #
9
+ # @return [Symbol, Trycourier::Models::Users::UserToken::ProviderKey]
10
+ required :provider_key, enum: -> { Trycourier::Users::UserToken::ProviderKey }
11
+
12
+ # @!attribute token
13
+ # Full body of the token. Must match token in URL.
14
+ #
15
+ # @return [String, nil]
16
+ optional :token, String, nil?: true
17
+
18
+ # @!attribute device
19
+ # Information about the device the token is associated with.
20
+ #
21
+ # @return [Trycourier::Models::Users::UserToken::Device, nil]
22
+ optional :device, -> { Trycourier::Users::UserToken::Device }, nil?: true
23
+
24
+ # @!attribute expiry_date
25
+ # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
26
+ # disable expiration.
27
+ #
28
+ # @return [String, Boolean, nil]
29
+ optional :expiry_date, union: -> { Trycourier::Users::UserToken::ExpiryDate }, nil?: true
30
+
31
+ # @!attribute properties
32
+ # Properties sent to the provider along with the token
33
+ #
34
+ # @return [Object, nil]
35
+ optional :properties, Trycourier::Internal::Type::Unknown
36
+
37
+ # @!attribute tracking
38
+ # Information about the device the token is associated with.
39
+ #
40
+ # @return [Trycourier::Models::Users::UserToken::Tracking, nil]
41
+ optional :tracking, -> { Trycourier::Users::UserToken::Tracking }, nil?: true
42
+
43
+ # @!method initialize(provider_key:, token: nil, device: nil, expiry_date: nil, properties: nil, tracking: nil)
44
+ # Some parameter documentations has been truncated, see
45
+ # {Trycourier::Models::Users::UserToken} for more details.
46
+ #
47
+ # @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey]
48
+ #
49
+ # @param token [String, nil] Full body of the token. Must match token in URL.
50
+ #
51
+ # @param device [Trycourier::Models::Users::UserToken::Device, nil] Information about the device the token is associated with.
52
+ #
53
+ # @param expiry_date [String, Boolean, nil] ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
54
+ #
55
+ # @param properties [Object] Properties sent to the provider along with the token
56
+ #
57
+ # @param tracking [Trycourier::Models::Users::UserToken::Tracking, nil] Information about the device the token is associated with.
58
+
59
+ # @see Trycourier::Models::Users::UserToken#provider_key
60
+ module ProviderKey
61
+ extend Trycourier::Internal::Type::Enum
62
+
63
+ FIREBASE_FCM = :"firebase-fcm"
64
+ APN = :apn
65
+ EXPO = :expo
66
+ ONESIGNAL = :onesignal
67
+
68
+ # @!method self.values
69
+ # @return [Array<Symbol>]
70
+ end
71
+
72
+ # @see Trycourier::Models::Users::UserToken#device
73
+ class Device < Trycourier::Internal::Type::BaseModel
74
+ # @!attribute ad_id
75
+ # Id of the advertising identifier
76
+ #
77
+ # @return [String, nil]
78
+ optional :ad_id, String, nil?: true
79
+
80
+ # @!attribute app_id
81
+ # Id of the application the token is used for
82
+ #
83
+ # @return [String, nil]
84
+ optional :app_id, String, nil?: true
85
+
86
+ # @!attribute device_id
87
+ # Id of the device the token is associated with
88
+ #
89
+ # @return [String, nil]
90
+ optional :device_id, String, nil?: true
91
+
92
+ # @!attribute manufacturer
93
+ # The device manufacturer
94
+ #
95
+ # @return [String, nil]
96
+ optional :manufacturer, String, nil?: true
97
+
98
+ # @!attribute model
99
+ # The device model
100
+ #
101
+ # @return [String, nil]
102
+ optional :model, String, nil?: true
103
+
104
+ # @!attribute platform
105
+ # The device platform i.e. android, ios, web
106
+ #
107
+ # @return [String, nil]
108
+ optional :platform, String, nil?: true
109
+
110
+ # @!method initialize(ad_id: nil, app_id: nil, device_id: nil, manufacturer: nil, model: nil, platform: nil)
111
+ # Information about the device the token is associated with.
112
+ #
113
+ # @param ad_id [String, nil] Id of the advertising identifier
114
+ #
115
+ # @param app_id [String, nil] Id of the application the token is used for
116
+ #
117
+ # @param device_id [String, nil] Id of the device the token is associated with
118
+ #
119
+ # @param manufacturer [String, nil] The device manufacturer
120
+ #
121
+ # @param model [String, nil] The device model
122
+ #
123
+ # @param platform [String, nil] The device platform i.e. android, ios, web
124
+ end
125
+
126
+ # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
127
+ # disable expiration.
128
+ #
129
+ # @see Trycourier::Models::Users::UserToken#expiry_date
130
+ module ExpiryDate
131
+ extend Trycourier::Internal::Type::Union
132
+
133
+ variant String
134
+
135
+ variant Trycourier::Internal::Type::Boolean
136
+
137
+ # @!method self.variants
138
+ # @return [Array(String, Boolean)]
139
+ end
140
+
141
+ # @see Trycourier::Models::Users::UserToken#tracking
142
+ class Tracking < Trycourier::Internal::Type::BaseModel
143
+ # @!attribute ip
144
+ # The IP address of the device
145
+ #
146
+ # @return [String, nil]
147
+ optional :ip, String, nil?: true
148
+
149
+ # @!attribute lat
150
+ # The latitude of the device
151
+ #
152
+ # @return [String, nil]
153
+ optional :lat, String, nil?: true
154
+
155
+ # @!attribute long
156
+ # The longitude of the device
157
+ #
158
+ # @return [String, nil]
159
+ optional :long, String, nil?: true
160
+
161
+ # @!attribute os_version
162
+ # The operating system version
163
+ #
164
+ # @return [String, nil]
165
+ optional :os_version, String, nil?: true
166
+
167
+ # @!method initialize(ip: nil, lat: nil, long: nil, os_version: nil)
168
+ # Information about the device the token is associated with.
169
+ #
170
+ # @param ip [String, nil] The IP address of the device
171
+ #
172
+ # @param lat [String, nil] The latitude of the device
173
+ #
174
+ # @param long [String, nil] The longitude of the device
175
+ #
176
+ # @param os_version [String, nil] The operating system version
177
+ end
178
+ end
179
+ end
180
+
181
+ UserToken = Users::UserToken
182
+ end
183
+ end
@@ -251,8 +251,6 @@ module Trycourier
251
251
 
252
252
  TextStyle = Trycourier::Models::TextStyle
253
253
 
254
- TopicPreference = Trycourier::Models::TopicPreference
255
-
256
254
  TranslationRetrieveParams = Trycourier::Models::TranslationRetrieveParams
257
255
 
258
256
  TranslationUpdateParams = Trycourier::Models::TranslationUpdateParams
@@ -261,8 +259,6 @@ module Trycourier
261
259
 
262
260
  Users = Trycourier::Models::Users
263
261
 
264
- UserToken = Trycourier::Models::UserToken
265
-
266
262
  Utm = Trycourier::Models::Utm
267
263
 
268
264
  WidgetBackground = Trycourier::Models::WidgetBackground
@@ -69,14 +69,14 @@ module Trycourier
69
69
  #
70
70
  # @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
71
71
  #
72
- # @return [Array<Trycourier::Models::UserToken>]
72
+ # @return [Array<Trycourier::Models::Users::UserToken>]
73
73
  #
74
74
  # @see Trycourier::Models::Users::TokenListParams
75
75
  def list(user_id, params = {})
76
76
  @client.request(
77
77
  method: :get,
78
78
  path: ["users/%1$s/tokens", user_id],
79
- model: Trycourier::Internal::Type::ArrayOf[Trycourier::UserToken],
79
+ model: Trycourier::Internal::Type::ArrayOf[Trycourier::Users::UserToken],
80
80
  options: params[:request_options]
81
81
  )
82
82
  end
@@ -139,17 +139,17 @@ module Trycourier
139
139
  #
140
140
  # @param user_id [String] Path param: The user's ID. This can be any uniquely identifiable string.
141
141
  #
142
- # @param provider_key [Symbol, Trycourier::Models::UserToken::ProviderKey] Body param:
142
+ # @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey] Body param:
143
143
  #
144
144
  # @param body_token [String, nil] Body param: Full body of the token. Must match token in URL.
145
145
  #
146
- # @param device [Trycourier::Models::UserToken::Device, nil] Body param: Information about the device the token is associated with.
146
+ # @param device [Trycourier::Models::Users::UserToken::Device, nil] Body param: Information about the device the token is associated with.
147
147
  #
148
148
  # @param expiry_date [String, Boolean, nil] Body param: ISO 8601 formatted date the token expires. Defaults to 2 months. Set
149
149
  #
150
150
  # @param properties [Object] Body param: Properties sent to the provider along with the token
151
151
  #
152
- # @param tracking [Trycourier::Models::UserToken::Tracking, nil] Body param: Information about the device the token is associated with.
152
+ # @param tracking [Trycourier::Models::Users::UserToken::Tracking, nil] Body param: Information about the device the token is associated with.
153
153
  #
154
154
  # @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
155
155
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Trycourier
4
- VERSION = "3.4.0.pre.alpha3"
4
+ VERSION = "3.4.0.pre.alpha5"
5
5
  end
data/lib/trycourier.rb CHANGED
@@ -58,7 +58,7 @@ require_relative "trycourier/models/subscription_topic_new"
58
58
  require_relative "trycourier/models/elemental_channel_node"
59
59
  require_relative "trycourier/models/message_details"
60
60
  require_relative "trycourier/models/base_template_tenant_association"
61
- require_relative "trycourier/models/user_token"
61
+ require_relative "trycourier/models/users/user_token"
62
62
  require_relative "trycourier/models/alignment"
63
63
  require_relative "trycourier/models/audience"
64
64
  require_relative "trycourier/models/audience_delete_params"
@@ -199,7 +199,6 @@ require_relative "trycourier/models/tenants/tenant_default_preferences/item_dele
199
199
  require_relative "trycourier/models/tenants/tenant_default_preferences/item_update_params"
200
200
  require_relative "trycourier/models/tenant_update_params"
201
201
  require_relative "trycourier/models/text_style"
202
- require_relative "trycourier/models/topic_preference"
203
202
  require_relative "trycourier/models/translation_retrieve_params"
204
203
  require_relative "trycourier/models/translation_retrieve_response"
205
204
  require_relative "trycourier/models/translation_update_params"
@@ -224,6 +223,7 @@ require_relative "trycourier/models/users/token_list_response"
224
223
  require_relative "trycourier/models/users/token_retrieve_params"
225
224
  require_relative "trycourier/models/users/token_retrieve_response"
226
225
  require_relative "trycourier/models/users/token_update_params"
226
+ require_relative "trycourier/models/users/topic_preference"
227
227
  require_relative "trycourier/models/utm"
228
228
  require_relative "trycourier/models/widget_background"
229
229
  require_relative "trycourier/models"
@@ -13,7 +13,7 @@ module Trycourier
13
13
  end
14
14
 
15
15
  # The Preferences associated with the user_id.
16
- sig { returns(T::Array[Trycourier::TopicPreference]) }
16
+ sig { returns(T::Array[Trycourier::Users::TopicPreference]) }
17
17
  attr_accessor :items
18
18
 
19
19
  # Deprecated - Paging not implemented on this endpoint
@@ -25,7 +25,7 @@ module Trycourier
25
25
 
26
26
  sig do
27
27
  params(
28
- items: T::Array[Trycourier::TopicPreference::OrHash],
28
+ items: T::Array[Trycourier::Users::TopicPreference::OrHash],
29
29
  paging: Trycourier::Paging::OrHash
30
30
  ).returns(T.attached_class)
31
31
  end
@@ -40,7 +40,7 @@ module Trycourier
40
40
  sig do
41
41
  override.returns(
42
42
  {
43
- items: T::Array[Trycourier::TopicPreference],
43
+ items: T::Array[Trycourier::Users::TopicPreference],
44
44
  paging: Trycourier::Paging
45
45
  }
46
46
  )
@@ -12,21 +12,21 @@ module Trycourier
12
12
  )
13
13
  end
14
14
 
15
- sig { returns(Trycourier::TopicPreference) }
15
+ sig { returns(Trycourier::Users::TopicPreference) }
16
16
  attr_reader :topic
17
17
 
18
- sig { params(topic: Trycourier::TopicPreference::OrHash).void }
18
+ sig { params(topic: Trycourier::Users::TopicPreference::OrHash).void }
19
19
  attr_writer :topic
20
20
 
21
21
  sig do
22
- params(topic: Trycourier::TopicPreference::OrHash).returns(
22
+ params(topic: Trycourier::Users::TopicPreference::OrHash).returns(
23
23
  T.attached_class
24
24
  )
25
25
  end
26
26
  def self.new(topic:)
27
27
  end
28
28
 
29
- sig { override.returns({ topic: Trycourier::TopicPreference }) }
29
+ sig { override.returns({ topic: Trycourier::Users::TopicPreference }) }
30
30
  def to_hash
31
31
  end
32
32
  end
@@ -3,7 +3,7 @@
3
3
  module Trycourier
4
4
  module Models
5
5
  module Users
6
- class TokenAddSingleParams < Trycourier::Models::UserToken
6
+ class TokenAddSingleParams < Trycourier::Models::Users::UserToken
7
7
  extend Trycourier::Internal::Type::RequestParameters::Converter
8
8
  include Trycourier::Internal::Type::RequestParameters
9
9
 
@@ -5,7 +5,7 @@ module Trycourier
5
5
  module Users
6
6
  TokenListResponse =
7
7
  T.let(
8
- Trycourier::Internal::Type::ArrayOf[Trycourier::UserToken],
8
+ Trycourier::Internal::Type::ArrayOf[Trycourier::Users::UserToken],
9
9
  Trycourier::Internal::Type::Converter
10
10
  )
11
11
  end
@@ -3,7 +3,7 @@
3
3
  module Trycourier
4
4
  module Models
5
5
  module Users
6
- class TokenRetrieveResponse < Trycourier::Models::UserToken
6
+ class TokenRetrieveResponse < Trycourier::Models::Users::UserToken
7
7
  OrHash =
8
8
  T.type_alias do
9
9
  T.any(