sentdm 0.22.0 → 0.23.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: ff3976ba33fd23b5531e560bc78424189ced5c29a0e311c0fe4214003df4dda7
4
- data.tar.gz: 04e1dce22f3aec94855dfc8e63d32ecd3be6eec176db69d84c701d7a309e069c
3
+ metadata.gz: 7de2ae5f93acc9c03c351ef4fc1d6487d9ab880f67fc880889a5e5096067cf53
4
+ data.tar.gz: 84fb4f71d2605c3d8dfe03c8547b0b25d754b653365790f3df65c254c194102f
5
5
  SHA512:
6
- metadata.gz: a0917d1b6e4889e3d1e4b20b7c47e6db020638ee938aa9bf27648a43186dabe1802a304d45033f7159282c852996e764b5763c63196b5369c05d4accd8897416
7
- data.tar.gz: a6c46edaf0fd2b6e5ad69460f2c2d19fbcea7fb89c8eefdb50ce30137b23a11b9ecd927519f83f571c3abee86f52ef13164d40ad161fdd6ffcd37d21535861fc
6
+ metadata.gz: 759a8365e867009c3efbeaaa8782b0099e5f3dec827d484a2ba1aa0ab669d804483269876c12aa598329a96e871d1e53f6f67fe087fd5ece14ebc3a0e3025b1d
7
+ data.tar.gz: f82cea6ba64ea3ed3112e6da04db12febd9101687330f91f8f48171e5a362c4eee9e96a4ad7ea0cc9071afeefa08ff11da985c9f6c5e44a06265698268bdcc8a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.23.0 (2026-06-30)
4
+
5
+ Full Changelog: [v0.22.1...v0.23.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.22.1...v0.23.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([441c4bd](https://github.com/sentdm/sent-dm-ruby/commit/441c4bdaabc474360f4ad3efd5a1805948e95686))
10
+ * **api:** api update ([702b196](https://github.com/sentdm/sent-dm-ruby/commit/702b196e3037740b8980f60bc4c67719d582d261))
11
+
12
+
13
+ ### Chores
14
+
15
+ * **internal:** bound formatter parallelism to CPU count ([65b5f68](https://github.com/sentdm/sent-dm-ruby/commit/65b5f68b53b42df10db46a2ed2b5f1a26cc0949b))
16
+
17
+ ## 0.22.1 (2026-06-18)
18
+
19
+ Full Changelog: [v0.22.0...v0.22.1](https://github.com/sentdm/sent-dm-ruby/compare/v0.22.0...v0.22.1)
20
+
21
+ ### Bug Fixes
22
+
23
+ * **client:** send content-type header for requests with an omitted optional body ([cc8d5d4](https://github.com/sentdm/sent-dm-ruby/commit/cc8d5d4eaae4eb4077d2be62c7ed4ca676f49789))
24
+
3
25
  ## 0.22.0 (2026-05-21)
4
26
 
5
27
  Full Changelog: [v0.21.0...v0.22.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.21.0...v0.22.0)
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 "sentdm", "~> 0.22.0"
20
+ gem "sentdm", "~> 0.23.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -306,7 +306,10 @@ module Sentdm
306
306
  Sentdm::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
307
  end
308
308
 
309
- headers.delete("content-type") if body.nil?
309
+ # Generated methods always pass `req[:body]` for operations that define a
310
+ # request body, so only elide the content-type header when the operation
311
+ # has no body at all, not when an optional body param was omitted.
312
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
310
313
 
311
314
  url = Sentdm::Internal::Util.join_parsed_uri(
312
315
  @base_url_components,
@@ -27,7 +27,13 @@ module Sentdm
27
27
  # parameters.
28
28
  #
29
29
  # @return [Sentdm::Models::MessageSendParams::Template, nil]
30
- optional :template, -> { Sentdm::MessageSendParams::Template }
30
+ optional :template, -> { Sentdm::MessageSendParams::Template }, nil?: true
31
+
32
+ # @!attribute text
33
+ # Plain-text (free-form) message body. Provide either Template or this.
34
+ #
35
+ # @return [String, nil]
36
+ optional :text, String, nil?: true
31
37
 
32
38
  # @!attribute to
33
39
  # List of recipient phone numbers in E.164 format (multi-recipient fan-out)
@@ -45,7 +51,7 @@ module Sentdm
45
51
  # @return [String, nil]
46
52
  optional :x_profile_id, String
47
53
 
48
- # @!method initialize(channel: nil, sandbox: nil, template: nil, to: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
54
+ # @!method initialize(channel: nil, sandbox: nil, template: nil, text: nil, to: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
49
55
  # Some parameter documentations has been truncated, see
50
56
  # {Sentdm::Models::MessageSendParams} for more details.
51
57
  #
@@ -53,7 +59,9 @@ module Sentdm
53
59
  #
54
60
  # @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
55
61
  #
56
- # @param template [Sentdm::Models::MessageSendParams::Template] SDK-style template reference: resolve by ID or by name, with optional parameters
62
+ # @param template [Sentdm::Models::MessageSendParams::Template, nil] SDK-style template reference: resolve by ID or by name, with optional parameters
63
+ #
64
+ # @param text [String, nil] Plain-text (free-form) message body. Provide either Template or this.
57
65
  #
58
66
  # @param to [Array<String>] List of recipient phone numbers in E.164 format (multi-recipient fan-out)
59
67
  #
@@ -47,6 +47,16 @@ module Sentdm
47
47
  # @return [String, nil]
48
48
  optional :description, String
49
49
 
50
+ # @!attribute has_submission_transaction
51
+ # True when this campaign already has a billing transaction of reference type
52
+ # TCR_CAMPAIGN_SUBMISSION (the one-time submission fee was charged). Populated
53
+ # only by the campaigns-list path; defaults false on other responses.
54
+ #
55
+ # @return [Boolean, nil]
56
+ optional :has_submission_transaction,
57
+ Sentdm::Internal::Type::Boolean,
58
+ api_name: :hasSubmissionTransaction
59
+
50
60
  # @!attribute help_keywords
51
61
  #
52
62
  # @return [String, nil]
@@ -162,36 +172,70 @@ module Sentdm
162
172
  -> { Sentdm::Internal::Type::ArrayOf[Sentdm::Profiles::TcrCampaignWithUseCases::UseCase] },
163
173
  api_name: :useCases
164
174
 
165
- # @!method initialize(billed_date: nil, brand_id: nil, cost: nil, csp_id: nil, customer_id: nil, dca_elections_complete: nil, dca_elections_completed_at: nil, description: nil, help_keywords: nil, help_message: nil, kyc_submission_form_id: nil, message_flow: nil, name: nil, optin_keywords: nil, optin_message: nil, optout_keywords: nil, optout_message: nil, privacy_policy_link: nil, reseller_id: nil, sharing_status: nil, status: nil, submitted_at: nil, submitted_to_tcr: nil, tcr_campaign_id: nil, tcr_sync_error: nil, telnyx_campaign_id: nil, terms_and_conditions_link: nil, type: nil, upstream_cnp_id: nil, use_cases: nil)
175
+ # @!method initialize(billed_date: nil, brand_id: nil, cost: nil, csp_id: nil, customer_id: nil, dca_elections_complete: nil, dca_elections_completed_at: nil, description: nil, has_submission_transaction: nil, help_keywords: nil, help_message: nil, kyc_submission_form_id: nil, message_flow: nil, name: nil, optin_keywords: nil, optin_message: nil, optout_keywords: nil, optout_message: nil, privacy_policy_link: nil, reseller_id: nil, sharing_status: nil, status: nil, submitted_at: nil, submitted_to_tcr: nil, tcr_campaign_id: nil, tcr_sync_error: nil, telnyx_campaign_id: nil, terms_and_conditions_link: nil, type: nil, upstream_cnp_id: nil, use_cases: nil)
176
+ # Some parameter documentations has been truncated, see
177
+ # {Sentdm::Models::Profiles::TcrCampaignWithUseCases} for more details.
178
+ #
166
179
  # @param billed_date [Time, nil]
180
+ #
167
181
  # @param brand_id [String, nil]
182
+ #
168
183
  # @param cost [Float, nil]
184
+ #
169
185
  # @param csp_id [String, nil]
186
+ #
170
187
  # @param customer_id [String]
188
+ #
171
189
  # @param dca_elections_complete [Boolean, nil]
190
+ #
172
191
  # @param dca_elections_completed_at [Time, nil]
192
+ #
173
193
  # @param description [String]
194
+ #
195
+ # @param has_submission_transaction [Boolean] True when this campaign already has a billing transaction of reference type
196
+ #
174
197
  # @param help_keywords [String, nil]
198
+ #
175
199
  # @param help_message [String, nil]
200
+ #
176
201
  # @param kyc_submission_form_id [String, nil]
202
+ #
177
203
  # @param message_flow [String, nil]
204
+ #
178
205
  # @param name [String]
206
+ #
179
207
  # @param optin_keywords [String, nil]
208
+ #
180
209
  # @param optin_message [String, nil]
210
+ #
181
211
  # @param optout_keywords [String, nil]
212
+ #
182
213
  # @param optout_message [String, nil]
214
+ #
183
215
  # @param privacy_policy_link [String, nil]
216
+ #
184
217
  # @param reseller_id [String, nil]
218
+ #
185
219
  # @param sharing_status [Symbol, Sentdm::Models::Profiles::TcrCampaignWithUseCases::SharingStatus, nil]
220
+ #
186
221
  # @param status [Symbol, Sentdm::Models::Profiles::TcrCampaignWithUseCases::Status, nil]
222
+ #
187
223
  # @param submitted_at [Time, nil]
224
+ #
188
225
  # @param submitted_to_tcr [Boolean]
226
+ #
189
227
  # @param tcr_campaign_id [String, nil]
228
+ #
190
229
  # @param tcr_sync_error [String, nil]
230
+ #
191
231
  # @param telnyx_campaign_id [String, nil]
232
+ #
192
233
  # @param terms_and_conditions_link [String, nil]
234
+ #
193
235
  # @param type [String]
236
+ #
194
237
  # @param upstream_cnp_id [String, nil]
238
+ #
195
239
  # @param use_cases [Array<Sentdm::Models::Profiles::TcrCampaignWithUseCases::UseCase>]
196
240
 
197
241
  module SharingStatus
@@ -69,13 +69,15 @@ module Sentdm
69
69
  # Returns immediately with per-recipient message IDs for async tracking via
70
70
  # webhooks or the GET /messages/{id} endpoint.
71
71
  #
72
- # @overload send_(channel: nil, sandbox: nil, template: nil, to: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
72
+ # @overload send_(channel: nil, sandbox: nil, template: nil, text: nil, to: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
73
73
  #
74
74
  # @param channel [Array<String>, nil] Body param: Channels to broadcast on, e.g. ["whatsapp", "sms"].
75
75
  #
76
76
  # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
77
77
  #
78
- # @param template [Sentdm::Models::MessageSendParams::Template] Body param: SDK-style template reference: resolve by ID or by name, with optiona
78
+ # @param template [Sentdm::Models::MessageSendParams::Template, nil] Body param: SDK-style template reference: resolve by ID or by name, with optiona
79
+ #
80
+ # @param text [String, nil] Body param: Plain-text (free-form) message body. Provide either Template or this
79
81
  #
80
82
  # @param to [Array<String>] Body param: List of recipient phone numbers in E.164 format (multi-recipient fan
81
83
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentdm
4
- VERSION = "0.22.0"
4
+ VERSION = "0.23.0"
5
5
  end
@@ -30,9 +30,17 @@ module Sentdm
30
30
  sig { returns(T.nilable(Sentdm::MessageSendParams::Template)) }
31
31
  attr_reader :template
32
32
 
33
- sig { params(template: Sentdm::MessageSendParams::Template::OrHash).void }
33
+ sig do
34
+ params(
35
+ template: T.nilable(Sentdm::MessageSendParams::Template::OrHash)
36
+ ).void
37
+ end
34
38
  attr_writer :template
35
39
 
40
+ # Plain-text (free-form) message body. Provide either Template or this.
41
+ sig { returns(T.nilable(String)) }
42
+ attr_accessor :text
43
+
36
44
  # List of recipient phone numbers in E.164 format (multi-recipient fan-out)
37
45
  sig { returns(T.nilable(T::Array[String])) }
38
46
  attr_reader :to
@@ -56,7 +64,8 @@ module Sentdm
56
64
  params(
57
65
  channel: T.nilable(T::Array[String]),
58
66
  sandbox: T::Boolean,
59
- template: Sentdm::MessageSendParams::Template::OrHash,
67
+ template: T.nilable(Sentdm::MessageSendParams::Template::OrHash),
68
+ text: T.nilable(String),
60
69
  to: T::Array[String],
61
70
  idempotency_key: String,
62
71
  x_profile_id: String,
@@ -74,6 +83,8 @@ module Sentdm
74
83
  # SDK-style template reference: resolve by ID or by name, with optional
75
84
  # parameters.
76
85
  template: nil,
86
+ # Plain-text (free-form) message body. Provide either Template or this.
87
+ text: nil,
77
88
  # List of recipient phone numbers in E.164 format (multi-recipient fan-out)
78
89
  to: nil,
79
90
  idempotency_key: nil,
@@ -87,7 +98,8 @@ module Sentdm
87
98
  {
88
99
  channel: T.nilable(T::Array[String]),
89
100
  sandbox: T::Boolean,
90
- template: Sentdm::MessageSendParams::Template,
101
+ template: T.nilable(Sentdm::MessageSendParams::Template),
102
+ text: T.nilable(String),
91
103
  to: T::Array[String],
92
104
  idempotency_key: String,
93
105
  x_profile_id: String,
@@ -42,6 +42,15 @@ module Sentdm
42
42
  sig { params(description: String).void }
43
43
  attr_writer :description
44
44
 
45
+ # True when this campaign already has a billing transaction of reference type
46
+ # TCR_CAMPAIGN_SUBMISSION (the one-time submission fee was charged). Populated
47
+ # only by the campaigns-list path; defaults false on other responses.
48
+ sig { returns(T.nilable(T::Boolean)) }
49
+ attr_reader :has_submission_transaction
50
+
51
+ sig { params(has_submission_transaction: T::Boolean).void }
52
+ attr_writer :has_submission_transaction
53
+
45
54
  sig { returns(T.nilable(String)) }
46
55
  attr_accessor :help_keywords
47
56
 
@@ -155,6 +164,7 @@ module Sentdm
155
164
  dca_elections_complete: T.nilable(T::Boolean),
156
165
  dca_elections_completed_at: T.nilable(Time),
157
166
  description: String,
167
+ has_submission_transaction: T::Boolean,
158
168
  help_keywords: T.nilable(String),
159
169
  help_message: T.nilable(String),
160
170
  kyc_submission_form_id: T.nilable(String),
@@ -197,6 +207,10 @@ module Sentdm
197
207
  dca_elections_complete: nil,
198
208
  dca_elections_completed_at: nil,
199
209
  description: nil,
210
+ # True when this campaign already has a billing transaction of reference type
211
+ # TCR_CAMPAIGN_SUBMISSION (the one-time submission fee was charged). Populated
212
+ # only by the campaigns-list path; defaults false on other responses.
213
+ has_submission_transaction: nil,
200
214
  help_keywords: nil,
201
215
  help_message: nil,
202
216
  kyc_submission_form_id: nil,
@@ -233,6 +247,7 @@ module Sentdm
233
247
  dca_elections_complete: T.nilable(T::Boolean),
234
248
  dca_elections_completed_at: T.nilable(Time),
235
249
  description: String,
250
+ has_submission_transaction: T::Boolean,
236
251
  help_keywords: T.nilable(String),
237
252
  help_message: T.nilable(String),
238
253
  kyc_submission_form_id: T.nilable(String),
@@ -51,7 +51,8 @@ module Sentdm
51
51
  params(
52
52
  channel: T.nilable(T::Array[String]),
53
53
  sandbox: T::Boolean,
54
- template: Sentdm::MessageSendParams::Template::OrHash,
54
+ template: T.nilable(Sentdm::MessageSendParams::Template::OrHash),
55
+ text: T.nilable(String),
55
56
  to: T::Array[String],
56
57
  idempotency_key: String,
57
58
  x_profile_id: String,
@@ -69,6 +70,9 @@ module Sentdm
69
70
  # Body param: SDK-style template reference: resolve by ID or by name, with
70
71
  # optional parameters.
71
72
  template: nil,
73
+ # Body param: Plain-text (free-form) message body. Provide either Template or
74
+ # this.
75
+ text: nil,
72
76
  # Body param: List of recipient phone numbers in E.164 format (multi-recipient
73
77
  # fan-out)
74
78
  to: nil,
@@ -4,7 +4,8 @@ module Sentdm
4
4
  {
5
5
  channel: ::Array[String]?,
6
6
  sandbox: bool,
7
- template: Sentdm::MessageSendParams::Template,
7
+ template: Sentdm::MessageSendParams::Template?,
8
+ text: String?,
8
9
  to: ::Array[String],
9
10
  idempotency_key: String,
10
11
  x_profile_id: String
@@ -21,11 +22,9 @@ module Sentdm
21
22
 
22
23
  def sandbox=: (bool) -> bool
23
24
 
24
- attr_reader template: Sentdm::MessageSendParams::Template?
25
+ attr_accessor template: Sentdm::MessageSendParams::Template?
25
26
 
26
- def template=: (
27
- Sentdm::MessageSendParams::Template
28
- ) -> Sentdm::MessageSendParams::Template
27
+ attr_accessor text: String?
29
28
 
30
29
  attr_reader to: ::Array[String]?
31
30
 
@@ -42,7 +41,8 @@ module Sentdm
42
41
  def initialize: (
43
42
  ?channel: ::Array[String]?,
44
43
  ?sandbox: bool,
45
- ?template: Sentdm::MessageSendParams::Template,
44
+ ?template: Sentdm::MessageSendParams::Template?,
45
+ ?text: String?,
46
46
  ?to: ::Array[String],
47
47
  ?idempotency_key: String,
48
48
  ?x_profile_id: String,
@@ -52,7 +52,8 @@ module Sentdm
52
52
  def to_hash: -> {
53
53
  channel: ::Array[String]?,
54
54
  sandbox: bool,
55
- template: Sentdm::MessageSendParams::Template,
55
+ template: Sentdm::MessageSendParams::Template?,
56
+ text: String?,
56
57
  to: ::Array[String],
57
58
  idempotency_key: String,
58
59
  x_profile_id: String,
@@ -11,6 +11,7 @@ module Sentdm
11
11
  dca_elections_complete: bool?,
12
12
  dca_elections_completed_at: Time?,
13
13
  description: String,
14
+ has_submission_transaction: bool,
14
15
  help_keywords: String?,
15
16
  help_message: String?,
16
17
  kyc_submission_form_id: String?,
@@ -68,6 +69,10 @@ module Sentdm
68
69
 
69
70
  def description=: (String _) -> String
70
71
 
72
+ def has_submission_transaction: -> bool?
73
+
74
+ def has_submission_transaction=: (bool _) -> bool
75
+
71
76
  def help_keywords: -> String?
72
77
 
73
78
  def help_keywords=: (String? _) -> String?
@@ -171,6 +176,7 @@ module Sentdm
171
176
  ?dca_elections_complete: bool?,
172
177
  ?dca_elections_completed_at: Time?,
173
178
  ?description: String,
179
+ ?has_submission_transaction: bool,
174
180
  ?help_keywords: String?,
175
181
  ?help_message: String?,
176
182
  ?kyc_submission_form_id: String?,
@@ -204,6 +210,7 @@ module Sentdm
204
210
  dca_elections_complete: bool?,
205
211
  dca_elections_completed_at: Time?,
206
212
  description: String,
213
+ has_submission_transaction: bool,
207
214
  help_keywords: String?,
208
215
  help_message: String?,
209
216
  kyc_submission_form_id: String?,
@@ -16,7 +16,8 @@ module Sentdm
16
16
  def send_: (
17
17
  ?channel: ::Array[String]?,
18
18
  ?sandbox: bool,
19
- ?template: Sentdm::MessageSendParams::Template,
19
+ ?template: Sentdm::MessageSendParams::Template?,
20
+ ?text: String?,
20
21
  ?to: ::Array[String],
21
22
  ?idempotency_key: String,
22
23
  ?x_profile_id: String,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentdm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sent
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-21 00:00:00.000000000 Z
11
+ date: 2026-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi