Skip to content

Commit a3b9688

Browse files
author
stlc-bot
committed
feat(api)!: markets move to channels.markets and 10DLC numbers to markets.add_numbers
Stainless-Generated-From: 4c6f785
1 parent 7935be4 commit a3b9688

147 files changed

Lines changed: 12105 additions & 3030 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 86
1+
configured_endpoints: 88

‎buildSrc/src/main/kotlin/sent.publish.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎sent-java-core/src/main/kotlin/dm/sent/client/SentClient.kt‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ interface SentClient {
139139
* markets under **Channels** — so a recipient in a country you hold no sender for is refused
140140
* here rather than queued.
141141
*
142-
* **A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished
143-
* message — typically one BLOCKED for insufficient balance — back through the send pipeline. It
144-
* is a new attempt, not a free retry: every policy runs again, the message is billed again, and
145-
* its status webhooks fire again. A FILTERED message is never resendable.
142+
* **A message can be resent.** `POST /v3/messages/{id}/resend` sends a finished message —
143+
* typically one BLOCKED for insufficient balance — again, as a new message with its own id. It
144+
* is a new send, not a free retry: every policy runs again, the new message is billed, and its
145+
* status webhooks fire for its own id. A FILTERED message is never resendable.
146146
*
147147
* **A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you
148148
* scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free,
@@ -337,10 +337,10 @@ interface SentClient {
337337
* the markets under **Channels** — so a recipient in a country you hold no sender for is
338338
* refused here rather than queued.
339339
*
340-
* **A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished
341-
* message — typically one BLOCKED for insufficient balance — back through the send
342-
* pipeline. It is a new attempt, not a free retry: every policy runs again, the message is
343-
* billed again, and its status webhooks fire again. A FILTERED message is never resendable.
340+
* **A message can be resent.** `POST /v3/messages/{id}/resend` sends a finished message —
341+
* typically one BLOCKED for insufficient balance — again, as a new message with its own id.
342+
* It is a new send, not a free retry: every policy runs again, the new message is billed,
343+
* and its status webhooks fire for its own id. A FILTERED message is never resendable.
344344
*
345345
* **A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send
346346
* you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is

‎sent-java-core/src/main/kotlin/dm/sent/client/SentClientAsync.kt‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ interface SentClientAsync {
139139
* markets under **Channels** — so a recipient in a country you hold no sender for is refused
140140
* here rather than queued.
141141
*
142-
* **A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished
143-
* message — typically one BLOCKED for insufficient balance — back through the send pipeline. It
144-
* is a new attempt, not a free retry: every policy runs again, the message is billed again, and
145-
* its status webhooks fire again. A FILTERED message is never resendable.
142+
* **A message can be resent.** `POST /v3/messages/{id}/resend` sends a finished message —
143+
* typically one BLOCKED for insufficient balance — again, as a new message with its own id. It
144+
* is a new send, not a free retry: every policy runs again, the new message is billed, and its
145+
* status webhooks fire for its own id. A FILTERED message is never resendable.
146146
*
147147
* **A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you
148148
* scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free,
@@ -337,10 +337,10 @@ interface SentClientAsync {
337337
* the markets under **Channels** — so a recipient in a country you hold no sender for is
338338
* refused here rather than queued.
339339
*
340-
* **A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished
341-
* message — typically one BLOCKED for insufficient balance — back through the send
342-
* pipeline. It is a new attempt, not a free retry: every policy runs again, the message is
343-
* billed again, and its status webhooks fire again. A FILTERED message is never resendable.
340+
* **A message can be resent.** `POST /v3/messages/{id}/resend` sends a finished message —
341+
* typically one BLOCKED for insufficient balance — again, as a new message with its own id.
342+
* It is a new send, not a free retry: every policy runs again, the new message is billed,
343+
* and its status webhooks fire for its own id. A FILTERED message is never resendable.
344344
*
345345
* **A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send
346346
* you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is

‎sent-java-core/src/main/kotlin/dm/sent/client/SentClientAsyncImpl.kt‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ class SentClientAsyncImpl(private val clientOptions: ClientOptions) : SentClient
189189
* markets under **Channels** — so a recipient in a country you hold no sender for is refused
190190
* here rather than queued.
191191
*
192-
* **A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished
193-
* message — typically one BLOCKED for insufficient balance — back through the send pipeline. It
194-
* is a new attempt, not a free retry: every policy runs again, the message is billed again, and
195-
* its status webhooks fire again. A FILTERED message is never resendable.
192+
* **A message can be resent.** `POST /v3/messages/{id}/resend` sends a finished message —
193+
* typically one BLOCKED for insufficient balance — again, as a new message with its own id. It
194+
* is a new send, not a free retry: every policy runs again, the new message is billed, and its
195+
* status webhooks fire for its own id. A FILTERED message is never resendable.
196196
*
197197
* **A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you
198198
* scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free,
@@ -428,10 +428,10 @@ class SentClientAsyncImpl(private val clientOptions: ClientOptions) : SentClient
428428
* the markets under **Channels** — so a recipient in a country you hold no sender for is
429429
* refused here rather than queued.
430430
*
431-
* **A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished
432-
* message — typically one BLOCKED for insufficient balance — back through the send
433-
* pipeline. It is a new attempt, not a free retry: every policy runs again, the message is
434-
* billed again, and its status webhooks fire again. A FILTERED message is never resendable.
431+
* **A message can be resent.** `POST /v3/messages/{id}/resend` sends a finished message —
432+
* typically one BLOCKED for insufficient balance — again, as a new message with its own id.
433+
* It is a new send, not a free retry: every policy runs again, the new message is billed,
434+
* and its status webhooks fire for its own id. A FILTERED message is never resendable.
435435
*
436436
* **A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send
437437
* you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is

‎sent-java-core/src/main/kotlin/dm/sent/client/SentClientImpl.kt‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ class SentClientImpl(private val clientOptions: ClientOptions) : SentClient {
175175
* markets under **Channels** — so a recipient in a country you hold no sender for is refused
176176
* here rather than queued.
177177
*
178-
* **A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished
179-
* message — typically one BLOCKED for insufficient balance — back through the send pipeline. It
180-
* is a new attempt, not a free retry: every policy runs again, the message is billed again, and
181-
* its status webhooks fire again. A FILTERED message is never resendable.
178+
* **A message can be resent.** `POST /v3/messages/{id}/resend` sends a finished message —
179+
* typically one BLOCKED for insufficient balance — again, as a new message with its own id. It
180+
* is a new send, not a free retry: every policy runs again, the new message is billed, and its
181+
* status webhooks fire for its own id. A FILTERED message is never resendable.
182182
*
183183
* **A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send you
184184
* scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is free,
@@ -414,10 +414,10 @@ class SentClientImpl(private val clientOptions: ClientOptions) : SentClient {
414414
* the markets under **Channels** — so a recipient in a country you hold no sender for is
415415
* refused here rather than queued.
416416
*
417-
* **A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a finished
418-
* message — typically one BLOCKED for insufficient balance — back through the send
419-
* pipeline. It is a new attempt, not a free retry: every policy runs again, the message is
420-
* billed again, and its status webhooks fire again. A FILTERED message is never resendable.
417+
* **A message can be resent.** `POST /v3/messages/{id}/resend` sends a finished message —
418+
* typically one BLOCKED for insufficient balance — again, as a new message with its own id.
419+
* It is a new send, not a free retry: every policy runs again, the new message is billed,
420+
* and its status webhooks fire for its own id. A FILTERED message is never resendable.
421421
*
422422
* **A scheduled message can be called off.** `POST /v3/messages/{id}/cancel` cancels a send
423423
* you scheduled with `scheduled_at`, as long as it has not been released yet. Cancelling is

‎sent-java-core/src/main/kotlin/dm/sent/models/channels/ChannelsState.kt‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import dm.sent.core.JsonValue
1313
import dm.sent.core.checkKnown
1414
import dm.sent.core.toImmutable
1515
import dm.sent.errors.SentInvalidDataException
16+
import dm.sent.models.channels.markets.ChannelMarket
1617
import dm.sent.models.channels.rcs.RcsAgent
17-
import dm.sent.models.channels.sms.SmsMarket
1818
import dm.sent.models.channels.voice.VoiceNumber
1919
import dm.sent.models.channels.whatsapp.WhatsappChannel
2020
import java.util.Collections
@@ -32,7 +32,7 @@ private constructor(
3232
private val customerId: JsonField<String>,
3333
private val mms: JsonField<List<MmsMarket>>,
3434
private val rcs: JsonField<RcsAgent>,
35-
private val sms: JsonField<List<SmsMarket>>,
35+
private val sms: JsonField<List<ChannelMarket>>,
3636
private val voice: JsonField<List<VoiceNumber>>,
3737
private val whatsapp: JsonField<WhatsappChannel>,
3838
private val additionalProperties: MutableMap<String, JsonValue>,
@@ -45,7 +45,7 @@ private constructor(
4545
customerId: JsonField<String> = JsonMissing.of(),
4646
@JsonProperty("mms") @ExcludeMissing mms: JsonField<List<MmsMarket>> = JsonMissing.of(),
4747
@JsonProperty("rcs") @ExcludeMissing rcs: JsonField<RcsAgent> = JsonMissing.of(),
48-
@JsonProperty("sms") @ExcludeMissing sms: JsonField<List<SmsMarket>> = JsonMissing.of(),
48+
@JsonProperty("sms") @ExcludeMissing sms: JsonField<List<ChannelMarket>> = JsonMissing.of(),
4949
@JsonProperty("voice")
5050
@ExcludeMissing
5151
voice: JsonField<List<VoiceNumber>> = JsonMissing.of(),
@@ -102,7 +102,7 @@ private constructor(
102102
* @throws SentInvalidDataException if the JSON field has an unexpected type (e.g. if the server
103103
* responded with an unexpected value).
104104
*/
105-
fun sms(): Optional<List<SmsMarket>> = sms.getOptional("sms")
105+
fun sms(): Optional<List<ChannelMarket>> = sms.getOptional("sms")
106106

107107
/**
108108
* The numbers this profile carries phone calls on, one entry per number, or empty when none.
@@ -148,7 +148,7 @@ private constructor(
148148
*
149149
* Unlike [sms], this method doesn't throw if the JSON field has an unexpected type.
150150
*/
151-
@JsonProperty("sms") @ExcludeMissing fun _sms(): JsonField<List<SmsMarket>> = sms
151+
@JsonProperty("sms") @ExcludeMissing fun _sms(): JsonField<List<ChannelMarket>> = sms
152152

153153
/**
154154
* Returns the raw JSON value of [voice].
@@ -188,7 +188,7 @@ private constructor(
188188
private var customerId: JsonField<String> = JsonMissing.of()
189189
private var mms: JsonField<MutableList<MmsMarket>>? = null
190190
private var rcs: JsonField<RcsAgent> = JsonMissing.of()
191-
private var sms: JsonField<MutableList<SmsMarket>>? = null
191+
private var sms: JsonField<MutableList<ChannelMarket>>? = null
192192
private var voice: JsonField<MutableList<VoiceNumber>>? = null
193193
private var whatsapp: JsonField<WhatsappChannel> = JsonMissing.of()
194194
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
@@ -283,25 +283,25 @@ private constructor(
283283
*/
284284
fun rcs(rcs: JsonField<RcsAgent>) = apply { this.rcs = rcs }
285285

286-
fun sms(sms: List<SmsMarket>) = sms(JsonField.of(sms))
286+
fun sms(sms: List<ChannelMarket>) = sms(JsonField.of(sms))
287287

288288
/**
289289
* Sets [Builder.sms] to an arbitrary JSON value.
290290
*
291-
* You should usually call [Builder.sms] with a well-typed `List<SmsMarket>` value instead.
292-
* This method is primarily for setting the field to an undocumented or not yet supported
293-
* value.
291+
* You should usually call [Builder.sms] with a well-typed `List<ChannelMarket>` value
292+
* instead. This method is primarily for setting the field to an undocumented or not yet
293+
* supported value.
294294
*/
295-
fun sms(sms: JsonField<List<SmsMarket>>) = apply {
295+
fun sms(sms: JsonField<List<ChannelMarket>>) = apply {
296296
this.sms = sms.map { it.toMutableList() }
297297
}
298298

299299
/**
300-
* Adds a single [SmsMarket] to [Builder.sms].
300+
* Adds a single [ChannelMarket] to [Builder.sms].
301301
*
302302
* @throws IllegalStateException if the field was previously set to a non-list.
303303
*/
304-
fun addSms(sms: SmsMarket) = apply {
304+
fun addSms(sms: ChannelMarket) = apply {
305305
this.sms =
306306
(this.sms ?: JsonField.of(mutableListOf())).also { checkKnown("sms", it).add(sms) }
307307
}

‎sent-java-core/src/main/kotlin/dm/sent/models/channels/MmsMarket.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import kotlin.jvm.optionals.getOrNull
1919
/**
2020
* One market the profile can send MMS in.
2121
*
22-
* Deliberately not SmsMarketState: an MMS market carries no compliance of its own. It is the same
23-
* number, carrier and registration as the SMS market on it in that country — MMS files nothing
22+
* Deliberately not ChannelMarketState: an MMS market carries no compliance of its own. It is the
23+
* same number, carrier and registration as the SMS market on it in that country — MMS files nothing
2424
* separately — so a compliance block here would always be null and would invite the question of
2525
* what an MMS market owes. It owes what the SMS market owes, reported there.
2626
*/

0 commit comments

Comments
 (0)