trycourier 3.4.0.pre.alpha8 → 4.0.0

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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +3 -3
  4. data/lib/trycourier/models/recipient.rb +9 -1
  5. data/lib/trycourier/models/tenants/{tenant_default_preferences → preferences}/item_delete_params.rb +2 -2
  6. data/lib/trycourier/models/tenants/{tenant_default_preferences → preferences}/item_update_params.rb +2 -2
  7. data/lib/trycourier/models/user_recipient.rb +9 -1
  8. data/lib/trycourier/models/users/user_token.rb +17 -17
  9. data/lib/trycourier/resources/tenants/{tenant_default_preferences → preferences}/items.rb +6 -7
  10. data/lib/trycourier/resources/tenants/{tenant_default_preferences.rb → preferences.rb} +3 -3
  11. data/lib/trycourier/resources/tenants.rb +3 -4
  12. data/lib/trycourier/resources/users/tokens.rb +6 -6
  13. data/lib/trycourier/version.rb +1 -1
  14. data/lib/trycourier.rb +4 -4
  15. data/rbi/trycourier/models/recipient.rbi +8 -0
  16. data/rbi/trycourier/models/tenants/{tenant_default_preferences → preferences}/item_delete_params.rbi +2 -2
  17. data/rbi/trycourier/models/tenants/{tenant_default_preferences → preferences}/item_update_params.rbi +2 -2
  18. data/rbi/trycourier/models/user_recipient.rbi +8 -0
  19. data/rbi/trycourier/models/users/user_token.rbi +16 -16
  20. data/rbi/trycourier/resources/tenants/{tenant_default_preferences → preferences}/items.rbi +1 -1
  21. data/rbi/trycourier/resources/tenants/{tenant_default_preferences.rbi → preferences.rbi} +2 -6
  22. data/rbi/trycourier/resources/tenants.rbi +2 -2
  23. data/rbi/trycourier/resources/users/tokens.rbi +6 -6
  24. data/sig/trycourier/models/recipient.rbs +5 -0
  25. data/sig/trycourier/models/tenants/{tenant_default_preferences → preferences}/item_delete_params.rbs +1 -1
  26. data/sig/trycourier/models/tenants/{tenant_default_preferences → preferences}/item_update_params.rbs +1 -1
  27. data/sig/trycourier/models/user_recipient.rbs +5 -0
  28. data/sig/trycourier/models/users/user_token.rbs +5 -5
  29. data/sig/trycourier/resources/tenants/{tenant_default_preferences → preferences}/items.rbs +1 -1
  30. data/sig/trycourier/resources/tenants/{tenant_default_preferences.rbs → preferences.rbs} +2 -2
  31. data/sig/trycourier/resources/tenants.rbs +1 -1
  32. data/sig/trycourier/resources/users/tokens.rbs +1 -1
  33. metadata +16 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c24857f2fe7b863b581727fb9b2526d2a977e8efd507b366a9b51488c7c28994
4
- data.tar.gz: 0f34f6666d7a0efb91e8b558e4a27b00845b5d2cc2e3d1dc1415d78bf8667993
3
+ metadata.gz: ea2404c89e513c6edbd7266b26273fc582d30ba791ad01c6302c69fa617d9056
4
+ data.tar.gz: 779e524afaab09c6ce8ad61f16f7df393e43c37700e115e4e1ea09f68c494a6e
5
5
  SHA512:
6
- metadata.gz: e7f54fefd82a6e8546aff83ea4cfeedd3ed10bc70c0a34dd58b0313b443038cb4d10319f5f0e2fb69f32f95686fc10e900e435847ae70092b1442f4971769d62
7
- data.tar.gz: 6eb225d37b38405d5a2e7e726d00a08e53dc5f5a411e545ff16bd59a11d1863ac4103c9f05ca380befbbdf7f5f04a3fd6ce232f43920d493c000a0fa552c6640
6
+ metadata.gz: 2a7b4546cb947275415973788acb30e65c80921f3d188f2d0ecd7040236d79bab868f7fb27376893632196cb4144c78e86ab5bbc25284c2efd764e99aa6ec333
7
+ data.tar.gz: 191e3e880ed1fe9a6fc2c402f1f0afef8193fe60f0a1a8f68df3247ff83aafc8210bfa0a8daf49715e8544f4d9dedd47c058615fec3eca59cb83d35c101653f3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.0 (2025-11-12)
4
+
5
+ Full Changelog: [v3.4.0-alpha9...v4.0.0](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha9...v4.0.0)
6
+
7
+ ### Features
8
+
9
+ * Spec Comment Change ([b567eac](https://github.com/trycourier/courier-ruby/commit/b567eac8556068aa9fea18a1882330e741dda479))
10
+ * Token Prop Description Change ([cb884a1](https://github.com/trycourier/courier-ruby/commit/cb884a1830d2abaf81db27b14c60725c5792f0fa))
11
+
12
+
13
+ ### Chores
14
+
15
+ * update SDK settings ([3ad8ff3](https://github.com/trycourier/courier-ruby/commit/3ad8ff378645ccd3ecdf5a3b64ccfd8694901c67))
16
+
17
+ ## 3.4.0-alpha9 (2025-11-07)
18
+
19
+ Full Changelog: [v3.4.0-alpha8...v3.4.0-alpha9](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha8...v3.4.0-alpha9)
20
+
21
+ ### Bug Fixes
22
+
23
+ * Better Python Samples + Updates to naming ([1d8cd06](https://github.com/trycourier/courier-ruby/commit/1d8cd06d373fa53e940cd05d26ce24005ef93955))
24
+
3
25
  ## 3.4.0-alpha8 (2025-11-05)
4
26
 
5
27
  Full Changelog: [v3.4.0-alpha7...v3.4.0-alpha8](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha7...v3.4.0-alpha8)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "trycourier", "~> 3.4.0.pre.alpha8"
20
+ gem "trycourier", "~> 4.0.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -232,13 +232,13 @@ Enum parameters have a "relaxed" type, so you can either pass in enum constants
232
232
 
233
233
  ```ruby
234
234
  # Using the enum constants preserves the tagged type information:
235
- courier.tenants.tenant_default_preferences.items.update(
235
+ courier.tenants.preferences.items.update(
236
236
  status: Trycourier::SubscriptionTopicNew::Status::OPTED_OUT,
237
237
  # …
238
238
  )
239
239
 
240
240
  # Literal values are also permissible:
241
- courier.tenants.tenant_default_preferences.items.update(
241
+ courier.tenants.preferences.items.update(
242
242
  status: :OPTED_OUT,
243
243
  # …
244
244
  )
@@ -26,6 +26,12 @@ module Trycourier
26
26
  # @return [String, nil]
27
27
  optional :email, String, nil?: true
28
28
 
29
+ # @!attribute list_id
30
+ # The id of the list to send the message to.
31
+ #
32
+ # @return [String, nil]
33
+ optional :list_id, String, nil?: true
34
+
29
35
  # @!attribute locale
30
36
  # The user's preferred ISO 639-1 language code.
31
37
  #
@@ -56,7 +62,7 @@ module Trycourier
56
62
  # @return [String, nil]
57
63
  optional :user_id, String, nil?: true
58
64
 
59
- # @!method initialize(account_id: nil, context: nil, data: nil, email: nil, locale: nil, phone_number: nil, preferences: nil, tenant_id: nil, user_id: nil)
65
+ # @!method initialize(account_id: nil, context: nil, data: nil, email: nil, list_id: nil, locale: nil, phone_number: nil, preferences: nil, tenant_id: nil, user_id: nil)
60
66
  # Some parameter documentations has been truncated, see
61
67
  # {Trycourier::Models::Recipient} for more details.
62
68
  #
@@ -68,6 +74,8 @@ module Trycourier
68
74
  #
69
75
  # @param email [String, nil] The user's email address.
70
76
  #
77
+ # @param list_id [String, nil] The id of the list to send the message to.
78
+ #
71
79
  # @param locale [String, nil] The user's preferred ISO 639-1 language code.
72
80
  #
73
81
  # @param phone_number [String, nil] The user's phone number.
@@ -3,8 +3,8 @@
3
3
  module Trycourier
4
4
  module Models
5
5
  module Tenants
6
- module TenantDefaultPreferences
7
- # @see Trycourier::Resources::Tenants::TenantDefaultPreferences::Items#delete
6
+ module Preferences
7
+ # @see Trycourier::Resources::Tenants::Preferences::Items#delete
8
8
  class ItemDeleteParams < Trycourier::Internal::Type::BaseModel
9
9
  extend Trycourier::Internal::Type::RequestParameters::Converter
10
10
  include Trycourier::Internal::Type::RequestParameters
@@ -3,8 +3,8 @@
3
3
  module Trycourier
4
4
  module Models
5
5
  module Tenants
6
- module TenantDefaultPreferences
7
- # @see Trycourier::Resources::Tenants::TenantDefaultPreferences::Items#update
6
+ module Preferences
7
+ # @see Trycourier::Resources::Tenants::Preferences::Items#update
8
8
  class ItemUpdateParams < Trycourier::Models::SubscriptionTopicNew
9
9
  extend Trycourier::Internal::Type::RequestParameters::Converter
10
10
  include Trycourier::Internal::Type::RequestParameters
@@ -26,6 +26,12 @@ module Trycourier
26
26
  # @return [String, nil]
27
27
  optional :email, String, nil?: true
28
28
 
29
+ # @!attribute list_id
30
+ # The id of the list to send the message to.
31
+ #
32
+ # @return [String, nil]
33
+ optional :list_id, String, nil?: true
34
+
29
35
  # @!attribute locale
30
36
  # The user's preferred ISO 639-1 language code.
31
37
  #
@@ -56,7 +62,7 @@ module Trycourier
56
62
  # @return [String, nil]
57
63
  optional :user_id, String, nil?: true
58
64
 
59
- # @!method initialize(account_id: nil, context: nil, data: nil, email: nil, locale: nil, phone_number: nil, preferences: nil, tenant_id: nil, user_id: nil)
65
+ # @!method initialize(account_id: nil, context: nil, data: nil, email: nil, list_id: nil, locale: nil, phone_number: nil, preferences: nil, tenant_id: nil, user_id: nil)
60
66
  # Some parameter documentations has been truncated, see
61
67
  # {Trycourier::Models::UserRecipient} for more details.
62
68
  #
@@ -68,6 +74,8 @@ module Trycourier
68
74
  #
69
75
  # @param email [String, nil] The user's email address.
70
76
  #
77
+ # @param list_id [String, nil] The id of the list to send the message to.
78
+ #
71
79
  # @param locale [String, nil] The user's preferred ISO 639-1 language code.
72
80
  #
73
81
  # @param phone_number [String, nil] The user's phone number.
@@ -4,19 +4,19 @@ module Trycourier
4
4
  module Models
5
5
  module Users
6
6
  class UserToken < Trycourier::Internal::Type::BaseModel
7
+ # @!attribute token
8
+ # Full body of the token. Must match token in URL path parameter.
9
+ #
10
+ # @return [String]
11
+ required :token, String
12
+
7
13
  # @!attribute provider_key
8
14
  #
9
15
  # @return [Symbol, Trycourier::Models::Users::UserToken::ProviderKey]
10
16
  required :provider_key, enum: -> { Trycourier::Users::UserToken::ProviderKey }
11
17
 
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
18
  # @!attribute device
19
- # Information about the device the token is associated with.
19
+ # Information about the device the token came from.
20
20
  #
21
21
  # @return [Trycourier::Models::Users::UserToken::Device, nil]
22
22
  optional :device, -> { Trycourier::Users::UserToken::Device }, nil?: true
@@ -29,32 +29,32 @@ module Trycourier
29
29
  optional :expiry_date, union: -> { Trycourier::Users::UserToken::ExpiryDate }, nil?: true
30
30
 
31
31
  # @!attribute properties
32
- # Properties sent to the provider along with the token
32
+ # Properties about the token.
33
33
  #
34
34
  # @return [Object, nil]
35
35
  optional :properties, Trycourier::Internal::Type::Unknown
36
36
 
37
37
  # @!attribute tracking
38
- # Information about the device the token is associated with.
38
+ # Tracking information about the device the token came from.
39
39
  #
40
40
  # @return [Trycourier::Models::Users::UserToken::Tracking, nil]
41
41
  optional :tracking, -> { Trycourier::Users::UserToken::Tracking }, nil?: true
42
42
 
43
- # @!method initialize(provider_key:, token: nil, device: nil, expiry_date: nil, properties: nil, tracking: nil)
43
+ # @!method initialize(token:, provider_key:, device: nil, expiry_date: nil, properties: nil, tracking: nil)
44
44
  # Some parameter documentations has been truncated, see
45
45
  # {Trycourier::Models::Users::UserToken} for more details.
46
46
  #
47
- # @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey]
47
+ # @param token [String] Full body of the token. Must match token in URL path parameter.
48
48
  #
49
- # @param token [String, nil] Full body of the token. Must match token in URL.
49
+ # @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey]
50
50
  #
51
- # @param device [Trycourier::Models::Users::UserToken::Device, nil] Information about the device the token is associated with.
51
+ # @param device [Trycourier::Models::Users::UserToken::Device, nil] Information about the device the token came from.
52
52
  #
53
53
  # @param expiry_date [String, Boolean, nil] ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
54
54
  #
55
- # @param properties [Object] Properties sent to the provider along with the token
55
+ # @param properties [Object] Properties about the token.
56
56
  #
57
- # @param tracking [Trycourier::Models::Users::UserToken::Tracking, nil] Information about the device the token is associated with.
57
+ # @param tracking [Trycourier::Models::Users::UserToken::Tracking, nil] Tracking information about the device the token came from.
58
58
 
59
59
  # @see Trycourier::Models::Users::UserToken#provider_key
60
60
  module ProviderKey
@@ -108,7 +108,7 @@ module Trycourier
108
108
  optional :platform, String, nil?: true
109
109
 
110
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.
111
+ # Information about the device the token came from.
112
112
  #
113
113
  # @param ad_id [String, nil] Id of the advertising identifier
114
114
  #
@@ -165,7 +165,7 @@ module Trycourier
165
165
  optional :os_version, String, nil?: true
166
166
 
167
167
  # @!method initialize(ip: nil, lat: nil, long: nil, os_version: nil)
168
- # Information about the device the token is associated with.
168
+ # Tracking information about the device the token came from.
169
169
  #
170
170
  # @param ip [String, nil] The IP address of the device
171
171
  #
@@ -3,11 +3,10 @@
3
3
  module Trycourier
4
4
  module Resources
5
5
  class Tenants
6
- class TenantDefaultPreferences
6
+ class Preferences
7
7
  class Items
8
8
  # Some parameter documentations has been truncated, see
9
- # {Trycourier::Models::Tenants::TenantDefaultPreferences::ItemUpdateParams} for
10
- # more details.
9
+ # {Trycourier::Models::Tenants::Preferences::ItemUpdateParams} for more details.
11
10
  #
12
11
  # Create or Replace Default Preferences For Topic
13
12
  #
@@ -27,9 +26,9 @@ module Trycourier
27
26
  #
28
27
  # @return [nil]
29
28
  #
30
- # @see Trycourier::Models::Tenants::TenantDefaultPreferences::ItemUpdateParams
29
+ # @see Trycourier::Models::Tenants::Preferences::ItemUpdateParams
31
30
  def update(topic_id, params)
32
- parsed, options = Trycourier::Tenants::TenantDefaultPreferences::ItemUpdateParams.dump_request(params)
31
+ parsed, options = Trycourier::Tenants::Preferences::ItemUpdateParams.dump_request(params)
33
32
  tenant_id =
34
33
  parsed.delete(:tenant_id) do
35
34
  raise ArgumentError.new("missing required path argument #{_1}")
@@ -55,9 +54,9 @@ module Trycourier
55
54
  #
56
55
  # @return [nil]
57
56
  #
58
- # @see Trycourier::Models::Tenants::TenantDefaultPreferences::ItemDeleteParams
57
+ # @see Trycourier::Models::Tenants::Preferences::ItemDeleteParams
59
58
  def delete(topic_id, params)
60
- parsed, options = Trycourier::Tenants::TenantDefaultPreferences::ItemDeleteParams.dump_request(params)
59
+ parsed, options = Trycourier::Tenants::Preferences::ItemDeleteParams.dump_request(params)
61
60
  tenant_id =
62
61
  parsed.delete(:tenant_id) do
63
62
  raise ArgumentError.new("missing required path argument #{_1}")
@@ -3,8 +3,8 @@
3
3
  module Trycourier
4
4
  module Resources
5
5
  class Tenants
6
- class TenantDefaultPreferences
7
- # @return [Trycourier::Resources::Tenants::TenantDefaultPreferences::Items]
6
+ class Preferences
7
+ # @return [Trycourier::Resources::Tenants::Preferences::Items]
8
8
  attr_reader :items
9
9
 
10
10
  # @api private
@@ -12,7 +12,7 @@ module Trycourier
12
12
  # @param client [Trycourier::Client]
13
13
  def initialize(client:)
14
14
  @client = client
15
- @items = Trycourier::Resources::Tenants::TenantDefaultPreferences::Items.new(client: client)
15
+ @items = Trycourier::Resources::Tenants::Preferences::Items.new(client: client)
16
16
  end
17
17
  end
18
18
  end
@@ -3,8 +3,8 @@
3
3
  module Trycourier
4
4
  module Resources
5
5
  class Tenants
6
- # @return [Trycourier::Resources::Tenants::TenantDefaultPreferences]
7
- attr_reader :tenant_default_preferences
6
+ # @return [Trycourier::Resources::Tenants::Preferences]
7
+ attr_reader :preferences
8
8
 
9
9
  # @return [Trycourier::Resources::Tenants::Templates]
10
10
  attr_reader :templates
@@ -149,8 +149,7 @@ module Trycourier
149
149
  # @param client [Trycourier::Client]
150
150
  def initialize(client:)
151
151
  @client = client
152
- @tenant_default_preferences =
153
- Trycourier::Resources::Tenants::TenantDefaultPreferences.new(client: client)
152
+ @preferences = Trycourier::Resources::Tenants::Preferences.new(client: client)
154
153
  @templates = Trycourier::Resources::Tenants::Templates.new(client: client)
155
154
  end
156
155
  end
@@ -133,23 +133,23 @@ module Trycourier
133
133
  #
134
134
  # Adds a single token to a user and overwrites a matching existing token.
135
135
  #
136
- # @overload add_single(path_token, user_id:, provider_key:, body_token: nil, device: nil, expiry_date: nil, properties: nil, tracking: nil, request_options: {})
136
+ # @overload add_single(path_token, user_id:, body_token:, provider_key:, device: nil, expiry_date: nil, properties: nil, tracking: nil, request_options: {})
137
137
  #
138
138
  # @param path_token [String] Path param: The full token string.
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::Users::UserToken::ProviderKey] Body param:
142
+ # @param body_token [String] Body param: Full body of the token. Must match token in URL path parameter.
143
143
  #
144
- # @param body_token [String, nil] Body param: Full body of the token. Must match token in URL.
144
+ # @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey] Body param:
145
145
  #
146
- # @param device [Trycourier::Models::Users::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 came from.
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
- # @param properties [Object] Body param: Properties sent to the provider along with the token
150
+ # @param properties [Object] Body param: Properties about the token.
151
151
  #
152
- # @param tracking [Trycourier::Models::Users::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: Tracking information about the device the token came from.
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.alpha8"
4
+ VERSION = "4.0.0"
5
5
  end
data/lib/trycourier.rb CHANGED
@@ -193,11 +193,11 @@ require_relative "trycourier/models/tenant_list_response"
193
193
  require_relative "trycourier/models/tenant_list_users_params"
194
194
  require_relative "trycourier/models/tenant_list_users_response"
195
195
  require_relative "trycourier/models/tenant_retrieve_params"
196
+ require_relative "trycourier/models/tenants/preferences/item_delete_params"
197
+ require_relative "trycourier/models/tenants/preferences/item_update_params"
196
198
  require_relative "trycourier/models/tenants/template_list_params"
197
199
  require_relative "trycourier/models/tenants/template_list_response"
198
200
  require_relative "trycourier/models/tenants/template_retrieve_params"
199
- require_relative "trycourier/models/tenants/tenant_default_preferences/item_delete_params"
200
- require_relative "trycourier/models/tenants/tenant_default_preferences/item_update_params"
201
201
  require_relative "trycourier/models/tenant_update_params"
202
202
  require_relative "trycourier/models/text_style"
203
203
  require_relative "trycourier/models/translation_retrieve_params"
@@ -247,9 +247,9 @@ require_relative "trycourier/resources/profiles/lists"
247
247
  require_relative "trycourier/resources/requests"
248
248
  require_relative "trycourier/resources/send"
249
249
  require_relative "trycourier/resources/tenants"
250
+ require_relative "trycourier/resources/tenants/preferences"
251
+ require_relative "trycourier/resources/tenants/preferences/items"
250
252
  require_relative "trycourier/resources/tenants/templates"
251
- require_relative "trycourier/resources/tenants/tenant_default_preferences"
252
- require_relative "trycourier/resources/tenants/tenant_default_preferences/items"
253
253
  require_relative "trycourier/resources/translations"
254
254
  require_relative "trycourier/resources/users"
255
255
  require_relative "trycourier/resources/users/preferences"
@@ -28,6 +28,10 @@ module Trycourier
28
28
  sig { returns(T.nilable(String)) }
29
29
  attr_accessor :email
30
30
 
31
+ # The id of the list to send the message to.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_accessor :list_id
34
+
31
35
  # The user's preferred ISO 639-1 language code.
32
36
  sig { returns(T.nilable(String)) }
33
37
  attr_accessor :locale
@@ -61,6 +65,7 @@ module Trycourier
61
65
  context: T.nilable(Trycourier::MessageContext::OrHash),
62
66
  data: T.nilable(T::Hash[Symbol, T.anything]),
63
67
  email: T.nilable(String),
68
+ list_id: T.nilable(String),
64
69
  locale: T.nilable(String),
65
70
  phone_number: T.nilable(String),
66
71
  preferences: T.nilable(Trycourier::Recipient::Preferences::OrHash),
@@ -76,6 +81,8 @@ module Trycourier
76
81
  data: nil,
77
82
  # The user's email address.
78
83
  email: nil,
84
+ # The id of the list to send the message to.
85
+ list_id: nil,
79
86
  # The user's preferred ISO 639-1 language code.
80
87
  locale: nil,
81
88
  # The user's phone number.
@@ -96,6 +103,7 @@ module Trycourier
96
103
  context: T.nilable(Trycourier::MessageContext),
97
104
  data: T.nilable(T::Hash[Symbol, T.anything]),
98
105
  email: T.nilable(String),
106
+ list_id: T.nilable(String),
99
107
  locale: T.nilable(String),
100
108
  phone_number: T.nilable(String),
101
109
  preferences: T.nilable(Trycourier::Recipient::Preferences),
@@ -3,7 +3,7 @@
3
3
  module Trycourier
4
4
  module Models
5
5
  module Tenants
6
- module TenantDefaultPreferences
6
+ module Preferences
7
7
  class ItemDeleteParams < Trycourier::Internal::Type::BaseModel
8
8
  extend Trycourier::Internal::Type::RequestParameters::Converter
9
9
  include Trycourier::Internal::Type::RequestParameters
@@ -11,7 +11,7 @@ module Trycourier
11
11
  OrHash =
12
12
  T.type_alias do
13
13
  T.any(
14
- Trycourier::Tenants::TenantDefaultPreferences::ItemDeleteParams,
14
+ Trycourier::Tenants::Preferences::ItemDeleteParams,
15
15
  Trycourier::Internal::AnyHash
16
16
  )
17
17
  end
@@ -3,7 +3,7 @@
3
3
  module Trycourier
4
4
  module Models
5
5
  module Tenants
6
- module TenantDefaultPreferences
6
+ module Preferences
7
7
  class ItemUpdateParams < Trycourier::Models::SubscriptionTopicNew
8
8
  extend Trycourier::Internal::Type::RequestParameters::Converter
9
9
  include Trycourier::Internal::Type::RequestParameters
@@ -11,7 +11,7 @@ module Trycourier
11
11
  OrHash =
12
12
  T.type_alias do
13
13
  T.any(
14
- Trycourier::Tenants::TenantDefaultPreferences::ItemUpdateParams,
14
+ Trycourier::Tenants::Preferences::ItemUpdateParams,
15
15
  Trycourier::Internal::AnyHash
16
16
  )
17
17
  end
@@ -28,6 +28,10 @@ module Trycourier
28
28
  sig { returns(T.nilable(String)) }
29
29
  attr_accessor :email
30
30
 
31
+ # The id of the list to send the message to.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_accessor :list_id
34
+
31
35
  # The user's preferred ISO 639-1 language code.
32
36
  sig { returns(T.nilable(String)) }
33
37
  attr_accessor :locale
@@ -61,6 +65,7 @@ module Trycourier
61
65
  context: T.nilable(Trycourier::MessageContext::OrHash),
62
66
  data: T.nilable(T::Hash[Symbol, T.anything]),
63
67
  email: T.nilable(String),
68
+ list_id: T.nilable(String),
64
69
  locale: T.nilable(String),
65
70
  phone_number: T.nilable(String),
66
71
  preferences:
@@ -77,6 +82,8 @@ module Trycourier
77
82
  data: nil,
78
83
  # The user's email address.
79
84
  email: nil,
85
+ # The id of the list to send the message to.
86
+ list_id: nil,
80
87
  # The user's preferred ISO 639-1 language code.
81
88
  locale: nil,
82
89
  # The user's phone number.
@@ -97,6 +104,7 @@ module Trycourier
97
104
  context: T.nilable(Trycourier::MessageContext),
98
105
  data: T.nilable(T::Hash[Symbol, T.anything]),
99
106
  email: T.nilable(String),
107
+ list_id: T.nilable(String),
100
108
  locale: T.nilable(String),
101
109
  phone_number: T.nilable(String),
102
110
  preferences: T.nilable(Trycourier::UserRecipient::Preferences),
@@ -11,14 +11,14 @@ module Trycourier
11
11
  T.any(Trycourier::Users::UserToken, Trycourier::Internal::AnyHash)
12
12
  end
13
13
 
14
+ # Full body of the token. Must match token in URL path parameter.
15
+ sig { returns(String) }
16
+ attr_accessor :token
17
+
14
18
  sig { returns(Trycourier::Users::UserToken::ProviderKey::TaggedSymbol) }
15
19
  attr_accessor :provider_key
16
20
 
17
- # Full body of the token. Must match token in URL.
18
- sig { returns(T.nilable(String)) }
19
- attr_accessor :token
20
-
21
- # Information about the device the token is associated with.
21
+ # Information about the device the token came from.
22
22
  sig { returns(T.nilable(Trycourier::Users::UserToken::Device)) }
23
23
  attr_reader :device
24
24
 
@@ -36,14 +36,14 @@ module Trycourier
36
36
  end
37
37
  attr_accessor :expiry_date
38
38
 
39
- # Properties sent to the provider along with the token
39
+ # Properties about the token.
40
40
  sig { returns(T.nilable(T.anything)) }
41
41
  attr_reader :properties
42
42
 
43
43
  sig { params(properties: T.anything).void }
44
44
  attr_writer :properties
45
45
 
46
- # Information about the device the token is associated with.
46
+ # Tracking information about the device the token came from.
47
47
  sig { returns(T.nilable(Trycourier::Users::UserToken::Tracking)) }
48
48
  attr_reader :tracking
49
49
 
@@ -56,8 +56,8 @@ module Trycourier
56
56
 
57
57
  sig do
58
58
  params(
59
+ token: String,
59
60
  provider_key: Trycourier::Users::UserToken::ProviderKey::OrSymbol,
60
- token: T.nilable(String),
61
61
  device: T.nilable(Trycourier::Users::UserToken::Device::OrHash),
62
62
  expiry_date:
63
63
  T.nilable(Trycourier::Users::UserToken::ExpiryDate::Variants),
@@ -66,17 +66,17 @@ module Trycourier
66
66
  ).returns(T.attached_class)
67
67
  end
68
68
  def self.new(
69
+ # Full body of the token. Must match token in URL path parameter.
70
+ token:,
69
71
  provider_key:,
70
- # Full body of the token. Must match token in URL.
71
- token: nil,
72
- # Information about the device the token is associated with.
72
+ # Information about the device the token came from.
73
73
  device: nil,
74
74
  # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
75
75
  # disable expiration.
76
76
  expiry_date: nil,
77
- # Properties sent to the provider along with the token
77
+ # Properties about the token.
78
78
  properties: nil,
79
- # Information about the device the token is associated with.
79
+ # Tracking information about the device the token came from.
80
80
  tracking: nil
81
81
  )
82
82
  end
@@ -84,9 +84,9 @@ module Trycourier
84
84
  sig do
85
85
  override.returns(
86
86
  {
87
+ token: String,
87
88
  provider_key:
88
89
  Trycourier::Users::UserToken::ProviderKey::TaggedSymbol,
89
- token: T.nilable(String),
90
90
  device: T.nilable(Trycourier::Users::UserToken::Device),
91
91
  expiry_date:
92
92
  T.nilable(Trycourier::Users::UserToken::ExpiryDate::Variants),
@@ -167,7 +167,7 @@ module Trycourier
167
167
  sig { returns(T.nilable(String)) }
168
168
  attr_accessor :platform
169
169
 
170
- # Information about the device the token is associated with.
170
+ # Information about the device the token came from.
171
171
  sig do
172
172
  params(
173
173
  ad_id: T.nilable(String),
@@ -251,7 +251,7 @@ module Trycourier
251
251
  sig { returns(T.nilable(String)) }
252
252
  attr_accessor :os_version
253
253
 
254
- # Information about the device the token is associated with.
254
+ # Tracking information about the device the token came from.
255
255
  sig do
256
256
  params(
257
257
  ip: T.nilable(String),
@@ -3,7 +3,7 @@
3
3
  module Trycourier
4
4
  module Resources
5
5
  class Tenants
6
- class TenantDefaultPreferences
6
+ class Preferences
7
7
  class Items
8
8
  # Create or Replace Default Preferences For Topic
9
9
  sig do
@@ -3,12 +3,8 @@
3
3
  module Trycourier
4
4
  module Resources
5
5
  class Tenants
6
- class TenantDefaultPreferences
7
- sig do
8
- returns(
9
- Trycourier::Resources::Tenants::TenantDefaultPreferences::Items
10
- )
11
- end
6
+ class Preferences
7
+ sig { returns(Trycourier::Resources::Tenants::Preferences::Items) }
12
8
  attr_reader :items
13
9
 
14
10
  # @api private
@@ -3,8 +3,8 @@
3
3
  module Trycourier
4
4
  module Resources
5
5
  class Tenants
6
- sig { returns(Trycourier::Resources::Tenants::TenantDefaultPreferences) }
7
- attr_reader :tenant_default_preferences
6
+ sig { returns(Trycourier::Resources::Tenants::Preferences) }
7
+ attr_reader :preferences
8
8
 
9
9
  sig { returns(Trycourier::Resources::Tenants::Templates) }
10
10
  attr_reader :templates
@@ -92,8 +92,8 @@ module Trycourier
92
92
  params(
93
93
  path_token: String,
94
94
  user_id: String,
95
+ body_token: String,
95
96
  provider_key: Trycourier::Users::UserToken::ProviderKey::OrSymbol,
96
- body_token: T.nilable(String),
97
97
  device: T.nilable(Trycourier::Users::UserToken::Device::OrHash),
98
98
  expiry_date:
99
99
  T.nilable(Trycourier::Users::UserToken::ExpiryDate::Variants),
@@ -107,18 +107,18 @@ module Trycourier
107
107
  path_token,
108
108
  # Path param: The user's ID. This can be any uniquely identifiable string.
109
109
  user_id:,
110
+ # Body param: Full body of the token. Must match token in URL path parameter.
111
+ body_token:,
110
112
  # Body param:
111
113
  provider_key:,
112
- # Body param: Full body of the token. Must match token in URL.
113
- body_token: nil,
114
- # Body param: Information about the device the token is associated with.
114
+ # Body param: Information about the device the token came from.
115
115
  device: nil,
116
116
  # Body param: ISO 8601 formatted date the token expires. Defaults to 2 months. Set
117
117
  # to false to disable expiration.
118
118
  expiry_date: nil,
119
- # Body param: Properties sent to the provider along with the token
119
+ # Body param: Properties about the token.
120
120
  properties: nil,
121
- # Body param: Information about the device the token is associated with.
121
+ # Body param: Tracking information about the device the token came from.
122
122
  tracking: nil,
123
123
  request_options: {}
124
124
  )
@@ -6,6 +6,7 @@ module Trycourier
6
6
  context: Trycourier::MessageContext?,
7
7
  data: ::Hash[Symbol, top]?,
8
8
  email: String?,
9
+ list_id: String?,
9
10
  locale: String?,
10
11
  phone_number: String?,
11
12
  preferences: Trycourier::Recipient::Preferences?,
@@ -22,6 +23,8 @@ module Trycourier
22
23
 
23
24
  attr_accessor email: String?
24
25
 
26
+ attr_accessor list_id: String?
27
+
25
28
  attr_accessor locale: String?
26
29
 
27
30
  attr_accessor phone_number: String?
@@ -37,6 +40,7 @@ module Trycourier
37
40
  ?context: Trycourier::MessageContext?,
38
41
  ?data: ::Hash[Symbol, top]?,
39
42
  ?email: String?,
43
+ ?list_id: String?,
40
44
  ?locale: String?,
41
45
  ?phone_number: String?,
42
46
  ?preferences: Trycourier::Recipient::Preferences?,
@@ -49,6 +53,7 @@ module Trycourier
49
53
  context: Trycourier::MessageContext?,
50
54
  data: ::Hash[Symbol, top]?,
51
55
  email: String?,
56
+ list_id: String?,
52
57
  locale: String?,
53
58
  phone_number: String?,
54
59
  preferences: Trycourier::Recipient::Preferences?,
@@ -1,7 +1,7 @@
1
1
  module Trycourier
2
2
  module Models
3
3
  module Tenants
4
- module TenantDefaultPreferences
4
+ module Preferences
5
5
  type item_delete_params =
6
6
  { tenant_id: String } & Trycourier::Internal::Type::request_parameters
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Trycourier
2
2
  module Models
3
3
  module Tenants
4
- module TenantDefaultPreferences
4
+ module Preferences
5
5
  type item_update_params =
6
6
  { tenant_id: String } & Trycourier::Internal::Type::request_parameters
7
7
 
@@ -6,6 +6,7 @@ module Trycourier
6
6
  context: Trycourier::MessageContext?,
7
7
  data: ::Hash[Symbol, top]?,
8
8
  email: String?,
9
+ list_id: String?,
9
10
  locale: String?,
10
11
  phone_number: String?,
11
12
  preferences: Trycourier::UserRecipient::Preferences?,
@@ -22,6 +23,8 @@ module Trycourier
22
23
 
23
24
  attr_accessor email: String?
24
25
 
26
+ attr_accessor list_id: String?
27
+
25
28
  attr_accessor locale: String?
26
29
 
27
30
  attr_accessor phone_number: String?
@@ -37,6 +40,7 @@ module Trycourier
37
40
  ?context: Trycourier::MessageContext?,
38
41
  ?data: ::Hash[Symbol, top]?,
39
42
  ?email: String?,
43
+ ?list_id: String?,
40
44
  ?locale: String?,
41
45
  ?phone_number: String?,
42
46
  ?preferences: Trycourier::UserRecipient::Preferences?,
@@ -49,6 +53,7 @@ module Trycourier
49
53
  context: Trycourier::MessageContext?,
50
54
  data: ::Hash[Symbol, top]?,
51
55
  email: String?,
56
+ list_id: String?,
52
57
  locale: String?,
53
58
  phone_number: String?,
54
59
  preferences: Trycourier::UserRecipient::Preferences?,
@@ -5,8 +5,8 @@ module Trycourier
5
5
  module Users
6
6
  type user_token =
7
7
  {
8
+ token: String,
8
9
  provider_key: Trycourier::Models::Users::UserToken::provider_key,
9
- token: String?,
10
10
  device: Trycourier::Users::UserToken::Device?,
11
11
  expiry_date: Trycourier::Models::Users::UserToken::expiry_date?,
12
12
  properties: top,
@@ -14,9 +14,9 @@ module Trycourier
14
14
  }
15
15
 
16
16
  class UserToken < Trycourier::Internal::Type::BaseModel
17
- attr_accessor provider_key: Trycourier::Models::Users::UserToken::provider_key
17
+ attr_accessor token: String
18
18
 
19
- attr_accessor token: String?
19
+ attr_accessor provider_key: Trycourier::Models::Users::UserToken::provider_key
20
20
 
21
21
  attr_accessor device: Trycourier::Users::UserToken::Device?
22
22
 
@@ -29,8 +29,8 @@ module Trycourier
29
29
  attr_accessor tracking: Trycourier::Users::UserToken::Tracking?
30
30
 
31
31
  def initialize: (
32
+ token: String,
32
33
  provider_key: Trycourier::Models::Users::UserToken::provider_key,
33
- ?token: String?,
34
34
  ?device: Trycourier::Users::UserToken::Device?,
35
35
  ?expiry_date: Trycourier::Models::Users::UserToken::expiry_date?,
36
36
  ?properties: top,
@@ -38,8 +38,8 @@ module Trycourier
38
38
  ) -> void
39
39
 
40
40
  def to_hash: -> {
41
+ token: String,
41
42
  provider_key: Trycourier::Models::Users::UserToken::provider_key,
42
- token: String?,
43
43
  device: Trycourier::Users::UserToken::Device?,
44
44
  expiry_date: Trycourier::Models::Users::UserToken::expiry_date?,
45
45
  properties: top,
@@ -1,7 +1,7 @@
1
1
  module Trycourier
2
2
  module Resources
3
3
  class Tenants
4
- class TenantDefaultPreferences
4
+ class Preferences
5
5
  class Items
6
6
  def update: (
7
7
  String topic_id,
@@ -1,8 +1,8 @@
1
1
  module Trycourier
2
2
  module Resources
3
3
  class Tenants
4
- class TenantDefaultPreferences
5
- attr_reader items: Trycourier::Resources::Tenants::TenantDefaultPreferences::Items
4
+ class Preferences
5
+ attr_reader items: Trycourier::Resources::Tenants::Preferences::Items
6
6
 
7
7
  def initialize: (client: Trycourier::Client) -> void
8
8
  end
@@ -1,7 +1,7 @@
1
1
  module Trycourier
2
2
  module Resources
3
3
  class Tenants
4
- attr_reader tenant_default_preferences: Trycourier::Resources::Tenants::TenantDefaultPreferences
4
+ attr_reader preferences: Trycourier::Resources::Tenants::Preferences
5
5
 
6
6
  attr_reader templates: Trycourier::Resources::Tenants::Templates
7
7
 
@@ -34,8 +34,8 @@ module Trycourier
34
34
  def add_single: (
35
35
  String path_token,
36
36
  user_id: String,
37
+ body_token: String,
37
38
  provider_key: Trycourier::Models::Users::UserToken::provider_key,
38
- ?body_token: String?,
39
39
  ?device: Trycourier::Users::UserToken::Device?,
40
40
  ?expiry_date: Trycourier::Models::Users::UserToken::expiry_date?,
41
41
  ?properties: top,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trycourier
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0.pre.alpha8
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-05 00:00:00.000000000 Z
11
+ date: 2025-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -197,11 +197,11 @@ files:
197
197
  - lib/trycourier/models/tenant_list_users_response.rb
198
198
  - lib/trycourier/models/tenant_retrieve_params.rb
199
199
  - lib/trycourier/models/tenant_update_params.rb
200
+ - lib/trycourier/models/tenants/preferences/item_delete_params.rb
201
+ - lib/trycourier/models/tenants/preferences/item_update_params.rb
200
202
  - lib/trycourier/models/tenants/template_list_params.rb
201
203
  - lib/trycourier/models/tenants/template_list_response.rb
202
204
  - lib/trycourier/models/tenants/template_retrieve_params.rb
203
- - lib/trycourier/models/tenants/tenant_default_preferences/item_delete_params.rb
204
- - lib/trycourier/models/tenants/tenant_default_preferences/item_update_params.rb
205
205
  - lib/trycourier/models/text_style.rb
206
206
  - lib/trycourier/models/translation_retrieve_params.rb
207
207
  - lib/trycourier/models/translation_retrieve_response.rb
@@ -251,9 +251,9 @@ files:
251
251
  - lib/trycourier/resources/requests.rb
252
252
  - lib/trycourier/resources/send.rb
253
253
  - lib/trycourier/resources/tenants.rb
254
+ - lib/trycourier/resources/tenants/preferences.rb
255
+ - lib/trycourier/resources/tenants/preferences/items.rb
254
256
  - lib/trycourier/resources/tenants/templates.rb
255
- - lib/trycourier/resources/tenants/tenant_default_preferences.rb
256
- - lib/trycourier/resources/tenants/tenant_default_preferences/items.rb
257
257
  - lib/trycourier/resources/translations.rb
258
258
  - lib/trycourier/resources/users.rb
259
259
  - lib/trycourier/resources/users/preferences.rb
@@ -422,11 +422,11 @@ files:
422
422
  - rbi/trycourier/models/tenant_list_users_response.rbi
423
423
  - rbi/trycourier/models/tenant_retrieve_params.rbi
424
424
  - rbi/trycourier/models/tenant_update_params.rbi
425
+ - rbi/trycourier/models/tenants/preferences/item_delete_params.rbi
426
+ - rbi/trycourier/models/tenants/preferences/item_update_params.rbi
425
427
  - rbi/trycourier/models/tenants/template_list_params.rbi
426
428
  - rbi/trycourier/models/tenants/template_list_response.rbi
427
429
  - rbi/trycourier/models/tenants/template_retrieve_params.rbi
428
- - rbi/trycourier/models/tenants/tenant_default_preferences/item_delete_params.rbi
429
- - rbi/trycourier/models/tenants/tenant_default_preferences/item_update_params.rbi
430
430
  - rbi/trycourier/models/text_style.rbi
431
431
  - rbi/trycourier/models/translation_retrieve_params.rbi
432
432
  - rbi/trycourier/models/translation_retrieve_response.rbi
@@ -476,9 +476,9 @@ files:
476
476
  - rbi/trycourier/resources/requests.rbi
477
477
  - rbi/trycourier/resources/send.rbi
478
478
  - rbi/trycourier/resources/tenants.rbi
479
+ - rbi/trycourier/resources/tenants/preferences.rbi
480
+ - rbi/trycourier/resources/tenants/preferences/items.rbi
479
481
  - rbi/trycourier/resources/tenants/templates.rbi
480
- - rbi/trycourier/resources/tenants/tenant_default_preferences.rbi
481
- - rbi/trycourier/resources/tenants/tenant_default_preferences/items.rbi
482
482
  - rbi/trycourier/resources/translations.rbi
483
483
  - rbi/trycourier/resources/users.rbi
484
484
  - rbi/trycourier/resources/users/preferences.rbi
@@ -646,11 +646,11 @@ files:
646
646
  - sig/trycourier/models/tenant_list_users_response.rbs
647
647
  - sig/trycourier/models/tenant_retrieve_params.rbs
648
648
  - sig/trycourier/models/tenant_update_params.rbs
649
+ - sig/trycourier/models/tenants/preferences/item_delete_params.rbs
650
+ - sig/trycourier/models/tenants/preferences/item_update_params.rbs
649
651
  - sig/trycourier/models/tenants/template_list_params.rbs
650
652
  - sig/trycourier/models/tenants/template_list_response.rbs
651
653
  - sig/trycourier/models/tenants/template_retrieve_params.rbs
652
- - sig/trycourier/models/tenants/tenant_default_preferences/item_delete_params.rbs
653
- - sig/trycourier/models/tenants/tenant_default_preferences/item_update_params.rbs
654
654
  - sig/trycourier/models/text_style.rbs
655
655
  - sig/trycourier/models/translation_retrieve_params.rbs
656
656
  - sig/trycourier/models/translation_retrieve_response.rbs
@@ -700,9 +700,9 @@ files:
700
700
  - sig/trycourier/resources/requests.rbs
701
701
  - sig/trycourier/resources/send.rbs
702
702
  - sig/trycourier/resources/tenants.rbs
703
+ - sig/trycourier/resources/tenants/preferences.rbs
704
+ - sig/trycourier/resources/tenants/preferences/items.rbs
703
705
  - sig/trycourier/resources/tenants/templates.rbs
704
- - sig/trycourier/resources/tenants/tenant_default_preferences.rbs
705
- - sig/trycourier/resources/tenants/tenant_default_preferences/items.rbs
706
706
  - sig/trycourier/resources/translations.rbs
707
707
  - sig/trycourier/resources/users.rbs
708
708
  - sig/trycourier/resources/users/preferences.rbs
@@ -726,9 +726,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
726
726
  version: 3.2.0
727
727
  required_rubygems_version: !ruby/object:Gem::Requirement
728
728
  requirements:
729
- - - ">"
729
+ - - ">="
730
730
  - !ruby/object:Gem::Version
731
- version: 1.3.1
731
+ version: '0'
732
732
  requirements: []
733
733
  rubygems_version: 3.4.1
734
734
  signing_key: