trycourier 6.4.4 → 6.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b85383a5a075aec281248a33e3baeb163257dcc14a786a0faed05bafa02dd5db
4
- data.tar.gz: f4144cce9c3b08a4b62579c54cf69a7d3234e21e61f74358ab8ac6d1702d2f57
3
+ metadata.gz: aec72cc2e6e742c57ffd2f2c5f8fde487e6597a34d0351cf4613abc3f369ab07
4
+ data.tar.gz: 037cfdab670141377df8fa5a5443c24b8d66e98b6ccc56b68c5db6176139bbb9
5
5
  SHA512:
6
- metadata.gz: 344f0da30f2d93dbcad8f178ac74528c4b30209b0f4c67c8fcadd3fab10a1410d313d5467dc84c267076da4ce24387fd47602087e23dcb233eade584be12350e
7
- data.tar.gz: f10b02d48f1aee2d14d0e538eaea4125eb2099262af4cd0d5a8b391342d974f6a73094f11ad8ea50094392fae9d49de32d902804ac659218f8047e7e0a512f70
6
+ metadata.gz: f9355b12ee2ed402c0f2e13d1f20b23cf5e3ee63e23e627894f66f517cf0522f866626b28485d3a5c98cfd021869f3fea6aeb3112a3e2208d65abc2733b0b10a
7
+ data.tar.gz: 45f4b13f45dbb29cdc1ed14845e7ff243fa90f215f45a6c4fcc324a3c725ed750d907da8571e4eb2ccf7b894aa7b9884bba71892454bc0f36f9d0f8036668695
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.5.0](https://github.com/trycourier/courier-ruby/compare/v6.4.4...v6.5.0) (2026-09-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** document the expiry_date contract and allow boolean patch values ([#148](https://github.com/trycourier/courier-ruby/issues/148)) ([191cec0](https://github.com/trycourier/courier-ruby/commit/191cec0ef235a855add991f9b935c1d90e0239f8))
9
+
3
10
  ## [6.4.4](https://github.com/trycourier/courier-ruby/compare/v6.4.3...v6.4.4) (2026-09-03)
4
11
 
5
12
 
data/README.md CHANGED
@@ -9,7 +9,7 @@ Add the gem to your `Gemfile`:
9
9
  <!-- x-release-please-start-version -->
10
10
 
11
11
  ```ruby
12
- gem "trycourier", "~> 6.4.4"
12
+ gem "trycourier", "~> 6.5.0"
13
13
  ```
14
14
 
15
15
  <!-- x-release-please-end -->
@@ -3,19 +3,126 @@
3
3
  module Courier
4
4
  module Models
5
5
  class EmailFooter < Courier::Internal::Type::BaseModel
6
- # @!attribute content
7
- #
8
- # @return [String, nil]
9
- optional :content, String, nil?: true
10
-
11
6
  # @!attribute inherit_default
12
7
  #
13
8
  # @return [Boolean, nil]
14
9
  optional :inherit_default, Courier::Internal::Type::Boolean, api_name: :inheritDefault, nil?: true
15
10
 
16
- # @!method initialize(content: nil, inherit_default: nil)
17
- # @param content [String, nil]
11
+ # @!attribute markdown
12
+ # The footer body, as markdown. This is the field the API returns and accepts; it
13
+ # is omitted entirely when no footer body is set. Sending null is accepted and
14
+ # treated as no footer body.
15
+ #
16
+ # @return [String, nil]
17
+ optional :markdown, String, nil?: true
18
+
19
+ # @!attribute social
20
+ # Social links rendered in the email footer.
21
+ #
22
+ # @return [Courier::Models::EmailFooter::Social, nil]
23
+ optional :social, -> { Courier::EmailFooter::Social }, nil?: true
24
+
25
+ # @!method initialize(inherit_default: nil, markdown: nil, social: nil)
26
+ # Some parameter documentations has been truncated, see
27
+ # {Courier::Models::EmailFooter} for more details.
28
+ #
18
29
  # @param inherit_default [Boolean, nil]
30
+ #
31
+ # @param markdown [String, nil] The footer body, as markdown. This is the field the API returns and accepts; it
32
+ #
33
+ # @param social [Courier::Models::EmailFooter::Social, nil] Social links rendered in the email footer.
34
+
35
+ # @see Courier::Models::EmailFooter#social
36
+ class Social < Courier::Internal::Type::BaseModel
37
+ # @!attribute facebook
38
+ #
39
+ # @return [Courier::Models::EmailFooter::Social::Facebook, nil]
40
+ optional :facebook, -> { Courier::EmailFooter::Social::Facebook }, nil?: true
41
+
42
+ # @!attribute instagram
43
+ #
44
+ # @return [Courier::Models::EmailFooter::Social::Instagram, nil]
45
+ optional :instagram, -> { Courier::EmailFooter::Social::Instagram }, nil?: true
46
+
47
+ # @!attribute linkedin
48
+ #
49
+ # @return [Courier::Models::EmailFooter::Social::Linkedin, nil]
50
+ optional :linkedin, -> { Courier::EmailFooter::Social::Linkedin }, nil?: true
51
+
52
+ # @!attribute medium
53
+ #
54
+ # @return [Courier::Models::EmailFooter::Social::Medium, nil]
55
+ optional :medium, -> { Courier::EmailFooter::Social::Medium }, nil?: true
56
+
57
+ # @!attribute twitter
58
+ #
59
+ # @return [Courier::Models::EmailFooter::Social::Twitter, nil]
60
+ optional :twitter, -> { Courier::EmailFooter::Social::Twitter }, nil?: true
61
+
62
+ # @!method initialize(facebook: nil, instagram: nil, linkedin: nil, medium: nil, twitter: nil)
63
+ # Social links rendered in the email footer.
64
+ #
65
+ # @param facebook [Courier::Models::EmailFooter::Social::Facebook, nil]
66
+ # @param instagram [Courier::Models::EmailFooter::Social::Instagram, nil]
67
+ # @param linkedin [Courier::Models::EmailFooter::Social::Linkedin, nil]
68
+ # @param medium [Courier::Models::EmailFooter::Social::Medium, nil]
69
+ # @param twitter [Courier::Models::EmailFooter::Social::Twitter, nil]
70
+
71
+ # @see Courier::Models::EmailFooter::Social#facebook
72
+ class Facebook < Courier::Internal::Type::BaseModel
73
+ # @!attribute url
74
+ #
75
+ # @return [String, nil]
76
+ optional :url, String, nil?: true
77
+
78
+ # @!method initialize(url: nil)
79
+ # @param url [String, nil]
80
+ end
81
+
82
+ # @see Courier::Models::EmailFooter::Social#instagram
83
+ class Instagram < Courier::Internal::Type::BaseModel
84
+ # @!attribute url
85
+ #
86
+ # @return [String, nil]
87
+ optional :url, String, nil?: true
88
+
89
+ # @!method initialize(url: nil)
90
+ # @param url [String, nil]
91
+ end
92
+
93
+ # @see Courier::Models::EmailFooter::Social#linkedin
94
+ class Linkedin < Courier::Internal::Type::BaseModel
95
+ # @!attribute url
96
+ #
97
+ # @return [String, nil]
98
+ optional :url, String, nil?: true
99
+
100
+ # @!method initialize(url: nil)
101
+ # @param url [String, nil]
102
+ end
103
+
104
+ # @see Courier::Models::EmailFooter::Social#medium
105
+ class Medium < Courier::Internal::Type::BaseModel
106
+ # @!attribute url
107
+ #
108
+ # @return [String, nil]
109
+ optional :url, String, nil?: true
110
+
111
+ # @!method initialize(url: nil)
112
+ # @param url [String, nil]
113
+ end
114
+
115
+ # @see Courier::Models::EmailFooter::Social#twitter
116
+ class Twitter < Courier::Internal::Type::BaseModel
117
+ # @!attribute url
118
+ #
119
+ # @return [String, nil]
120
+ optional :url, String, nil?: true
121
+
122
+ # @!method initialize(url: nil)
123
+ # @param url [String, nil]
124
+ end
125
+ end
19
126
  end
20
127
  end
21
128
  end
@@ -30,8 +30,12 @@ module Courier
30
30
  optional :device, -> { Courier::Users::TokenAddSingleParams::Device }, nil?: true
31
31
 
32
32
  # @!attribute expiry_date
33
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
34
- # disable expiration.
33
+ # When the token expires. Accepts a date, or the boolean `false` to disable
34
+ # expiration entirely. ISO 8601 is recommended (for example
35
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
36
+ # rejected; it is not treated as "no expiration" and does not fall back to the
37
+ # default. `true` is not a supported value. Omit the field to use the default,
38
+ # which expires a token that has not been re-registered for 60 days.
35
39
  #
36
40
  # @return [String, Boolean, nil]
37
41
  optional :expiry_date, union: -> { Courier::Users::TokenAddSingleParams::ExpiryDate }, nil?: true
@@ -60,7 +64,7 @@ module Courier
60
64
  #
61
65
  # @param device [Courier::Models::Users::TokenAddSingleParams::Device, nil] Information about the device the token came from.
62
66
  #
63
- # @param expiry_date [String, Boolean, nil] ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
67
+ # @param expiry_date [String, Boolean, nil] When the token expires. Accepts a date, or the boolean `false` to disable expira
64
68
  #
65
69
  # @param properties [Object] Properties about the token.
66
70
  #
@@ -133,8 +137,12 @@ module Courier
133
137
  # @param platform [String, nil] The device platform i.e. android, ios, web
134
138
  end
135
139
 
136
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
137
- # disable expiration.
140
+ # When the token expires. Accepts a date, or the boolean `false` to disable
141
+ # expiration entirely. ISO 8601 is recommended (for example
142
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
143
+ # rejected; it is not treated as "no expiration" and does not fall back to the
144
+ # default. `true` is not a supported value. Omit the field to use the default,
145
+ # which expires a token that has not been re-registered for 60 days.
138
146
  module ExpiryDate
139
147
  extend Courier::Internal::Type::Union
140
148
 
@@ -43,17 +43,43 @@ module Courier
43
43
  required :path, String
44
44
 
45
45
  # @!attribute value
46
- # The value for the operation.
46
+ # The value for the operation. A string for most fields; boolean `false` when
47
+ # disabling token expiration via `expiry_date`, which cannot be expressed as a
48
+ # string.
47
49
  #
48
- # @return [String, nil]
49
- optional :value, String, nil?: true
50
+ # @return [String, Boolean, Hash{Symbol=>Object}, nil]
51
+ optional :value, union: -> { Courier::Users::TokenUpdateParams::Patch::Value }, nil?: true
50
52
 
51
53
  # @!method initialize(op:, path:, value: nil)
54
+ # Some parameter documentations has been truncated, see
55
+ # {Courier::Models::Users::TokenUpdateParams::Patch} for more details.
56
+ #
52
57
  # @param op [String] The operation to perform.
53
58
  #
54
59
  # @param path [String] The JSON path specifying the part of the profile to operate on.
55
60
  #
56
- # @param value [String, nil] The value for the operation.
61
+ # @param value [String, Boolean, Hash{Symbol=>Object}, nil] The value for the operation. A string for most fields; boolean `false` when disa
62
+
63
+ # The value for the operation. A string for most fields; boolean `false` when
64
+ # disabling token expiration via `expiry_date`, which cannot be expressed as a
65
+ # string.
66
+ #
67
+ # @see Courier::Models::Users::TokenUpdateParams::Patch#value
68
+ module Value
69
+ extend Courier::Internal::Type::Union
70
+
71
+ variant String
72
+
73
+ variant Courier::Internal::Type::Boolean
74
+
75
+ variant -> { Courier::Models::Users::TokenUpdateParams::Patch::Value::UnionMember2Map }
76
+
77
+ # @!method self.variants
78
+ # @return [Array(String, Boolean, Hash{Symbol=>Object})]
79
+
80
+ # @type [Courier::Internal::Type::Converter]
81
+ UnionMember2Map = Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
82
+ end
57
83
  end
58
84
  end
59
85
  end
@@ -22,8 +22,12 @@ module Courier
22
22
  optional :device, -> { Courier::Users::UserToken::Device }, nil?: true
23
23
 
24
24
  # @!attribute expiry_date
25
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
26
- # disable expiration.
25
+ # When the token expires. Accepts a date, or the boolean `false` to disable
26
+ # expiration entirely. ISO 8601 is recommended (for example
27
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
28
+ # rejected; it is not treated as "no expiration" and does not fall back to the
29
+ # default. `true` is not a supported value. Omit the field to use the default,
30
+ # which expires a token that has not been re-registered for 60 days.
27
31
  #
28
32
  # @return [String, Boolean, nil]
29
33
  optional :expiry_date, union: -> { Courier::Users::UserToken::ExpiryDate }, nil?: true
@@ -50,7 +54,7 @@ module Courier
50
54
  #
51
55
  # @param device [Courier::Models::Users::UserToken::Device, nil] Information about the device the token came from.
52
56
  #
53
- # @param expiry_date [String, Boolean, nil] ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
57
+ # @param expiry_date [String, Boolean, nil] When the token expires. Accepts a date, or the boolean `false` to disable expira
54
58
  #
55
59
  # @param properties [Object] Properties about the token.
56
60
  #
@@ -123,8 +127,12 @@ module Courier
123
127
  # @param platform [String, nil] The device platform i.e. android, ios, web
124
128
  end
125
129
 
126
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
127
- # disable expiration.
130
+ # When the token expires. Accepts a date, or the boolean `false` to disable
131
+ # expiration entirely. ISO 8601 is recommended (for example
132
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
133
+ # rejected; it is not treated as "no expiration" and does not fall back to the
134
+ # default. `true` is not a supported value. Omit the field to use the default,
135
+ # which expires a token that has not been re-registered for 60 days.
128
136
  #
129
137
  # @see Courier::Models::Users::UserToken#expiry_date
130
138
  module ExpiryDate
@@ -151,7 +151,7 @@ module Courier
151
151
  #
152
152
  # @param device [Courier::Models::Users::TokenAddSingleParams::Device, nil] Body param: Information about the device the token came from.
153
153
  #
154
- # @param expiry_date [String, Boolean, nil] Body param: ISO 8601 formatted date the token expires. Defaults to 2 months. Set
154
+ # @param expiry_date [String, Boolean, nil] Body param: When the token expires. Accepts a date, or the boolean `false` to di
155
155
  #
156
156
  # @param properties [Object] Body param: Properties about the token.
157
157
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Courier
4
- VERSION = "6.4.4"
4
+ VERSION = "6.5.0"
5
5
  end
@@ -6,28 +6,250 @@ module Courier
6
6
  OrHash =
7
7
  T.type_alias { T.any(Courier::EmailFooter, Courier::Internal::AnyHash) }
8
8
 
9
- sig { returns(T.nilable(String)) }
10
- attr_accessor :content
11
-
12
9
  sig { returns(T.nilable(T::Boolean)) }
13
10
  attr_accessor :inherit_default
14
11
 
12
+ # The footer body, as markdown. This is the field the API returns and accepts; it
13
+ # is omitted entirely when no footer body is set. Sending null is accepted and
14
+ # treated as no footer body.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_accessor :markdown
17
+
18
+ # Social links rendered in the email footer.
19
+ sig { returns(T.nilable(Courier::EmailFooter::Social)) }
20
+ attr_reader :social
21
+
22
+ sig do
23
+ params(social: T.nilable(Courier::EmailFooter::Social::OrHash)).void
24
+ end
25
+ attr_writer :social
26
+
15
27
  sig do
16
28
  params(
17
- content: T.nilable(String),
18
- inherit_default: T.nilable(T::Boolean)
29
+ inherit_default: T.nilable(T::Boolean),
30
+ markdown: T.nilable(String),
31
+ social: T.nilable(Courier::EmailFooter::Social::OrHash)
19
32
  ).returns(T.attached_class)
20
33
  end
21
- def self.new(content: nil, inherit_default: nil)
34
+ def self.new(
35
+ inherit_default: nil,
36
+ # The footer body, as markdown. This is the field the API returns and accepts; it
37
+ # is omitted entirely when no footer body is set. Sending null is accepted and
38
+ # treated as no footer body.
39
+ markdown: nil,
40
+ # Social links rendered in the email footer.
41
+ social: nil
42
+ )
22
43
  end
23
44
 
24
45
  sig do
25
46
  override.returns(
26
- { content: T.nilable(String), inherit_default: T.nilable(T::Boolean) }
47
+ {
48
+ inherit_default: T.nilable(T::Boolean),
49
+ markdown: T.nilable(String),
50
+ social: T.nilable(Courier::EmailFooter::Social)
51
+ }
27
52
  )
28
53
  end
29
54
  def to_hash
30
55
  end
56
+
57
+ class Social < Courier::Internal::Type::BaseModel
58
+ OrHash =
59
+ T.type_alias do
60
+ T.any(Courier::EmailFooter::Social, Courier::Internal::AnyHash)
61
+ end
62
+
63
+ sig { returns(T.nilable(Courier::EmailFooter::Social::Facebook)) }
64
+ attr_reader :facebook
65
+
66
+ sig do
67
+ params(
68
+ facebook: T.nilable(Courier::EmailFooter::Social::Facebook::OrHash)
69
+ ).void
70
+ end
71
+ attr_writer :facebook
72
+
73
+ sig { returns(T.nilable(Courier::EmailFooter::Social::Instagram)) }
74
+ attr_reader :instagram
75
+
76
+ sig do
77
+ params(
78
+ instagram:
79
+ T.nilable(Courier::EmailFooter::Social::Instagram::OrHash)
80
+ ).void
81
+ end
82
+ attr_writer :instagram
83
+
84
+ sig { returns(T.nilable(Courier::EmailFooter::Social::Linkedin)) }
85
+ attr_reader :linkedin
86
+
87
+ sig do
88
+ params(
89
+ linkedin: T.nilable(Courier::EmailFooter::Social::Linkedin::OrHash)
90
+ ).void
91
+ end
92
+ attr_writer :linkedin
93
+
94
+ sig { returns(T.nilable(Courier::EmailFooter::Social::Medium)) }
95
+ attr_reader :medium
96
+
97
+ sig do
98
+ params(
99
+ medium: T.nilable(Courier::EmailFooter::Social::Medium::OrHash)
100
+ ).void
101
+ end
102
+ attr_writer :medium
103
+
104
+ sig { returns(T.nilable(Courier::EmailFooter::Social::Twitter)) }
105
+ attr_reader :twitter
106
+
107
+ sig do
108
+ params(
109
+ twitter: T.nilable(Courier::EmailFooter::Social::Twitter::OrHash)
110
+ ).void
111
+ end
112
+ attr_writer :twitter
113
+
114
+ # Social links rendered in the email footer.
115
+ sig do
116
+ params(
117
+ facebook: T.nilable(Courier::EmailFooter::Social::Facebook::OrHash),
118
+ instagram:
119
+ T.nilable(Courier::EmailFooter::Social::Instagram::OrHash),
120
+ linkedin: T.nilable(Courier::EmailFooter::Social::Linkedin::OrHash),
121
+ medium: T.nilable(Courier::EmailFooter::Social::Medium::OrHash),
122
+ twitter: T.nilable(Courier::EmailFooter::Social::Twitter::OrHash)
123
+ ).returns(T.attached_class)
124
+ end
125
+ def self.new(
126
+ facebook: nil,
127
+ instagram: nil,
128
+ linkedin: nil,
129
+ medium: nil,
130
+ twitter: nil
131
+ )
132
+ end
133
+
134
+ sig do
135
+ override.returns(
136
+ {
137
+ facebook: T.nilable(Courier::EmailFooter::Social::Facebook),
138
+ instagram: T.nilable(Courier::EmailFooter::Social::Instagram),
139
+ linkedin: T.nilable(Courier::EmailFooter::Social::Linkedin),
140
+ medium: T.nilable(Courier::EmailFooter::Social::Medium),
141
+ twitter: T.nilable(Courier::EmailFooter::Social::Twitter)
142
+ }
143
+ )
144
+ end
145
+ def to_hash
146
+ end
147
+
148
+ class Facebook < Courier::Internal::Type::BaseModel
149
+ OrHash =
150
+ T.type_alias do
151
+ T.any(
152
+ Courier::EmailFooter::Social::Facebook,
153
+ Courier::Internal::AnyHash
154
+ )
155
+ end
156
+
157
+ sig { returns(T.nilable(String)) }
158
+ attr_accessor :url
159
+
160
+ sig { params(url: T.nilable(String)).returns(T.attached_class) }
161
+ def self.new(url: nil)
162
+ end
163
+
164
+ sig { override.returns({ url: T.nilable(String) }) }
165
+ def to_hash
166
+ end
167
+ end
168
+
169
+ class Instagram < Courier::Internal::Type::BaseModel
170
+ OrHash =
171
+ T.type_alias do
172
+ T.any(
173
+ Courier::EmailFooter::Social::Instagram,
174
+ Courier::Internal::AnyHash
175
+ )
176
+ end
177
+
178
+ sig { returns(T.nilable(String)) }
179
+ attr_accessor :url
180
+
181
+ sig { params(url: T.nilable(String)).returns(T.attached_class) }
182
+ def self.new(url: nil)
183
+ end
184
+
185
+ sig { override.returns({ url: T.nilable(String) }) }
186
+ def to_hash
187
+ end
188
+ end
189
+
190
+ class Linkedin < Courier::Internal::Type::BaseModel
191
+ OrHash =
192
+ T.type_alias do
193
+ T.any(
194
+ Courier::EmailFooter::Social::Linkedin,
195
+ Courier::Internal::AnyHash
196
+ )
197
+ end
198
+
199
+ sig { returns(T.nilable(String)) }
200
+ attr_accessor :url
201
+
202
+ sig { params(url: T.nilable(String)).returns(T.attached_class) }
203
+ def self.new(url: nil)
204
+ end
205
+
206
+ sig { override.returns({ url: T.nilable(String) }) }
207
+ def to_hash
208
+ end
209
+ end
210
+
211
+ class Medium < Courier::Internal::Type::BaseModel
212
+ OrHash =
213
+ T.type_alias do
214
+ T.any(
215
+ Courier::EmailFooter::Social::Medium,
216
+ Courier::Internal::AnyHash
217
+ )
218
+ end
219
+
220
+ sig { returns(T.nilable(String)) }
221
+ attr_accessor :url
222
+
223
+ sig { params(url: T.nilable(String)).returns(T.attached_class) }
224
+ def self.new(url: nil)
225
+ end
226
+
227
+ sig { override.returns({ url: T.nilable(String) }) }
228
+ def to_hash
229
+ end
230
+ end
231
+
232
+ class Twitter < Courier::Internal::Type::BaseModel
233
+ OrHash =
234
+ T.type_alias do
235
+ T.any(
236
+ Courier::EmailFooter::Social::Twitter,
237
+ Courier::Internal::AnyHash
238
+ )
239
+ end
240
+
241
+ sig { returns(T.nilable(String)) }
242
+ attr_accessor :url
243
+
244
+ sig { params(url: T.nilable(String)).returns(T.attached_class) }
245
+ def self.new(url: nil)
246
+ end
247
+
248
+ sig { override.returns({ url: T.nilable(String) }) }
249
+ def to_hash
250
+ end
251
+ end
252
+ end
31
253
  end
32
254
  end
33
255
  end
@@ -38,8 +38,12 @@ module Courier
38
38
  end
39
39
  attr_writer :device
40
40
 
41
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
42
- # disable expiration.
41
+ # When the token expires. Accepts a date, or the boolean `false` to disable
42
+ # expiration entirely. ISO 8601 is recommended (for example
43
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
44
+ # rejected; it is not treated as "no expiration" and does not fall back to the
45
+ # default. `true` is not a supported value. Omit the field to use the default,
46
+ # which expires a token that has not been re-registered for 60 days.
43
47
  sig do
44
48
  returns(
45
49
  T.nilable(
@@ -94,8 +98,12 @@ module Courier
94
98
  provider_key:,
95
99
  # Information about the device the token came from.
96
100
  device: nil,
97
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
98
- # disable expiration.
101
+ # When the token expires. Accepts a date, or the boolean `false` to disable
102
+ # expiration entirely. ISO 8601 is recommended (for example
103
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
104
+ # rejected; it is not treated as "no expiration" and does not fall back to the
105
+ # default. `true` is not a supported value. Omit the field to use the default,
106
+ # which expires a token that has not been re-registered for 60 days.
99
107
  expiry_date: nil,
100
108
  # Properties about the token.
101
109
  properties: nil,
@@ -244,8 +252,12 @@ module Courier
244
252
  end
245
253
  end
246
254
 
247
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
248
- # disable expiration.
255
+ # When the token expires. Accepts a date, or the boolean `false` to disable
256
+ # expiration entirely. ISO 8601 is recommended (for example
257
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
258
+ # rejected; it is not treated as "no expiration" and does not fall back to the
259
+ # default. `true` is not a supported value. Omit the field to use the default,
260
+ # which expires a token that has not been re-registered for 60 days.
249
261
  module ExpiryDate
250
262
  extend Courier::Internal::Type::Union
251
263
 
@@ -62,32 +62,84 @@ module Courier
62
62
  sig { returns(String) }
63
63
  attr_accessor :path
64
64
 
65
- # The value for the operation.
66
- sig { returns(T.nilable(String)) }
65
+ # The value for the operation. A string for most fields; boolean `false` when
66
+ # disabling token expiration via `expiry_date`, which cannot be expressed as a
67
+ # string.
68
+ sig do
69
+ returns(
70
+ T.nilable(
71
+ Courier::Users::TokenUpdateParams::Patch::Value::Variants
72
+ )
73
+ )
74
+ end
67
75
  attr_accessor :value
68
76
 
69
77
  sig do
70
- params(op: String, path: String, value: T.nilable(String)).returns(
71
- T.attached_class
72
- )
78
+ params(
79
+ op: String,
80
+ path: String,
81
+ value:
82
+ T.nilable(
83
+ Courier::Users::TokenUpdateParams::Patch::Value::Variants
84
+ )
85
+ ).returns(T.attached_class)
73
86
  end
74
87
  def self.new(
75
88
  # The operation to perform.
76
89
  op:,
77
90
  # The JSON path specifying the part of the profile to operate on.
78
91
  path:,
79
- # The value for the operation.
92
+ # The value for the operation. A string for most fields; boolean `false` when
93
+ # disabling token expiration via `expiry_date`, which cannot be expressed as a
94
+ # string.
80
95
  value: nil
81
96
  )
82
97
  end
83
98
 
84
99
  sig do
85
100
  override.returns(
86
- { op: String, path: String, value: T.nilable(String) }
101
+ {
102
+ op: String,
103
+ path: String,
104
+ value:
105
+ T.nilable(
106
+ Courier::Users::TokenUpdateParams::Patch::Value::Variants
107
+ )
108
+ }
87
109
  )
88
110
  end
89
111
  def to_hash
90
112
  end
113
+
114
+ # The value for the operation. A string for most fields; boolean `false` when
115
+ # disabling token expiration via `expiry_date`, which cannot be expressed as a
116
+ # string.
117
+ module Value
118
+ extend Courier::Internal::Type::Union
119
+
120
+ Variants =
121
+ T.type_alias do
122
+ T.any(String, T::Boolean, T::Hash[Symbol, T.anything])
123
+ end
124
+
125
+ sig do
126
+ override.returns(
127
+ T::Array[
128
+ Courier::Users::TokenUpdateParams::Patch::Value::Variants
129
+ ]
130
+ )
131
+ end
132
+ def self.variants
133
+ end
134
+
135
+ UnionMember2Map =
136
+ T.let(
137
+ Courier::Internal::Type::HashOf[
138
+ Courier::Internal::Type::Unknown
139
+ ],
140
+ Courier::Internal::Type::Converter
141
+ )
142
+ end
91
143
  end
92
144
  end
93
145
  end
@@ -29,8 +29,12 @@ module Courier
29
29
  end
30
30
  attr_writer :device
31
31
 
32
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
33
- # disable expiration.
32
+ # When the token expires. Accepts a date, or the boolean `false` to disable
33
+ # expiration entirely. ISO 8601 is recommended (for example
34
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
35
+ # rejected; it is not treated as "no expiration" and does not fall back to the
36
+ # default. `true` is not a supported value. Omit the field to use the default,
37
+ # which expires a token that has not been re-registered for 60 days.
34
38
  sig do
35
39
  returns(T.nilable(Courier::Users::UserToken::ExpiryDate::Variants))
36
40
  end
@@ -71,8 +75,12 @@ module Courier
71
75
  provider_key:,
72
76
  # Information about the device the token came from.
73
77
  device: nil,
74
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
75
- # disable expiration.
78
+ # When the token expires. Accepts a date, or the boolean `false` to disable
79
+ # expiration entirely. ISO 8601 is recommended (for example
80
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
81
+ # rejected; it is not treated as "no expiration" and does not fall back to the
82
+ # default. `true` is not a supported value. Omit the field to use the default,
83
+ # which expires a token that has not been re-registered for 60 days.
76
84
  expiry_date: nil,
77
85
  # Properties about the token.
78
86
  properties: nil,
@@ -207,8 +215,12 @@ module Courier
207
215
  end
208
216
  end
209
217
 
210
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
211
- # disable expiration.
218
+ # When the token expires. Accepts a date, or the boolean `false` to disable
219
+ # expiration entirely. ISO 8601 is recommended (for example
220
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
221
+ # rejected; it is not treated as "no expiration" and does not fall back to the
222
+ # default. `true` is not a supported value. Omit the field to use the default,
223
+ # which expires a token that has not been re-registered for 60 days.
212
224
  module ExpiryDate
213
225
  extend Courier::Internal::Type::Union
214
226
 
@@ -122,8 +122,12 @@ module Courier
122
122
  provider_key:,
123
123
  # Body param: Information about the device the token came from.
124
124
  device: nil,
125
- # Body param: ISO 8601 formatted date the token expires. Defaults to 2 months. Set
126
- # to false to disable expiration.
125
+ # Body param: When the token expires. Accepts a date, or the boolean `false` to
126
+ # disable expiration entirely. ISO 8601 is recommended (for example
127
+ # `2026-10-25T00:00:00.000Z`). A value that cannot be parsed as a date is
128
+ # rejected; it is not treated as "no expiration" and does not fall back to the
129
+ # default. `true` is not a supported value. Omit the field to use the default,
130
+ # which expires a token that has not been re-registered for 60 days.
127
131
  expiry_date: nil,
128
132
  # Body param: Properties about the token.
129
133
  properties: nil,
@@ -1,15 +1,117 @@
1
1
  module Courier
2
2
  module Models
3
- type email_footer = { content: String?, inherit_default: bool? }
3
+ type email_footer =
4
+ {
5
+ inherit_default: bool?,
6
+ markdown: String?,
7
+ social: Courier::EmailFooter::Social?
8
+ }
4
9
 
5
10
  class EmailFooter < Courier::Internal::Type::BaseModel
6
- attr_accessor content: String?
7
-
8
11
  attr_accessor inherit_default: bool?
9
12
 
10
- def initialize: (?content: String?, ?inherit_default: bool?) -> void
13
+ attr_accessor markdown: String?
14
+
15
+ attr_accessor social: Courier::EmailFooter::Social?
16
+
17
+ def initialize: (
18
+ ?inherit_default: bool?,
19
+ ?markdown: String?,
20
+ ?social: Courier::EmailFooter::Social?
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ inherit_default: bool?,
25
+ markdown: String?,
26
+ social: Courier::EmailFooter::Social?
27
+ }
28
+
29
+ type social =
30
+ {
31
+ facebook: Courier::EmailFooter::Social::Facebook?,
32
+ instagram: Courier::EmailFooter::Social::Instagram?,
33
+ linkedin: Courier::EmailFooter::Social::Linkedin?,
34
+ medium: Courier::EmailFooter::Social::Medium?,
35
+ twitter: Courier::EmailFooter::Social::Twitter?
36
+ }
37
+
38
+ class Social < Courier::Internal::Type::BaseModel
39
+ attr_accessor facebook: Courier::EmailFooter::Social::Facebook?
40
+
41
+ attr_accessor instagram: Courier::EmailFooter::Social::Instagram?
42
+
43
+ attr_accessor linkedin: Courier::EmailFooter::Social::Linkedin?
44
+
45
+ attr_accessor medium: Courier::EmailFooter::Social::Medium?
46
+
47
+ attr_accessor twitter: Courier::EmailFooter::Social::Twitter?
48
+
49
+ def initialize: (
50
+ ?facebook: Courier::EmailFooter::Social::Facebook?,
51
+ ?instagram: Courier::EmailFooter::Social::Instagram?,
52
+ ?linkedin: Courier::EmailFooter::Social::Linkedin?,
53
+ ?medium: Courier::EmailFooter::Social::Medium?,
54
+ ?twitter: Courier::EmailFooter::Social::Twitter?
55
+ ) -> void
56
+
57
+ def to_hash: -> {
58
+ facebook: Courier::EmailFooter::Social::Facebook?,
59
+ instagram: Courier::EmailFooter::Social::Instagram?,
60
+ linkedin: Courier::EmailFooter::Social::Linkedin?,
61
+ medium: Courier::EmailFooter::Social::Medium?,
62
+ twitter: Courier::EmailFooter::Social::Twitter?
63
+ }
64
+
65
+ type facebook = { url: String? }
66
+
67
+ class Facebook < Courier::Internal::Type::BaseModel
68
+ attr_accessor url: String?
69
+
70
+ def initialize: (?url: String?) -> void
71
+
72
+ def to_hash: -> { url: String? }
73
+ end
74
+
75
+ type instagram = { url: String? }
76
+
77
+ class Instagram < Courier::Internal::Type::BaseModel
78
+ attr_accessor url: String?
79
+
80
+ def initialize: (?url: String?) -> void
81
+
82
+ def to_hash: -> { url: String? }
83
+ end
84
+
85
+ type linkedin = { url: String? }
86
+
87
+ class Linkedin < Courier::Internal::Type::BaseModel
88
+ attr_accessor url: String?
89
+
90
+ def initialize: (?url: String?) -> void
91
+
92
+ def to_hash: -> { url: String? }
93
+ end
94
+
95
+ type medium = { url: String? }
96
+
97
+ class Medium < Courier::Internal::Type::BaseModel
98
+ attr_accessor url: String?
99
+
100
+ def initialize: (?url: String?) -> void
101
+
102
+ def to_hash: -> { url: String? }
103
+ end
104
+
105
+ type twitter = { url: String? }
106
+
107
+ class Twitter < Courier::Internal::Type::BaseModel
108
+ attr_accessor url: String?
109
+
110
+ def initialize: (?url: String?) -> void
11
111
 
12
- def to_hash: -> { content: String?, inherit_default: bool? }
112
+ def to_hash: -> { url: String? }
113
+ end
114
+ end
13
115
  end
14
116
  end
15
117
  end
@@ -33,18 +33,41 @@ module Courier
33
33
  request_options: Courier::RequestOptions
34
34
  }
35
35
 
36
- type patch = { op: String, path: String, value: String? }
36
+ type patch =
37
+ {
38
+ op: String,
39
+ path: String,
40
+ value: Courier::Models::Users::TokenUpdateParams::Patch::value?
41
+ }
37
42
 
38
43
  class Patch < Courier::Internal::Type::BaseModel
39
44
  attr_accessor op: String
40
45
 
41
46
  attr_accessor path: String
42
47
 
43
- attr_accessor value: String?
48
+ attr_accessor value: Courier::Models::Users::TokenUpdateParams::Patch::value?
44
49
 
45
- def initialize: (op: String, path: String, ?value: String?) -> void
50
+ def initialize: (
51
+ op: String,
52
+ path: String,
53
+ ?value: Courier::Models::Users::TokenUpdateParams::Patch::value?
54
+ ) -> void
46
55
 
47
- def to_hash: -> { op: String, path: String, value: String? }
56
+ def to_hash: -> {
57
+ op: String,
58
+ path: String,
59
+ value: Courier::Models::Users::TokenUpdateParams::Patch::value?
60
+ }
61
+
62
+ type value = String | bool | ::Hash[Symbol, top]
63
+
64
+ module Value
65
+ extend Courier::Internal::Type::Union
66
+
67
+ def self?.variants: -> ::Array[Courier::Models::Users::TokenUpdateParams::Patch::value]
68
+
69
+ UnionMember2Map: Courier::Internal::Type::Converter
70
+ end
48
71
  end
49
72
  end
50
73
  end
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: 6.4.4
4
+ version: 6.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-03 00:00:00.000000000 Z
11
+ date: 2026-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi