sentdm 0.47.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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/lib/sentdm/models/channels/sms/api_response_of_supplied_compliance.rb +67 -0
  5. data/lib/sentdm/models/channels/sms/ten_dlc_add_campaign_params.rb +161 -0
  6. data/lib/sentdm/models/channels/sms/ten_dlc_add_numbers_params.rb +65 -0
  7. data/lib/sentdm/models/channels/sms/ten_dlc_campaign_use_case.rb +56 -0
  8. data/lib/sentdm/models/channels/sms/ten_dlc_retrieve_compliance_params.rb +24 -0
  9. data/lib/sentdm/models/channels/sms/ten_dlc_update_campaign_params.rb +168 -0
  10. data/lib/sentdm/resources/channels/sms/ten_dlc.rb +310 -0
  11. data/lib/sentdm/resources/channels/sms.rb +31 -0
  12. data/lib/sentdm/version.rb +1 -1
  13. data/lib/sentdm.rb +7 -0
  14. data/rbi/sentdm/models/channels/sms/api_response_of_supplied_compliance.rbi +117 -0
  15. data/rbi/sentdm/models/channels/sms/ten_dlc_add_campaign_params.rbi +255 -0
  16. data/rbi/sentdm/models/channels/sms/ten_dlc_add_numbers_params.rbi +100 -0
  17. data/rbi/sentdm/models/channels/sms/ten_dlc_campaign_use_case.rbi +143 -0
  18. data/rbi/sentdm/models/channels/sms/ten_dlc_retrieve_compliance_params.rbi +45 -0
  19. data/rbi/sentdm/models/channels/sms/ten_dlc_update_campaign_params.rbi +264 -0
  20. data/rbi/sentdm/resources/channels/sms/ten_dlc.rbi +358 -0
  21. data/rbi/sentdm/resources/channels/sms.rbi +30 -0
  22. data/sig/sentdm/models/channels/sms/api_response_of_supplied_compliance.rbs +43 -0
  23. data/sig/sentdm/models/channels/sms/ten_dlc_add_campaign_params.rbs +130 -0
  24. data/sig/sentdm/models/channels/sms/ten_dlc_add_numbers_params.rbs +54 -0
  25. data/sig/sentdm/models/channels/sms/ten_dlc_campaign_use_case.rbs +60 -0
  26. data/sig/sentdm/models/channels/sms/ten_dlc_retrieve_compliance_params.rbs +29 -0
  27. data/sig/sentdm/models/channels/sms/ten_dlc_update_campaign_params.rbs +137 -0
  28. data/sig/sentdm/resources/channels/sms/ten_dlc.rbs +64 -0
  29. data/sig/sentdm/resources/channels/sms.rbs +2 -0
  30. metadata +22 -1
@@ -0,0 +1,310 @@
1
+ # frozen_string_literal: true
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
+ # Some parameter documentations has been truncated, see
36
+ # {Sentdm::Models::Channels::SMS::TenDlcAddCampaignParams} for more details.
37
+ #
38
+ # Registers **a new campaign** on the US `TEN_DLC` market you already hold — the
39
+ # one market that registers campaigns. Use it when you want numbers for a
40
+ # different use case than the market's existing campaign covers. The campaign is
41
+ # filed under the brand the market files under — your organization's when you
42
+ # inherit its identity.
43
+ #
44
+ # ## What to send
45
+ #
46
+ # The new campaign's fields, at the top level of the body: use cases, consent
47
+ # narrative, volume, sample messages and keywords, under the
48
+ # `compliance.campaign.*` keys
49
+ # `GET /v3/compliance/requirements?country=US&type=TEN_DLC` lists, without that
50
+ # prefix. It has to be complete. A rejected field is keyed by its name
51
+ # (`description`). `id` and `inherit` are ignored, so an entry of
52
+ # `compliance.campaigns` can be sent as read.
53
+ #
54
+ # The identity is the market's and is not sent here. A market whose identity has
55
+ # no registration yet, or one not yet submitted for review, is `400`.
56
+ #
57
+ # ## What happens
58
+ #
59
+ # The campaign is recorded and goes for review; it is not filed with The Campaign
60
+ # Registry by this call. **It comes without numbers**: send its `id` from
61
+ # `compliance.campaigns` to `POST /v3/channels/sms/numbers/US/TEN_DLC` to give it
62
+ # some. **The campaign you already have, and its numbers, are not touched** —
63
+ # including a campaign you run on from your organization.
64
+ #
65
+ # **Each call files a new campaign**, which is charged when it is submitted. Send
66
+ # an `Idempotency-Key` so a retried request does not file a second one.
67
+ #
68
+ # To change the campaign a market already has, use
69
+ # `PATCH /v3/channels/sms/US/TEN_DLC`. Once a market holds more than one campaign,
70
+ # that `PATCH` refuses a campaign or numbers change (`409`) rather than guess
71
+ # which campaign is meant; numbers are added to a named campaign with
72
+ # `POST /v3/channels/sms/numbers/US/TEN_DLC`.
73
+ #
74
+ # Returns **the market**, in the shape `GET /v3/channels/sms/US/TEN_DLC` returns,
75
+ # with `202`.
76
+ #
77
+ # @overload add_campaign(idempotency_key:, description: nil, help_keywords: nil, help_message: nil, message_flow: nil, opt_in_keywords: nil, opt_in_message: nil, opt_out_keywords: nil, opt_out_message: nil, privacy_policy_link: nil, sandbox: nil, terms_and_conditions_link: nil, use_cases: nil, volume: nil, x_profile_id: nil, request_options: {})
78
+ #
79
+ # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
80
+ #
81
+ # @param description [String] Body param: What this programme sends. TCR description: what recipients will get
82
+ #
83
+ # @param help_keywords [String] Body param: Help keywords. TCR helpKeywords, comma separated, e.g. HELP,INFO. Re
84
+ #
85
+ # @param help_message [String] Body param: Help reply. TCR helpMessage. Its presence is what sets subscriberHel
86
+ #
87
+ # @param message_flow [String] Body param: Consent narrative. TCR messageFlow: how recipients opt in, in prose.
88
+ #
89
+ # @param opt_in_keywords [String] Body param: Opt-in keywords. TCR optinKeywords, comma separated, e.g. START,YES.
90
+ #
91
+ # @param opt_in_message [String] Body param: Opt-in confirmation. TCR optinMessage. Should state message frequenc
92
+ #
93
+ # @param opt_out_keywords [String] Body param: Opt-out keywords. TCR optoutKeywords, comma separated. STOP, END, CA
94
+ #
95
+ # @param opt_out_message [String] Body param: Opt-out confirmation. TCR optoutMessage. Its presence is what sets s
96
+ #
97
+ # @param privacy_policy_link [String] Body param: Privacy policy URL. TCR privacyPolicyLink. Required when `compliance
98
+ #
99
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
100
+ #
101
+ # @param terms_and_conditions_link [String] Body param: Terms and conditions URL. TCR termsAndConditionsLink. Required when
102
+ #
103
+ # @param use_cases [Array<Sentdm::Models::Channels::SMS::TenDlcCampaignUseCase>] Body param: Use cases. What the campaign sends, and an example of each. One to f
104
+ #
105
+ # @param volume [String] Body param: Expected monthly volume. Decides how the campaign registers and whic
106
+ #
107
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
108
+ #
109
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
110
+ #
111
+ # @return [Sentdm::Models::Channels::APIResponseOfSMSMarket]
112
+ #
113
+ # @see Sentdm::Models::Channels::SMS::TenDlcAddCampaignParams
114
+ def add_campaign(params)
115
+ parsed, options = Sentdm::Channels::SMS::TenDlcAddCampaignParams.dump_request(params)
116
+ header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
117
+ @client.request(
118
+ method: :post,
119
+ path: "v3/channels/sms/compliances/US/TEN_DLC/campaigns",
120
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
121
+ body: parsed.except(*header_params.keys),
122
+ model: Sentdm::Channels::APIResponseOfSMSMarket,
123
+ options: options
124
+ )
125
+ end
126
+
127
+ # Some parameter documentations has been truncated, see
128
+ # {Sentdm::Models::Channels::SMS::TenDlcAddNumbersParams} for more details.
129
+ #
130
+ # Adds numbers to **one campaign of your own** on the US `TEN_DLC` market you
131
+ # hold, named by `campaign_id` — the `id` of an entry in the market's
132
+ # `compliance.campaigns`.
133
+ #
134
+ # ## What to send
135
+ #
136
+ # - `campaign_id` — the campaign. One you inherit from your organization is `400`:
137
+ # its numbers are the organization's. One out of service — expired, deactivated
138
+ # or released — is `409`.
139
+ # - `numbers` — the list `POST /v3/channels/sms` takes, one entry per area code.
140
+ #
141
+ # ## What happens
142
+ #
143
+ # The entries are **added** to what the campaign already asks for. With everything
144
+ # it asks for, a campaign holds at most 49 numbers, counting one for each sender
145
+ # profile inheriting it. A campaign the carriers have not approved yet gets its
146
+ # numbers when they do; an approved one gets them now. Until a number is assigned
147
+ # it reads as `PROVISIONING` in the market's `numbers`, with the area code it was
148
+ # asked for.
149
+ #
150
+ # Returns **the market**, in the shape `GET /v3/channels/sms/US/TEN_DLC` returns,
151
+ # with `202`.
152
+ #
153
+ # @overload add_numbers(campaign_id:, numbers:, idempotency_key:, sandbox: nil, x_profile_id: nil, request_options: {})
154
+ #
155
+ # @param campaign_id [String] Body param: The campaign to add the numbers to, as compliance.campaigns[].id rep
156
+ #
157
+ # @param numbers [Array<Sentdm::Models::Channels::SMSNumberRequest, nil>] Body param: The numbers to add, one entry per area code, e.g. [{"area_code": "41
158
+ #
159
+ # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
160
+ #
161
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
162
+ #
163
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
164
+ #
165
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
166
+ #
167
+ # @return [Sentdm::Models::Channels::APIResponseOfSMSMarket]
168
+ #
169
+ # @see Sentdm::Models::Channels::SMS::TenDlcAddNumbersParams
170
+ def add_numbers(params)
171
+ parsed, options = Sentdm::Channels::SMS::TenDlcAddNumbersParams.dump_request(params)
172
+ header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
173
+ @client.request(
174
+ method: :post,
175
+ path: "v3/channels/sms/numbers/US/TEN_DLC",
176
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
177
+ body: parsed.except(*header_params.keys),
178
+ model: Sentdm::Channels::APIResponseOfSMSMarket,
179
+ options: options
180
+ )
181
+ end
182
+
183
+ # Some parameter documentations has been truncated, see
184
+ # {Sentdm::Models::Channels::SMS::TenDlcRetrieveComplianceParams} for more
185
+ # details.
186
+ #
187
+ # Reads what the US `TEN_DLC` market you hold has registered: the `brand` it files
188
+ # under, **every campaign** under `campaigns` (each with its `id` and `inherit`),
189
+ # and its `documents`. It is the `compliance` object
190
+ # `GET /v3/channels/sms/US/TEN_DLC` returns, without the sender and numbers.
191
+ #
192
+ # Use a campaign's `id` to change it with
193
+ # `PATCH /v3/channels/sms/compliances/US/TEN_DLC/campaigns/{campaignId}`, or to
194
+ # add numbers to it with `POST /v3/channels/sms/numbers/US/TEN_DLC`.
195
+ #
196
+ # Send `x-profile-id` with an organization key to read one of your profiles'
197
+ # markets.
198
+ #
199
+ # @overload retrieve_compliance(x_profile_id: nil, request_options: {})
200
+ #
201
+ # @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
202
+ #
203
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
204
+ #
205
+ # @return [Sentdm::Models::Channels::SMS::APIResponseOfSuppliedCompliance]
206
+ #
207
+ # @see Sentdm::Models::Channels::SMS::TenDlcRetrieveComplianceParams
208
+ def retrieve_compliance(params = {})
209
+ parsed, options = Sentdm::Channels::SMS::TenDlcRetrieveComplianceParams.dump_request(params)
210
+ @client.request(
211
+ method: :get,
212
+ path: "v3/channels/sms/compliances/US/TEN_DLC",
213
+ headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
214
+ model: Sentdm::Channels::SMS::APIResponseOfSuppliedCompliance,
215
+ options: options
216
+ )
217
+ end
218
+
219
+ # Some parameter documentations has been truncated, see
220
+ # {Sentdm::Models::Channels::SMS::TenDlcUpdateCampaignParams} for more details.
221
+ #
222
+ # Changes **one campaign of your own** on the US `TEN_DLC` market, named by its
223
+ # `id` in the market's `compliance.campaigns`.
224
+ #
225
+ # ## What to send
226
+ #
227
+ # The fields to change, at the top level of the body, under the
228
+ # `compliance.campaign.*` keys
229
+ # `GET /v3/compliance/requirements?country=US&type=TEN_DLC` lists, without that
230
+ # prefix. A field you leave out keeps its value, and a rejected one is keyed by
231
+ # its name. `id` and `"inherit": false` are ignored, so an entry of
232
+ # `compliance.campaigns` can be sent as read; `"inherit": true` is `400`, because
233
+ # this call changes a campaign's fields, not whose campaign you run on. The
234
+ # campaign only: add numbers with `POST /v3/channels/sms/numbers/US/TEN_DLC`, and
235
+ # change the brand or documents with `PATCH /v3/channels/sms/US/TEN_DLC`.
236
+ #
237
+ # ## When it can be changed
238
+ #
239
+ # Until it is filed with The Campaign Registry, and again when we ask you to
240
+ # correct it. That correction sends it back for review. A filed campaign is
241
+ # otherwise `409`, and so is a change between low and high volume once it is
242
+ # registered. A campaign you run on from your organization is `409` too: it is the
243
+ # organization's to change. So is one out of service: expired, deactivated or
244
+ # released.
245
+ #
246
+ # Returns **the market**, in the shape `GET /v3/channels/sms/US/TEN_DLC` returns.
247
+ #
248
+ # @overload update_campaign(campaign_id, description: nil, help_keywords: nil, help_message: nil, message_flow: nil, opt_in_keywords: nil, opt_in_message: nil, opt_out_keywords: nil, opt_out_message: nil, privacy_policy_link: nil, sandbox: nil, terms_and_conditions_link: nil, use_cases: nil, volume: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
249
+ #
250
+ # @param campaign_id [String] Path param: The campaign: its id in the market's compliance.campaigns.
251
+ #
252
+ # @param description [String] Body param: What this programme sends. TCR description: what recipients will get
253
+ #
254
+ # @param help_keywords [String] Body param: Help keywords. TCR helpKeywords, comma separated, e.g. HELP,INFO. Re
255
+ #
256
+ # @param help_message [String] Body param: Help reply. TCR helpMessage. Its presence is what sets subscriberHel
257
+ #
258
+ # @param message_flow [String] Body param: Consent narrative. TCR messageFlow: how recipients opt in, in prose.
259
+ #
260
+ # @param opt_in_keywords [String] Body param: Opt-in keywords. TCR optinKeywords, comma separated, e.g. START,YES.
261
+ #
262
+ # @param opt_in_message [String] Body param: Opt-in confirmation. TCR optinMessage. Should state message frequenc
263
+ #
264
+ # @param opt_out_keywords [String] Body param: Opt-out keywords. TCR optoutKeywords, comma separated. STOP, END, CA
265
+ #
266
+ # @param opt_out_message [String] Body param: Opt-out confirmation. TCR optoutMessage. Its presence is what sets s
267
+ #
268
+ # @param privacy_policy_link [String] Body param: Privacy policy URL. TCR privacyPolicyLink. Required when `compliance
269
+ #
270
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
271
+ #
272
+ # @param terms_and_conditions_link [String] Body param: Terms and conditions URL. TCR termsAndConditionsLink. Required when
273
+ #
274
+ # @param use_cases [Array<Sentdm::Models::Channels::SMS::TenDlcCampaignUseCase>] Body param: Use cases. What the campaign sends, and an example of each. One to f
275
+ #
276
+ # @param volume [String] Body param: Expected monthly volume. Decides how the campaign registers and whic
277
+ #
278
+ # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
279
+ #
280
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
281
+ #
282
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
283
+ #
284
+ # @return [Sentdm::Models::Channels::APIResponseOfSMSMarket]
285
+ #
286
+ # @see Sentdm::Models::Channels::SMS::TenDlcUpdateCampaignParams
287
+ def update_campaign(campaign_id, params = {})
288
+ parsed, options = Sentdm::Channels::SMS::TenDlcUpdateCampaignParams.dump_request(params)
289
+ header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
290
+ @client.request(
291
+ method: :patch,
292
+ path: ["v3/channels/sms/compliances/US/TEN_DLC/campaigns/%1$s", campaign_id],
293
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
294
+ body: parsed.except(*header_params.keys),
295
+ model: Sentdm::Channels::APIResponseOfSMSMarket,
296
+ options: options
297
+ )
298
+ end
299
+
300
+ # @api private
301
+ #
302
+ # @param client [Sentdm::Client]
303
+ def initialize(client:)
304
+ @client = client
305
+ end
306
+ end
307
+ end
308
+ end
309
+ end
310
+ 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
+ # @return [Sentdm::Resources::Channels::SMS::TenDlc]
62
+ attr_reader :ten_dlc
63
+
34
64
  # Some parameter documentations has been truncated, see
35
65
  # {Sentdm::Models::Channels::SMSCreateParams} for more details.
36
66
  #
@@ -413,6 +443,7 @@ module Sentdm
413
443
  # @param client [Sentdm::Client]
414
444
  def initialize(client:)
415
445
  @client = client
446
+ @ten_dlc = Sentdm::Resources::Channels::SMS::TenDlc.new(client: client)
416
447
  end
417
448
  end
418
449
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentdm
4
- VERSION = "0.47.0"
4
+ VERSION = "0.48.0"
5
5
  end
data/lib/sentdm.rb CHANGED
@@ -128,6 +128,12 @@ require_relative "sentdm/models/channels/market_compliance"
128
128
  require_relative "sentdm/models/channels/rc_create_params"
129
129
  require_relative "sentdm/models/channels/rcs_address"
130
130
  require_relative "sentdm/models/channels/rcs_agent"
131
+ require_relative "sentdm/models/channels/sms/api_response_of_supplied_compliance"
132
+ require_relative "sentdm/models/channels/sms/ten_dlc_add_campaign_params"
133
+ require_relative "sentdm/models/channels/sms/ten_dlc_add_numbers_params"
134
+ require_relative "sentdm/models/channels/sms/ten_dlc_campaign_use_case"
135
+ require_relative "sentdm/models/channels/sms/ten_dlc_retrieve_compliance_params"
136
+ require_relative "sentdm/models/channels/sms/ten_dlc_update_campaign_params"
131
137
  require_relative "sentdm/models/channels/sms_create_params"
132
138
  require_relative "sentdm/models/channels/sms_list_params"
133
139
  require_relative "sentdm/models/channels/sms_market"
@@ -350,6 +356,7 @@ require_relative "sentdm/models"
350
356
  require_relative "sentdm/resources/channels"
351
357
  require_relative "sentdm/resources/channels/rcs"
352
358
  require_relative "sentdm/resources/channels/sms"
359
+ require_relative "sentdm/resources/channels/sms/ten_dlc"
353
360
  require_relative "sentdm/resources/channels/voice"
354
361
  require_relative "sentdm/resources/channels/whatsapp"
355
362
  require_relative "sentdm/resources/compliance"
@@ -0,0 +1,117 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Channels
6
+ module SMS
7
+ class APIResponseOfSuppliedCompliance < Sentdm::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Sentdm::Channels::SMS::APIResponseOfSuppliedCompliance,
12
+ Sentdm::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ # What a market has been given: the identity it registers under, its programme,
17
+ # and any documents attached.
18
+ #
19
+ # What it does not carry is what the market asks for. That is the subject of GET
20
+ # /v3/compliance/requirements, and it is the same answer for every caller — a
21
+ # description of what a compliance regime wants, not a record of one customer's
22
+ # progress through it. It was reported here as well for a while, which put the
23
+ # same array in six response shapes and left a caller deciding which of two
24
+ # sources to believe.
25
+ #
26
+ # Present on a list read for markets that register (carrying brand and campaign),
27
+ # but with documents absent — documents are not fetched for a list, because a
28
+ # catalog lookup and a document read per market would multiply across a page.
29
+ # Absent documents is distinct from an empty list: absent says they were not
30
+ # fetched; empty says the market has been given none. The parent object is null
31
+ # only when the market registers with nobody and compliance was not computed —
32
+ # nothing to show at all.
33
+ sig { returns(T.nilable(Sentdm::Channels::SuppliedCompliance)) }
34
+ attr_reader :data
35
+
36
+ sig do
37
+ params(
38
+ data: T.nilable(Sentdm::Channels::SuppliedCompliance::OrHash)
39
+ ).void
40
+ end
41
+ attr_writer :data
42
+
43
+ # Error information
44
+ sig { returns(T.nilable(Sentdm::ErrorDetail)) }
45
+ attr_reader :error
46
+
47
+ sig { params(error: T.nilable(Sentdm::ErrorDetail::OrHash)).void }
48
+ attr_writer :error
49
+
50
+ # Request and response metadata
51
+ sig { returns(T.nilable(Sentdm::APIMeta)) }
52
+ attr_reader :meta
53
+
54
+ sig { params(meta: Sentdm::APIMeta::OrHash).void }
55
+ attr_writer :meta
56
+
57
+ # Indicates whether the request was successful
58
+ sig { returns(T.nilable(T::Boolean)) }
59
+ attr_reader :success
60
+
61
+ sig { params(success: T::Boolean).void }
62
+ attr_writer :success
63
+
64
+ # Standard API response envelope for all v3 endpoints
65
+ sig do
66
+ params(
67
+ data: T.nilable(Sentdm::Channels::SuppliedCompliance::OrHash),
68
+ error: T.nilable(Sentdm::ErrorDetail::OrHash),
69
+ meta: Sentdm::APIMeta::OrHash,
70
+ success: T::Boolean
71
+ ).returns(T.attached_class)
72
+ end
73
+ def self.new(
74
+ # What a market has been given: the identity it registers under, its programme,
75
+ # and any documents attached.
76
+ #
77
+ # What it does not carry is what the market asks for. That is the subject of GET
78
+ # /v3/compliance/requirements, and it is the same answer for every caller — a
79
+ # description of what a compliance regime wants, not a record of one customer's
80
+ # progress through it. It was reported here as well for a while, which put the
81
+ # same array in six response shapes and left a caller deciding which of two
82
+ # sources to believe.
83
+ #
84
+ # Present on a list read for markets that register (carrying brand and campaign),
85
+ # but with documents absent — documents are not fetched for a list, because a
86
+ # catalog lookup and a document read per market would multiply across a page.
87
+ # Absent documents is distinct from an empty list: absent says they were not
88
+ # fetched; empty says the market has been given none. The parent object is null
89
+ # only when the market registers with nobody and compliance was not computed —
90
+ # nothing to show at all.
91
+ data: nil,
92
+ # Error information
93
+ error: nil,
94
+ # Request and response metadata
95
+ meta: nil,
96
+ # Indicates whether the request was successful
97
+ success: nil
98
+ )
99
+ end
100
+
101
+ sig do
102
+ override.returns(
103
+ {
104
+ data: T.nilable(Sentdm::Channels::SuppliedCompliance),
105
+ error: T.nilable(Sentdm::ErrorDetail),
106
+ meta: Sentdm::APIMeta,
107
+ success: T::Boolean
108
+ }
109
+ )
110
+ end
111
+ def to_hash
112
+ end
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end