sentdm 0.46.0 → 0.48.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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +1 -1
  4. data/lib/sentdm/client.rb +2 -2
  5. data/lib/sentdm/models/channels/sms/api_response_of_supplied_compliance.rb +67 -0
  6. data/lib/sentdm/models/channels/sms/ten_dlc_add_campaign_params.rb +161 -0
  7. data/lib/sentdm/models/channels/sms/ten_dlc_add_numbers_params.rb +65 -0
  8. data/lib/sentdm/models/channels/sms/ten_dlc_campaign_use_case.rb +56 -0
  9. data/lib/sentdm/models/channels/sms/ten_dlc_retrieve_compliance_params.rb +24 -0
  10. data/lib/sentdm/models/channels/sms/ten_dlc_update_campaign_params.rb +168 -0
  11. data/lib/sentdm/models/channels/sms_market.rb +1 -11
  12. data/lib/sentdm/models/channels/sms_number.rb +12 -1
  13. data/lib/sentdm/models/channels/supplied_campaign.rb +10 -0
  14. data/lib/sentdm/models/channels/supplied_compliance.rb +27 -1
  15. data/lib/sentdm/models/profiles/brand_campaign.rb +11 -1
  16. data/lib/sentdm/models/voice/call.rb +4 -3
  17. data/lib/sentdm/resources/channels/sms/ten_dlc.rb +310 -0
  18. data/lib/sentdm/resources/channels/sms.rb +35 -1
  19. data/lib/sentdm/resources/profiles/campaigns.rb +4 -1
  20. data/lib/sentdm/resources/sender_profiles.rb +5 -3
  21. data/lib/sentdm/resources/voice/calls/participants.rb +5 -5
  22. data/lib/sentdm/version.rb +1 -1
  23. data/lib/sentdm.rb +8 -0
  24. data/rbi/sentdm/client.rbi +2 -2
  25. data/rbi/sentdm/models/channels/sms/api_response_of_supplied_compliance.rbi +117 -0
  26. data/rbi/sentdm/models/channels/sms/ten_dlc_add_campaign_params.rbi +255 -0
  27. data/rbi/sentdm/models/channels/sms/ten_dlc_add_numbers_params.rbi +100 -0
  28. data/rbi/sentdm/models/channels/sms/ten_dlc_campaign_use_case.rbi +143 -0
  29. data/rbi/sentdm/models/channels/sms/ten_dlc_retrieve_compliance_params.rbi +45 -0
  30. data/rbi/sentdm/models/channels/sms/ten_dlc_update_campaign_params.rbi +264 -0
  31. data/rbi/sentdm/models/channels/sms_market.rbi +0 -12
  32. data/rbi/sentdm/models/channels/sms_number.rbi +14 -0
  33. data/rbi/sentdm/models/channels/supplied_campaign.rbi +13 -0
  34. data/rbi/sentdm/models/channels/supplied_compliance.rbi +40 -0
  35. data/rbi/sentdm/models/profiles/brand_campaign.rbi +15 -0
  36. data/rbi/sentdm/models/voice/call.rbi +8 -6
  37. data/rbi/sentdm/resources/channels/sms/ten_dlc.rbi +358 -0
  38. data/rbi/sentdm/resources/channels/sms.rbi +34 -1
  39. data/rbi/sentdm/resources/profiles/campaigns.rbi +4 -1
  40. data/rbi/sentdm/resources/sender_profiles.rbi +5 -3
  41. data/rbi/sentdm/resources/voice/calls/participants.rbi +5 -5
  42. data/sig/sentdm/models/channels/sms/api_response_of_supplied_compliance.rbs +43 -0
  43. data/sig/sentdm/models/channels/sms/ten_dlc_add_campaign_params.rbs +130 -0
  44. data/sig/sentdm/models/channels/sms/ten_dlc_add_numbers_params.rbs +54 -0
  45. data/sig/sentdm/models/channels/sms/ten_dlc_campaign_use_case.rbs +60 -0
  46. data/sig/sentdm/models/channels/sms/ten_dlc_retrieve_compliance_params.rbs +29 -0
  47. data/sig/sentdm/models/channels/sms/ten_dlc_update_campaign_params.rbs +137 -0
  48. data/sig/sentdm/models/channels/sms_market.rbs +0 -5
  49. data/sig/sentdm/models/channels/sms_number.rbs +10 -1
  50. data/sig/sentdm/models/channels/supplied_campaign.rbs +9 -0
  51. data/sig/sentdm/models/channels/supplied_compliance.rbs +5 -0
  52. data/sig/sentdm/models/profiles/brand_campaign.rbs +7 -0
  53. data/sig/sentdm/resources/channels/sms/ten_dlc.rbs +64 -0
  54. data/sig/sentdm/resources/channels/sms.rbs +2 -0
  55. metadata +26 -2
@@ -0,0 +1,358 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Resources
5
+ class Channels
6
+ class SMS
7
+ # The senders you send from, one per channel.
8
+ #
9
+ # **SMS is a list of markets**, each keyed by `(country, number_type)` — a
10
+ # customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
11
+ # addressed by the pair rather than by country alone. **WhatsApp and RCS are
12
+ # single**: a customer has one business account and one agent. **Voice is per
13
+ # number**: each number you hold can carry phone calls on its own
14
+ # (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
15
+ # with its calls, one of them is the default line for calls placed from your app,
16
+ # and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
17
+ # numbers with `GET /v3/channels/voice` and change one with
18
+ # `PATCH /v3/channels/voice/{number}`.
19
+ #
20
+ # ## Compliance lives on the market
21
+ #
22
+ # Adding a market records everything that market registers with, in its
23
+ # `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
24
+ # Campaign Registry — and it is the only market whose compliance carries `brand`
25
+ # and `campaign`. Everywhere else compliance is documents, and many markets ask
26
+ # for none at all.
27
+ #
28
+ # `GET` and `PATCH` on a market return and accept the same shape, so what comes
29
+ # back can be sent back: an omitted key is left alone, and a key reported in
30
+ # `requirements` is the path into the body that clears it.
31
+ #
32
+ # Call `GET /v3/compliance/requirements` first — it answers what a market demands
33
+ # before you hold it, with a body you can fill in and post.
34
+ class TenDlc
35
+ # Registers **a new campaign** on the US `TEN_DLC` market you already hold — the
36
+ # one market that registers campaigns. Use it when you want numbers for a
37
+ # different use case than the market's existing campaign covers. The campaign is
38
+ # filed under the brand the market files under — your organization's when you
39
+ # inherit its identity.
40
+ #
41
+ # ## What to send
42
+ #
43
+ # The new campaign's fields, at the top level of the body: use cases, consent
44
+ # narrative, volume, sample messages and keywords, under the
45
+ # `compliance.campaign.*` keys
46
+ # `GET /v3/compliance/requirements?country=US&type=TEN_DLC` lists, without that
47
+ # prefix. It has to be complete. A rejected field is keyed by its name
48
+ # (`description`). `id` and `inherit` are ignored, so an entry of
49
+ # `compliance.campaigns` can be sent as read.
50
+ #
51
+ # The identity is the market's and is not sent here. A market whose identity has
52
+ # no registration yet, or one not yet submitted for review, is `400`.
53
+ #
54
+ # ## What happens
55
+ #
56
+ # The campaign is recorded and goes for review; it is not filed with The Campaign
57
+ # Registry by this call. **It comes without numbers**: send its `id` from
58
+ # `compliance.campaigns` to `POST /v3/channels/sms/numbers/US/TEN_DLC` to give it
59
+ # some. **The campaign you already have, and its numbers, are not touched** —
60
+ # including a campaign you run on from your organization.
61
+ #
62
+ # **Each call files a new campaign**, which is charged when it is submitted. Send
63
+ # an `Idempotency-Key` so a retried request does not file a second one.
64
+ #
65
+ # To change the campaign a market already has, use
66
+ # `PATCH /v3/channels/sms/US/TEN_DLC`. Once a market holds more than one campaign,
67
+ # that `PATCH` refuses a campaign or numbers change (`409`) rather than guess
68
+ # which campaign is meant; numbers are added to a named campaign with
69
+ # `POST /v3/channels/sms/numbers/US/TEN_DLC`.
70
+ #
71
+ # Returns **the market**, in the shape `GET /v3/channels/sms/US/TEN_DLC` returns,
72
+ # with `202`.
73
+ sig do
74
+ params(
75
+ idempotency_key: String,
76
+ description: String,
77
+ help_keywords: String,
78
+ help_message: String,
79
+ message_flow: String,
80
+ opt_in_keywords: String,
81
+ opt_in_message: String,
82
+ opt_out_keywords: String,
83
+ opt_out_message: String,
84
+ privacy_policy_link: String,
85
+ sandbox: T::Boolean,
86
+ terms_and_conditions_link: String,
87
+ use_cases:
88
+ T::Array[Sentdm::Channels::SMS::TenDlcCampaignUseCase::OrHash],
89
+ volume: String,
90
+ x_profile_id: String,
91
+ request_options: Sentdm::RequestOptions::OrHash
92
+ ).returns(Sentdm::Channels::APIResponseOfSMSMarket)
93
+ end
94
+ def add_campaign(
95
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
96
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
97
+ # hours per key per customer.
98
+ idempotency_key:,
99
+ # Body param: What this programme sends. TCR description: what recipients will get
100
+ # and why, in a sentence. The only one of these TCR takes verbatim as a
101
+ # description of the programme, which is why it is asked for rather than derived
102
+ # from the customer's name. Required when `compliance.campaign.inherit != true`.
103
+ description: nil,
104
+ # Body param: Help keywords. TCR helpKeywords, comma separated, e.g. HELP,INFO.
105
+ # Required when `compliance.campaign.inherit != true`.
106
+ help_keywords: nil,
107
+ # Body param: Help reply. TCR helpMessage. Its presence is what sets
108
+ # subscriberHelp. Required when `compliance.campaign.inherit != true`.
109
+ help_message: nil,
110
+ # Body param: Consent narrative. TCR messageFlow: how recipients opt in, in prose.
111
+ # Under 40 characters is refused, and carriers reject vague descriptions — say
112
+ # where opt-in happens, that the box is unchecked by default, and that consent is
113
+ # not a condition of purchase. Required when
114
+ # `compliance.campaign.inherit != true`.
115
+ message_flow: nil,
116
+ # Body param: Opt-in keywords. TCR optinKeywords, comma separated, e.g. START,YES.
117
+ # Required when `compliance.campaign.inherit != true`.
118
+ opt_in_keywords: nil,
119
+ # Body param: Opt-in confirmation. TCR optinMessage. Should state message
120
+ # frequency and that rates may apply. Its presence is what sets subscriberOptin.
121
+ # Required when `compliance.campaign.inherit != true`.
122
+ opt_in_message: nil,
123
+ # Body param: Opt-out keywords. TCR optoutKeywords, comma separated. STOP, END,
124
+ # CANCEL, UNSUBSCRIBE and QUIT are honoured regardless of what is declared.
125
+ # Required when `compliance.campaign.inherit != true`.
126
+ opt_out_keywords: nil,
127
+ # Body param: Opt-out confirmation. TCR optoutMessage. Its presence is what sets
128
+ # subscriberOptout. Required when `compliance.campaign.inherit != true`.
129
+ opt_out_message: nil,
130
+ # Body param: Privacy policy URL. TCR privacyPolicyLink. Required when
131
+ # `compliance.campaign.inherit != true`.
132
+ privacy_policy_link: nil,
133
+ # Body param: Sandbox flag - when true, the operation is simulated without side
134
+ # effects Useful for testing integrations without actual execution
135
+ sandbox: nil,
136
+ # Body param: Terms and conditions URL. TCR termsAndConditionsLink. Required when
137
+ # `compliance.campaign.inherit != true`.
138
+ terms_and_conditions_link: nil,
139
+ # Body param: Use cases. What the campaign sends, and an example of each. One to
140
+ # five entries; how they register is decided by volume, never declared. Required
141
+ # when `compliance.campaign.inherit != true`.
142
+ use_cases: nil,
143
+ # Body param: Expected monthly volume. Decides how the campaign registers and
144
+ # which fee tier applies: below the low-volume threshold it registers as
145
+ # LOW_VOLUME with sub-use-cases, above it as a single use case or MIXED. Omitting
146
+ # it registers the campaign at the higher-fee standard tier.
147
+ volume: nil,
148
+ # Header param: Profile UUID to scope the request to a child profile. Only
149
+ # organization API keys can use this header. The profile must belong to the
150
+ # calling organization.
151
+ x_profile_id: nil,
152
+ request_options: {}
153
+ )
154
+ end
155
+
156
+ # Adds numbers to **one campaign of your own** on the US `TEN_DLC` market you
157
+ # hold, named by `campaign_id` — the `id` of an entry in the market's
158
+ # `compliance.campaigns`.
159
+ #
160
+ # ## What to send
161
+ #
162
+ # - `campaign_id` — the campaign. One you inherit from your organization is `400`:
163
+ # its numbers are the organization's. One out of service — expired, deactivated
164
+ # or released — is `409`.
165
+ # - `numbers` — the list `POST /v3/channels/sms` takes, one entry per area code.
166
+ #
167
+ # ## What happens
168
+ #
169
+ # The entries are **added** to what the campaign already asks for. With everything
170
+ # it asks for, a campaign holds at most 49 numbers, counting one for each sender
171
+ # profile inheriting it. A campaign the carriers have not approved yet gets its
172
+ # numbers when they do; an approved one gets them now. Until a number is assigned
173
+ # it reads as `PROVISIONING` in the market's `numbers`, with the area code it was
174
+ # asked for.
175
+ #
176
+ # Returns **the market**, in the shape `GET /v3/channels/sms/US/TEN_DLC` returns,
177
+ # with `202`.
178
+ sig do
179
+ params(
180
+ campaign_id: String,
181
+ numbers:
182
+ T::Array[T.nilable(Sentdm::Channels::SMSNumberRequest::OrHash)],
183
+ idempotency_key: String,
184
+ sandbox: T::Boolean,
185
+ x_profile_id: String,
186
+ request_options: Sentdm::RequestOptions::OrHash
187
+ ).returns(Sentdm::Channels::APIResponseOfSMSMarket)
188
+ end
189
+ def add_numbers(
190
+ # Body param: The campaign to add the numbers to, as compliance.campaigns[].id
191
+ # reports it. Required.
192
+ campaign_id:,
193
+ # Body param: The numbers to add, one entry per area code, e.g. [{"area_code":
194
+ # "415", "quantity": 2}, {"quantity": 1}]. quantity defaults to 1, and an entry
195
+ # without area_code means any area code. Required.
196
+ #
197
+ # Added to what the campaign already asks for, never replacing it.
198
+ numbers:,
199
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
200
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
201
+ # hours per key per customer.
202
+ idempotency_key:,
203
+ # Body param: Sandbox flag - when true, the operation is simulated without side
204
+ # effects Useful for testing integrations without actual execution
205
+ sandbox: nil,
206
+ # Header param: Profile UUID to scope the request to a child profile. Only
207
+ # organization API keys can use this header. The profile must belong to the
208
+ # calling organization.
209
+ x_profile_id: nil,
210
+ request_options: {}
211
+ )
212
+ end
213
+
214
+ # Reads what the US `TEN_DLC` market you hold has registered: the `brand` it files
215
+ # under, **every campaign** under `campaigns` (each with its `id` and `inherit`),
216
+ # and its `documents`. It is the `compliance` object
217
+ # `GET /v3/channels/sms/US/TEN_DLC` returns, without the sender and numbers.
218
+ #
219
+ # Use a campaign's `id` to change it with
220
+ # `PATCH /v3/channels/sms/compliances/US/TEN_DLC/campaigns/{campaignId}`, or to
221
+ # add numbers to it with `POST /v3/channels/sms/numbers/US/TEN_DLC`.
222
+ #
223
+ # Send `x-profile-id` with an organization key to read one of your profiles'
224
+ # markets.
225
+ sig do
226
+ params(
227
+ x_profile_id: String,
228
+ request_options: Sentdm::RequestOptions::OrHash
229
+ ).returns(Sentdm::Channels::SMS::APIResponseOfSuppliedCompliance)
230
+ end
231
+ def retrieve_compliance(
232
+ # Profile UUID to scope the request to a child profile. Only organization API keys
233
+ # can use this header. The profile must belong to the calling organization.
234
+ x_profile_id: nil,
235
+ request_options: {}
236
+ )
237
+ end
238
+
239
+ # Changes **one campaign of your own** on the US `TEN_DLC` market, named by its
240
+ # `id` in the market's `compliance.campaigns`.
241
+ #
242
+ # ## What to send
243
+ #
244
+ # The fields to change, at the top level of the body, under the
245
+ # `compliance.campaign.*` keys
246
+ # `GET /v3/compliance/requirements?country=US&type=TEN_DLC` lists, without that
247
+ # prefix. A field you leave out keeps its value, and a rejected one is keyed by
248
+ # its name. `id` and `"inherit": false` are ignored, so an entry of
249
+ # `compliance.campaigns` can be sent as read; `"inherit": true` is `400`, because
250
+ # this call changes a campaign's fields, not whose campaign you run on. The
251
+ # campaign only: add numbers with `POST /v3/channels/sms/numbers/US/TEN_DLC`, and
252
+ # change the brand or documents with `PATCH /v3/channels/sms/US/TEN_DLC`.
253
+ #
254
+ # ## When it can be changed
255
+ #
256
+ # Until it is filed with The Campaign Registry, and again when we ask you to
257
+ # correct it. That correction sends it back for review. A filed campaign is
258
+ # otherwise `409`, and so is a change between low and high volume once it is
259
+ # registered. A campaign you run on from your organization is `409` too: it is the
260
+ # organization's to change. So is one out of service: expired, deactivated or
261
+ # released.
262
+ #
263
+ # Returns **the market**, in the shape `GET /v3/channels/sms/US/TEN_DLC` returns.
264
+ sig do
265
+ params(
266
+ campaign_id: String,
267
+ description: String,
268
+ help_keywords: String,
269
+ help_message: String,
270
+ message_flow: String,
271
+ opt_in_keywords: String,
272
+ opt_in_message: String,
273
+ opt_out_keywords: String,
274
+ opt_out_message: String,
275
+ privacy_policy_link: String,
276
+ sandbox: T::Boolean,
277
+ terms_and_conditions_link: String,
278
+ use_cases:
279
+ T::Array[Sentdm::Channels::SMS::TenDlcCampaignUseCase::OrHash],
280
+ volume: String,
281
+ idempotency_key: String,
282
+ x_profile_id: String,
283
+ request_options: Sentdm::RequestOptions::OrHash
284
+ ).returns(Sentdm::Channels::APIResponseOfSMSMarket)
285
+ end
286
+ def update_campaign(
287
+ # Path param: The campaign: its id in the market's compliance.campaigns.
288
+ campaign_id,
289
+ # Body param: What this programme sends. TCR description: what recipients will get
290
+ # and why, in a sentence. The only one of these TCR takes verbatim as a
291
+ # description of the programme, which is why it is asked for rather than derived
292
+ # from the customer's name. Required when `compliance.campaign.inherit != true`.
293
+ description: nil,
294
+ # Body param: Help keywords. TCR helpKeywords, comma separated, e.g. HELP,INFO.
295
+ # Required when `compliance.campaign.inherit != true`.
296
+ help_keywords: nil,
297
+ # Body param: Help reply. TCR helpMessage. Its presence is what sets
298
+ # subscriberHelp. Required when `compliance.campaign.inherit != true`.
299
+ help_message: nil,
300
+ # Body param: Consent narrative. TCR messageFlow: how recipients opt in, in prose.
301
+ # Under 40 characters is refused, and carriers reject vague descriptions — say
302
+ # where opt-in happens, that the box is unchecked by default, and that consent is
303
+ # not a condition of purchase. Required when
304
+ # `compliance.campaign.inherit != true`.
305
+ message_flow: nil,
306
+ # Body param: Opt-in keywords. TCR optinKeywords, comma separated, e.g. START,YES.
307
+ # Required when `compliance.campaign.inherit != true`.
308
+ opt_in_keywords: nil,
309
+ # Body param: Opt-in confirmation. TCR optinMessage. Should state message
310
+ # frequency and that rates may apply. Its presence is what sets subscriberOptin.
311
+ # Required when `compliance.campaign.inherit != true`.
312
+ opt_in_message: nil,
313
+ # Body param: Opt-out keywords. TCR optoutKeywords, comma separated. STOP, END,
314
+ # CANCEL, UNSUBSCRIBE and QUIT are honoured regardless of what is declared.
315
+ # Required when `compliance.campaign.inherit != true`.
316
+ opt_out_keywords: nil,
317
+ # Body param: Opt-out confirmation. TCR optoutMessage. Its presence is what sets
318
+ # subscriberOptout. Required when `compliance.campaign.inherit != true`.
319
+ opt_out_message: nil,
320
+ # Body param: Privacy policy URL. TCR privacyPolicyLink. Required when
321
+ # `compliance.campaign.inherit != true`.
322
+ privacy_policy_link: nil,
323
+ # Body param: Sandbox flag - when true, the operation is simulated without side
324
+ # effects Useful for testing integrations without actual execution
325
+ sandbox: nil,
326
+ # Body param: Terms and conditions URL. TCR termsAndConditionsLink. Required when
327
+ # `compliance.campaign.inherit != true`.
328
+ terms_and_conditions_link: nil,
329
+ # Body param: Use cases. What the campaign sends, and an example of each. One to
330
+ # five entries; how they register is decided by volume, never declared. Required
331
+ # when `compliance.campaign.inherit != true`.
332
+ use_cases: nil,
333
+ # Body param: Expected monthly volume. Decides how the campaign registers and
334
+ # which fee tier applies: below the low-volume threshold it registers as
335
+ # LOW_VOLUME with sub-use-cases, above it as a single use case or MIXED. Omitting
336
+ # it registers the campaign at the higher-fee standard tier.
337
+ volume: nil,
338
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
339
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
340
+ # hours per key per customer.
341
+ idempotency_key: nil,
342
+ # Header param: Profile UUID to scope the request to a child profile. Only
343
+ # organization API keys can use this header. The profile must belong to the
344
+ # calling organization.
345
+ x_profile_id: nil,
346
+ request_options: {}
347
+ )
348
+ end
349
+
350
+ # @api private
351
+ sig { params(client: Sentdm::Client).returns(T.attached_class) }
352
+ def self.new(client:)
353
+ end
354
+ end
355
+ end
356
+ end
357
+ end
358
+ end
@@ -31,6 +31,36 @@ module Sentdm
31
31
  # Call `GET /v3/compliance/requirements` first — it answers what a market demands
32
32
  # before you hold it, with a body you can fill in and post.
33
33
  class SMS
34
+ # The senders you send from, one per channel.
35
+ #
36
+ # **SMS is a list of markets**, each keyed by `(country, number_type)` — a
37
+ # customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
38
+ # addressed by the pair rather than by country alone. **WhatsApp and RCS are
39
+ # single**: a customer has one business account and one agent. **Voice is per
40
+ # number**: each number you hold can carry phone calls on its own
41
+ # (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
42
+ # with its calls, one of them is the default line for calls placed from your app,
43
+ # and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
44
+ # numbers with `GET /v3/channels/voice` and change one with
45
+ # `PATCH /v3/channels/voice/{number}`.
46
+ #
47
+ # ## Compliance lives on the market
48
+ #
49
+ # Adding a market records everything that market registers with, in its
50
+ # `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
51
+ # Campaign Registry — and it is the only market whose compliance carries `brand`
52
+ # and `campaign`. Everywhere else compliance is documents, and many markets ask
53
+ # for none at all.
54
+ #
55
+ # `GET` and `PATCH` on a market return and accept the same shape, so what comes
56
+ # back can be sent back: an omitted key is left alone, and a key reported in
57
+ # `requirements` is the path into the body that clears it.
58
+ #
59
+ # Call `GET /v3/compliance/requirements` first — it answers what a market demands
60
+ # before you hold it, with a body you can fill in and post.
61
+ sig { returns(Sentdm::Resources::Channels::SMS::TenDlc) }
62
+ attr_reader :ten_dlc
63
+
34
64
  # Gives the customer a sender in one country — the first market it sends in, and
35
65
  # the fifth.
36
66
  #
@@ -102,7 +132,10 @@ module Sentdm
102
132
  # read as `PROVISIONING` in the response's `numbers`, each with the area code it
103
133
  # was asked for. A profile inheriting your organization's campaign cannot request
104
134
  # `numbers` (`400`). `numbers` on a `TEN_DLC` market you already hold is `409`:
105
- # its numbers belong to its one campaign and are set when the market is created.
135
+ # change its campaign's numbers with `PATCH /v3/channels/sms/{country}/{type}`,
136
+ # add numbers to one of its campaigns with
137
+ # `POST /v3/channels/sms/numbers/US/TEN_DLC`, or add a new campaign with
138
+ # `POST /v3/channels/sms/compliances/US/TEN_DLC/campaigns`.
106
139
  #
107
140
  # **A market you already send in is `409`**: adding what is already there is a
108
141
  # mistake worth reporting rather than a silent no-op. A market is a
@@ -98,7 +98,10 @@ module Sentdm
98
98
  # explicitly.
99
99
  #
100
100
  # Retrieves all campaigns linked to the profile's brand, including use cases and
101
- # sample messages. Returns inherited campaigns if inherit_tcr_campaign=true.
101
+ # sample messages. A profile with inherit_tcr_campaign=true gets its
102
+ # organization's campaigns and, beside them, any campaign of its own (added with
103
+ # POST /v3/channels/sms/compliances/US/TEN_DLC/campaigns); `isInherited` says
104
+ # which is which.
102
105
  sig do
103
106
  params(
104
107
  profile_id: String,
@@ -14,8 +14,8 @@ module Sentdm
14
14
  # instead.
15
15
  #
16
16
  # **A sender is the exception.** A brand and a campaign can be inherited; a number
17
- # cannot. A profile either has a sender of its own or terminates through your
18
- # shared routes.
17
+ # cannot. A profile either has a sender of its own or reaches only the countries
18
+ # Sent runs a shared route for, and the US is not one of them.
19
19
  #
20
20
  # To act for a profile on any other resource, send `x-profile-id` with your
21
21
  # organization key rather than looking for a parallel set of endpoints.
@@ -34,7 +34,9 @@ module Sentdm
34
34
  #
35
35
  # **A sender is not one of them.** The brand and the campaign can be inherited; a
36
36
  # number cannot. A profile either has a sender of its own — `channels.sms` — or it
37
- # has none and terminates through the shared routes for that country.
37
+ # has none and reaches only the countries Sent runs a shared route for. The US has
38
+ # none: without a `TEN_DLC` number of its own, a profile's SMS to US numbers ends
39
+ # as `FAILED` with `DELIVERY_003`.
38
40
  #
39
41
  # ## Saying what a profile owns
40
42
  #
@@ -102,11 +102,11 @@ module Sentdm
102
102
  # conference room, and answers with the participant's own call record. The
103
103
  # participant is a call of their own: it has its own id, can be looked up and hung
104
104
  # up, and is billed and reported through call.completed and call.failed like any
105
- # other call. Every participant needs a positive balance. A phone participant is
106
- # called from caller_id, which must be one of your numbers, or from the call's
107
- # owning number when omitted, and needs a destination you may call. Only a call
108
- # your answer connected to a conference can take participants: a call connected to
109
- # a user or a number answers 409.
105
+ # other call. Every participant needs a payment method on file and a positive
106
+ # balance. A phone participant is called from caller_id, which must be one of your
107
+ # numbers, or from the call's owning number when omitted, and needs a destination
108
+ # you may call. Only a call your answer connected to a conference can take
109
+ # participants: a call connected to a user or a number answers 409.
110
110
  sig do
111
111
  params(
112
112
  id: String,
@@ -0,0 +1,43 @@
1
+ module Sentdm
2
+ module Models
3
+ module Channels
4
+ module SMS
5
+ type api_response_of_supplied_compliance =
6
+ {
7
+ data: Sentdm::Channels::SuppliedCompliance?,
8
+ error: Sentdm::ErrorDetail?,
9
+ meta: Sentdm::APIMeta,
10
+ success: bool
11
+ }
12
+
13
+ class APIResponseOfSuppliedCompliance < Sentdm::Internal::Type::BaseModel
14
+ attr_accessor data: Sentdm::Channels::SuppliedCompliance?
15
+
16
+ attr_accessor error: Sentdm::ErrorDetail?
17
+
18
+ attr_reader meta: Sentdm::APIMeta?
19
+
20
+ def meta=: (Sentdm::APIMeta) -> Sentdm::APIMeta
21
+
22
+ attr_reader success: bool?
23
+
24
+ def success=: (bool) -> bool
25
+
26
+ def initialize: (
27
+ ?data: Sentdm::Channels::SuppliedCompliance?,
28
+ ?error: Sentdm::ErrorDetail?,
29
+ ?meta: Sentdm::APIMeta,
30
+ ?success: bool
31
+ ) -> void
32
+
33
+ def to_hash: -> {
34
+ data: Sentdm::Channels::SuppliedCompliance?,
35
+ error: Sentdm::ErrorDetail?,
36
+ meta: Sentdm::APIMeta,
37
+ success: bool
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,130 @@
1
+ module Sentdm
2
+ module Models
3
+ module Channels
4
+ module SMS
5
+ type ten_dlc_add_campaign_params =
6
+ {
7
+ idempotency_key: String,
8
+ description: String,
9
+ help_keywords: String,
10
+ help_message: String,
11
+ message_flow: String,
12
+ opt_in_keywords: String,
13
+ opt_in_message: String,
14
+ opt_out_keywords: String,
15
+ opt_out_message: String,
16
+ privacy_policy_link: String,
17
+ sandbox: bool,
18
+ terms_and_conditions_link: String,
19
+ use_cases: ::Array[Sentdm::Channels::SMS::TenDlcCampaignUseCase],
20
+ volume: String,
21
+ x_profile_id: String
22
+ }
23
+ & Sentdm::Internal::Type::request_parameters
24
+
25
+ class TenDlcAddCampaignParams < Sentdm::Internal::Type::BaseModel
26
+ extend Sentdm::Internal::Type::RequestParameters::Converter
27
+ include Sentdm::Internal::Type::RequestParameters
28
+
29
+ attr_accessor idempotency_key: String
30
+
31
+ attr_reader description: String?
32
+
33
+ def description=: (String) -> String
34
+
35
+ attr_reader help_keywords: String?
36
+
37
+ def help_keywords=: (String) -> String
38
+
39
+ attr_reader help_message: String?
40
+
41
+ def help_message=: (String) -> String
42
+
43
+ attr_reader message_flow: String?
44
+
45
+ def message_flow=: (String) -> String
46
+
47
+ attr_reader opt_in_keywords: String?
48
+
49
+ def opt_in_keywords=: (String) -> String
50
+
51
+ attr_reader opt_in_message: String?
52
+
53
+ def opt_in_message=: (String) -> String
54
+
55
+ attr_reader opt_out_keywords: String?
56
+
57
+ def opt_out_keywords=: (String) -> String
58
+
59
+ attr_reader opt_out_message: String?
60
+
61
+ def opt_out_message=: (String) -> String
62
+
63
+ attr_reader privacy_policy_link: String?
64
+
65
+ def privacy_policy_link=: (String) -> String
66
+
67
+ attr_reader sandbox: bool?
68
+
69
+ def sandbox=: (bool) -> bool
70
+
71
+ attr_reader terms_and_conditions_link: String?
72
+
73
+ def terms_and_conditions_link=: (String) -> String
74
+
75
+ attr_reader use_cases: ::Array[Sentdm::Channels::SMS::TenDlcCampaignUseCase]?
76
+
77
+ def use_cases=: (
78
+ ::Array[Sentdm::Channels::SMS::TenDlcCampaignUseCase]
79
+ ) -> ::Array[Sentdm::Channels::SMS::TenDlcCampaignUseCase]
80
+
81
+ attr_reader volume: String?
82
+
83
+ def volume=: (String) -> String
84
+
85
+ attr_reader x_profile_id: String?
86
+
87
+ def x_profile_id=: (String) -> String
88
+
89
+ def initialize: (
90
+ idempotency_key: String,
91
+ ?description: String,
92
+ ?help_keywords: String,
93
+ ?help_message: String,
94
+ ?message_flow: String,
95
+ ?opt_in_keywords: String,
96
+ ?opt_in_message: String,
97
+ ?opt_out_keywords: String,
98
+ ?opt_out_message: String,
99
+ ?privacy_policy_link: String,
100
+ ?sandbox: bool,
101
+ ?terms_and_conditions_link: String,
102
+ ?use_cases: ::Array[Sentdm::Channels::SMS::TenDlcCampaignUseCase],
103
+ ?volume: String,
104
+ ?x_profile_id: String,
105
+ ?request_options: Sentdm::request_opts
106
+ ) -> void
107
+
108
+ def to_hash: -> {
109
+ idempotency_key: String,
110
+ description: String,
111
+ help_keywords: String,
112
+ help_message: String,
113
+ message_flow: String,
114
+ opt_in_keywords: String,
115
+ opt_in_message: String,
116
+ opt_out_keywords: String,
117
+ opt_out_message: String,
118
+ privacy_policy_link: String,
119
+ sandbox: bool,
120
+ terms_and_conditions_link: String,
121
+ use_cases: ::Array[Sentdm::Channels::SMS::TenDlcCampaignUseCase],
122
+ volume: String,
123
+ x_profile_id: String,
124
+ request_options: Sentdm::RequestOptions
125
+ }
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end