surge_api 0.2.0 → 0.2.1

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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +12 -63
  4. data/lib/surge_api/internal/transport/pooled_net_requester.rb +30 -24
  5. data/lib/surge_api/internal/util.rb +5 -5
  6. data/lib/surge_api/models/account_create_params.rb +13 -6
  7. data/lib/surge_api/models/account_update_params.rb +13 -6
  8. data/lib/surge_api/models/campaign_create_params.rb +7 -183
  9. data/lib/surge_api/models/campaign_params.rb +228 -0
  10. data/lib/surge_api/models/message_create_params.rb +8 -134
  11. data/lib/surge_api/models/message_params.rb +216 -0
  12. data/lib/surge_api/models.rb +4 -0
  13. data/lib/surge_api/resources/campaigns.rb +7 -18
  14. data/lib/surge_api/resources/messages.rb +7 -12
  15. data/lib/surge_api/version.rb +1 -1
  16. data/lib/surge_api.rb +2 -0
  17. data/rbi/surge_api/models/account_create_params.rbi +19 -8
  18. data/rbi/surge_api/models/account_update_params.rbi +19 -8
  19. data/rbi/surge_api/models/campaign_create_params.rbi +20 -346
  20. data/rbi/surge_api/models/campaign_params.rbi +481 -0
  21. data/rbi/surge_api/models/message_create_params.rbi +24 -243
  22. data/rbi/surge_api/models/message_params.rbi +430 -0
  23. data/rbi/surge_api/models.rbi +4 -0
  24. data/rbi/surge_api/resources/campaigns.rbi +4 -89
  25. data/rbi/surge_api/resources/messages.rbi +5 -22
  26. data/sig/surge_api/models/campaign_create_params.rbs +7 -106
  27. data/sig/surge_api/models/campaign_params.rbs +141 -0
  28. data/sig/surge_api/models/message_create_params.rbs +7 -119
  29. data/sig/surge_api/models/message_params.rbs +189 -0
  30. data/sig/surge_api/models.rbs +4 -0
  31. data/sig/surge_api/resources/campaigns.rbs +1 -9
  32. data/sig/surge_api/resources/messages.rbs +1 -6
  33. metadata +8 -2
@@ -32,21 +32,11 @@ module SurgeAPI
32
32
  # `conversation` field, and `conversation.phone_number` should be specified
33
33
  # instead.
34
34
  #
35
- # @overload create(account_id, conversation:, to:, attachments: nil, body: nil, send_at: nil, from: nil, request_options: {})
35
+ # @overload create(account_id, message_params:, request_options: {})
36
36
  #
37
37
  # @param account_id [String] The account from which the message should be sent.
38
38
  #
39
- # @param conversation [SurgeAPI::Models::MessageCreateParams::Conversation] Params for selecting or creating a new conversation. Either the id or the Contac
40
- #
41
- # @param to [String] The recipient's phone number in E.164 format. Cannot be used together with 'conv
42
- #
43
- # @param attachments [Array<SurgeAPI::Models::MessageCreateParams::Attachment>]
44
- #
45
- # @param body [String] The message body.
46
- #
47
- # @param send_at [Time] An optional datetime for scheduling message up to a couple of months in the futu
48
- #
49
- # @param from [String] The sender's phone number in E.164 format or phone number ID. If omitted, uses t
39
+ # @param message_params [SurgeAPI::MessageParams] Payload for creating a message. Either an attachment or the body must be given.
50
40
  #
51
41
  # @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}, nil]
52
42
  #
@@ -55,6 +45,11 @@ module SurgeAPI
55
45
  # @see SurgeAPI::Models::MessageCreateParams
56
46
  def create(account_id, params)
57
47
  parsed, options = SurgeAPI::MessageCreateParams.dump_request(params)
48
+ case parsed
49
+ in {message_params: Hash => union, **rest}
50
+ parsed = {**rest, **union}
51
+ else
52
+ end
58
53
  @client.request(
59
54
  method: :post,
60
55
  path: ["accounts/%1$s/messages", account_id],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SurgeAPI
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
data/lib/surge_api.rb CHANGED
@@ -50,6 +50,8 @@ require_relative "surge_api/errors"
50
50
  require_relative "surge_api/internal/transport/base_client"
51
51
  require_relative "surge_api/internal/transport/pooled_net_requester"
52
52
  require_relative "surge_api/client"
53
+ require_relative "surge_api/models/campaign_params"
54
+ require_relative "surge_api/models/message_params"
53
55
  require_relative "surge_api/models/account"
54
56
  require_relative "surge_api/models/account_create_params"
55
57
  require_relative "surge_api/models/account_retrieve_status_params"
@@ -112,8 +112,11 @@ module SurgeAPI
112
112
  end
113
113
  attr_writer :address
114
114
 
115
- # An object representing an individual who can be contacted if the carriers have
116
- # any questions about the business.
115
+ # An object representing an individual who can be contacted if Surge or our
116
+ # carrier partners have any questions about the business. If you are registering
117
+ # on behalf of your customer, this must be a contact from your customer's company
118
+ # rather than your own. The individual will likely never be contacted unless there
119
+ # are issues with spam.
117
120
  sig do
118
121
  returns(
119
122
  T.nilable(SurgeAPI::AccountCreateParams::Organization::Contact)
@@ -269,8 +272,11 @@ module SurgeAPI
269
272
  def self.new(
270
273
  # The address of the organization's headquarters.
271
274
  address: nil,
272
- # An object representing an individual who can be contacted if the carriers have
273
- # any questions about the business.
275
+ # An object representing an individual who can be contacted if Surge or our
276
+ # carrier partners have any questions about the business. If you are registering
277
+ # on behalf of your customer, this must be a contact from your customer's company
278
+ # rather than your own. The individual will likely never be contacted unless there
279
+ # are issues with spam.
274
280
  contact: nil,
275
281
  # The two character ISO 3166 country code for the country in which the
276
282
  # organization is headquartered.
@@ -455,7 +461,8 @@ module SurgeAPI
455
461
  # using the same domain name as the website URL will be preferred (e.g. with a
456
462
  # website domain of `https://dtprecisionauto.com`, an email like
457
463
  # `dom@dtprecisionauto.com` will be preferred over one like
458
- # `dom@anothergarage.com` or `dom.toretto@gmail.com`)
464
+ # `dom@anothergarage.com` or `dom.toretto@gmail.com`. `dtprecisionauto@gmail.com`
465
+ # would also be acceptable, but not preferred)
459
466
  sig { returns(T.nilable(String)) }
460
467
  attr_accessor :email
461
468
 
@@ -486,8 +493,11 @@ module SurgeAPI
486
493
  sig { returns(T.nilable(String)) }
487
494
  attr_accessor :title_other
488
495
 
489
- # An object representing an individual who can be contacted if the carriers have
490
- # any questions about the business.
496
+ # An object representing an individual who can be contacted if Surge or our
497
+ # carrier partners have any questions about the business. If you are registering
498
+ # on behalf of your customer, this must be a contact from your customer's company
499
+ # rather than your own. The individual will likely never be contacted unless there
500
+ # are issues with spam.
491
501
  sig do
492
502
  params(
493
503
  email: T.nilable(String),
@@ -506,7 +516,8 @@ module SurgeAPI
506
516
  # using the same domain name as the website URL will be preferred (e.g. with a
507
517
  # website domain of `https://dtprecisionauto.com`, an email like
508
518
  # `dom@dtprecisionauto.com` will be preferred over one like
509
- # `dom@anothergarage.com` or `dom.toretto@gmail.com`)
519
+ # `dom@anothergarage.com` or `dom.toretto@gmail.com`. `dtprecisionauto@gmail.com`
520
+ # would also be acceptable, but not preferred)
510
521
  email: nil,
511
522
  # The first name (or given name) of the individual
512
523
  first_name: nil,
@@ -113,8 +113,11 @@ module SurgeAPI
113
113
  end
114
114
  attr_writer :address
115
115
 
116
- # An object representing an individual who can be contacted if the carriers have
117
- # any questions about the business.
116
+ # An object representing an individual who can be contacted if Surge or our
117
+ # carrier partners have any questions about the business. If you are registering
118
+ # on behalf of your customer, this must be a contact from your customer's company
119
+ # rather than your own. The individual will likely never be contacted unless there
120
+ # are issues with spam.
118
121
  sig do
119
122
  returns(
120
123
  T.nilable(SurgeAPI::AccountUpdateParams::Organization::Contact)
@@ -270,8 +273,11 @@ module SurgeAPI
270
273
  def self.new(
271
274
  # The address of the organization's headquarters.
272
275
  address: nil,
273
- # An object representing an individual who can be contacted if the carriers have
274
- # any questions about the business.
276
+ # An object representing an individual who can be contacted if Surge or our
277
+ # carrier partners have any questions about the business. If you are registering
278
+ # on behalf of your customer, this must be a contact from your customer's company
279
+ # rather than your own. The individual will likely never be contacted unless there
280
+ # are issues with spam.
275
281
  contact: nil,
276
282
  # The two character ISO 3166 country code for the country in which the
277
283
  # organization is headquartered.
@@ -456,7 +462,8 @@ module SurgeAPI
456
462
  # using the same domain name as the website URL will be preferred (e.g. with a
457
463
  # website domain of `https://dtprecisionauto.com`, an email like
458
464
  # `dom@dtprecisionauto.com` will be preferred over one like
459
- # `dom@anothergarage.com` or `dom.toretto@gmail.com`)
465
+ # `dom@anothergarage.com` or `dom.toretto@gmail.com`. `dtprecisionauto@gmail.com`
466
+ # would also be acceptable, but not preferred)
460
467
  sig { returns(T.nilable(String)) }
461
468
  attr_accessor :email
462
469
 
@@ -487,8 +494,11 @@ module SurgeAPI
487
494
  sig { returns(T.nilable(String)) }
488
495
  attr_accessor :title_other
489
496
 
490
- # An object representing an individual who can be contacted if the carriers have
491
- # any questions about the business.
497
+ # An object representing an individual who can be contacted if Surge or our
498
+ # carrier partners have any questions about the business. If you are registering
499
+ # on behalf of your customer, this must be a contact from your customer's company
500
+ # rather than your own. The individual will likely never be contacted unless there
501
+ # are issues with spam.
492
502
  sig do
493
503
  params(
494
504
  email: T.nilable(String),
@@ -507,7 +517,8 @@ module SurgeAPI
507
517
  # using the same domain name as the website URL will be preferred (e.g. with a
508
518
  # website domain of `https://dtprecisionauto.com`, an email like
509
519
  # `dom@dtprecisionauto.com` will be preferred over one like
510
- # `dom@anothergarage.com` or `dom.toretto@gmail.com`)
520
+ # `dom@anothergarage.com` or `dom.toretto@gmail.com`. `dtprecisionauto@gmail.com`
521
+ # would also be acceptable, but not preferred)
511
522
  email: nil,
512
523
  # The first name (or given name) of the individual
513
524
  first_name: nil,
@@ -11,217 +11,32 @@ module SurgeAPI
11
11
  T.any(SurgeAPI::CampaignCreateParams, SurgeAPI::Internal::AnyHash)
12
12
  end
13
13
 
14
- # A string explaining the method through which end users will opt in to receive
15
- # messages from the brand. Typically this should include URLs for opt-in forms or
16
- # screenshots that might be helpful in explaining the flow to someone unfamiliar
17
- # with the organization's purpose.
18
- sig { returns(String) }
19
- attr_accessor :consent_flow
20
-
21
- # An explanation of the organization's purpose and how it will be using text
22
- # messaging to accomplish that purpose.
23
- sig { returns(String) }
24
- attr_accessor :description
25
-
26
- # An array of 2-5 strings with examples of the messages that will be sent from
27
- # this campaign. Typically the first sample should be a compliance message like
28
- # `You are now opted in to messages from {brand name}. Frequency varies. Msg&data rates apply. Reply STOP to opt out.`
29
- # These samples don't necessarily need to be the only templates that will be used
30
- # for the campaign, but they should reflect the purpose of the messages that will
31
- # be sent. Any variable content can be reflected by wrapping it in square brackets
32
- # like `[customer name]`.
33
- sig { returns(T::Array[String]) }
34
- attr_accessor :message_samples
35
-
36
- # The URL of the privacy policy for the brand in question. This may be a shared
37
- # privacy policy if it's the policy that is displayed to end users when they opt
38
- # in to messaging.
39
- sig { returns(String) }
40
- attr_accessor :privacy_policy_url
41
-
42
- # A list containing 1-5 types of messages that will be sent with this campaign.
43
- #
44
- # The following use cases are typically available to all brands:
45
- #
46
- # - `account_notification` - For sending reminders, alerts, and general
47
- # account-related notifications like booking confirmations or appointment
48
- # reminders.
49
- # - `customer_care` - For account support, troubleshooting, and general customer
50
- # service communication.
51
- # - `delivery_notification` - For notifying customers about the status of product
52
- # or service deliveries.
53
- # - `fraud_alert` - For warning customers about suspicious or potentially
54
- # fraudulent activity.
55
- # - `higher_education` - For messaging related to colleges, universities, and
56
- # school districts outside of K–12.
57
- # - `marketing` - For promotional or advertising messages intended to market
58
- # products or services.
59
- # - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
60
- # - `public_service_announcement` - For raising awareness about social issues or
61
- # important public information.
62
- # - `security_alert` - For alerts related to potential security breaches or
63
- # compromised systems requiring user action.
64
- # - `two_factor_authentication` - For sending one-time passwords or verification
65
- # codes for login or password reset.
66
- #
67
- # For access to special use cases not shown here, reach out to support@surge.app.
68
- sig do
69
- returns(T::Array[SurgeAPI::CampaignCreateParams::UseCase::OrSymbol])
70
- end
71
- attr_accessor :use_cases
72
-
73
- # This will be one of the following:
74
- #
75
- # - `low` - The campaign will be allowed to send up to 2000 SMS segments to
76
- # T-Mobile customers each day. In this case your platform will be charged for
77
- # the setup fee for a low volume number upon receipt of the API request.
78
- # - `high` - The campaign will be allowed to send up to 200k SMS segments to
79
- # T-Mobile customers each day, depending on the trust score assigned by The
80
- # Campaign Registry. Your platform will be charged for the setup fee for a high
81
- # volume number upon receipt of the API request, and phone numbers will be
82
- # charged as high volume numbers going forward.
83
- sig { returns(SurgeAPI::CampaignCreateParams::Volume::OrSymbol) }
84
- attr_accessor :volume
85
-
86
- # A list of properties that this campaign should include. These properties can be
87
- # any of the following values:
88
- #
89
- # - `links` - whether the campaign might send links in messages
90
- # - `phone_numbers` - whether the campaign might send phone numbers in messages
91
- # - `age_gated` - whether the campaign contains age gated content (controlled
92
- # substances or adult content)
93
- # - `direct_lending` - whether the campaign contains content related to direct
94
- # lending or other loan arrangements
14
+ # Parameters for creating a new campaign. Either provide full campaign details or
15
+ # import using a TCR ID.
95
16
  sig do
96
17
  returns(
97
- T.nilable(T::Array[SurgeAPI::CampaignCreateParams::Include::OrSymbol])
18
+ T.any(
19
+ SurgeAPI::CampaignParams::StandardCampaignParams,
20
+ SurgeAPI::CampaignParams::ExternalCampaignParams
21
+ )
98
22
  )
99
23
  end
100
- attr_reader :includes
24
+ attr_accessor :campaign_params
101
25
 
102
26
  sig do
103
27
  params(
104
- includes: T::Array[SurgeAPI::CampaignCreateParams::Include::OrSymbol]
105
- ).void
106
- end
107
- attr_writer :includes
108
-
109
- # A sample link that might be sent by this campaign. If links from other domains
110
- # are sent through this campaign, they are much more likely to be filtered by the
111
- # carriers. If link shortening is enabled for the account, the link shortener URL
112
- # will be used instead of what is provided. Reach out to support if you would like
113
- # to disable automatic link shortening.
114
- sig { returns(T.nilable(String)) }
115
- attr_reader :link_sample
116
-
117
- sig { params(link_sample: String).void }
118
- attr_writer :link_sample
119
-
120
- # The URL of the terms and conditions presented to end users when they opt in to
121
- # messaging. These terms and conditions may be shared among all of a platform's
122
- # customers if they're the terms that are presented to end users when they opt in
123
- # to messaging.
124
- sig { returns(T.nilable(String)) }
125
- attr_reader :terms_and_conditions_url
126
-
127
- sig { params(terms_and_conditions_url: String).void }
128
- attr_writer :terms_and_conditions_url
129
-
130
- sig do
131
- params(
132
- consent_flow: String,
133
- description: String,
134
- message_samples: T::Array[String],
135
- privacy_policy_url: String,
136
- use_cases:
137
- T::Array[SurgeAPI::CampaignCreateParams::UseCase::OrSymbol],
138
- volume: SurgeAPI::CampaignCreateParams::Volume::OrSymbol,
139
- includes: T::Array[SurgeAPI::CampaignCreateParams::Include::OrSymbol],
140
- link_sample: String,
141
- terms_and_conditions_url: String,
28
+ campaign_params:
29
+ T.any(
30
+ SurgeAPI::CampaignParams::StandardCampaignParams::OrHash,
31
+ SurgeAPI::CampaignParams::ExternalCampaignParams::OrHash
32
+ ),
142
33
  request_options: SurgeAPI::RequestOptions::OrHash
143
34
  ).returns(T.attached_class)
144
35
  end
145
36
  def self.new(
146
- # A string explaining the method through which end users will opt in to receive
147
- # messages from the brand. Typically this should include URLs for opt-in forms or
148
- # screenshots that might be helpful in explaining the flow to someone unfamiliar
149
- # with the organization's purpose.
150
- consent_flow:,
151
- # An explanation of the organization's purpose and how it will be using text
152
- # messaging to accomplish that purpose.
153
- description:,
154
- # An array of 2-5 strings with examples of the messages that will be sent from
155
- # this campaign. Typically the first sample should be a compliance message like
156
- # `You are now opted in to messages from {brand name}. Frequency varies. Msg&data rates apply. Reply STOP to opt out.`
157
- # These samples don't necessarily need to be the only templates that will be used
158
- # for the campaign, but they should reflect the purpose of the messages that will
159
- # be sent. Any variable content can be reflected by wrapping it in square brackets
160
- # like `[customer name]`.
161
- message_samples:,
162
- # The URL of the privacy policy for the brand in question. This may be a shared
163
- # privacy policy if it's the policy that is displayed to end users when they opt
164
- # in to messaging.
165
- privacy_policy_url:,
166
- # A list containing 1-5 types of messages that will be sent with this campaign.
167
- #
168
- # The following use cases are typically available to all brands:
169
- #
170
- # - `account_notification` - For sending reminders, alerts, and general
171
- # account-related notifications like booking confirmations or appointment
172
- # reminders.
173
- # - `customer_care` - For account support, troubleshooting, and general customer
174
- # service communication.
175
- # - `delivery_notification` - For notifying customers about the status of product
176
- # or service deliveries.
177
- # - `fraud_alert` - For warning customers about suspicious or potentially
178
- # fraudulent activity.
179
- # - `higher_education` - For messaging related to colleges, universities, and
180
- # school districts outside of K–12.
181
- # - `marketing` - For promotional or advertising messages intended to market
182
- # products or services.
183
- # - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
184
- # - `public_service_announcement` - For raising awareness about social issues or
185
- # important public information.
186
- # - `security_alert` - For alerts related to potential security breaches or
187
- # compromised systems requiring user action.
188
- # - `two_factor_authentication` - For sending one-time passwords or verification
189
- # codes for login or password reset.
190
- #
191
- # For access to special use cases not shown here, reach out to support@surge.app.
192
- use_cases:,
193
- # This will be one of the following:
194
- #
195
- # - `low` - The campaign will be allowed to send up to 2000 SMS segments to
196
- # T-Mobile customers each day. In this case your platform will be charged for
197
- # the setup fee for a low volume number upon receipt of the API request.
198
- # - `high` - The campaign will be allowed to send up to 200k SMS segments to
199
- # T-Mobile customers each day, depending on the trust score assigned by The
200
- # Campaign Registry. Your platform will be charged for the setup fee for a high
201
- # volume number upon receipt of the API request, and phone numbers will be
202
- # charged as high volume numbers going forward.
203
- volume:,
204
- # A list of properties that this campaign should include. These properties can be
205
- # any of the following values:
206
- #
207
- # - `links` - whether the campaign might send links in messages
208
- # - `phone_numbers` - whether the campaign might send phone numbers in messages
209
- # - `age_gated` - whether the campaign contains age gated content (controlled
210
- # substances or adult content)
211
- # - `direct_lending` - whether the campaign contains content related to direct
212
- # lending or other loan arrangements
213
- includes: nil,
214
- # A sample link that might be sent by this campaign. If links from other domains
215
- # are sent through this campaign, they are much more likely to be filtered by the
216
- # carriers. If link shortening is enabled for the account, the link shortener URL
217
- # will be used instead of what is provided. Reach out to support if you would like
218
- # to disable automatic link shortening.
219
- link_sample: nil,
220
- # The URL of the terms and conditions presented to end users when they opt in to
221
- # messaging. These terms and conditions may be shared among all of a platform's
222
- # customers if they're the terms that are presented to end users when they opt in
223
- # to messaging.
224
- terms_and_conditions_url: nil,
37
+ # Parameters for creating a new campaign. Either provide full campaign details or
38
+ # import using a TCR ID.
39
+ campaign_params:,
225
40
  request_options: {}
226
41
  )
227
42
  end
@@ -229,158 +44,17 @@ module SurgeAPI
229
44
  sig do
230
45
  override.returns(
231
46
  {
232
- consent_flow: String,
233
- description: String,
234
- message_samples: T::Array[String],
235
- privacy_policy_url: String,
236
- use_cases:
237
- T::Array[SurgeAPI::CampaignCreateParams::UseCase::OrSymbol],
238
- volume: SurgeAPI::CampaignCreateParams::Volume::OrSymbol,
239
- includes:
240
- T::Array[SurgeAPI::CampaignCreateParams::Include::OrSymbol],
241
- link_sample: String,
242
- terms_and_conditions_url: String,
47
+ campaign_params:
48
+ T.any(
49
+ SurgeAPI::CampaignParams::StandardCampaignParams,
50
+ SurgeAPI::CampaignParams::ExternalCampaignParams
51
+ ),
243
52
  request_options: SurgeAPI::RequestOptions
244
53
  }
245
54
  )
246
55
  end
247
56
  def to_hash
248
57
  end
249
-
250
- module UseCase
251
- extend SurgeAPI::Internal::Type::Enum
252
-
253
- TaggedSymbol =
254
- T.type_alias do
255
- T.all(Symbol, SurgeAPI::CampaignCreateParams::UseCase)
256
- end
257
- OrSymbol = T.type_alias { T.any(Symbol, String) }
258
-
259
- ACCOUNT_NOTIFICATION =
260
- T.let(
261
- :account_notification,
262
- SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol
263
- )
264
- CUSTOMER_CARE =
265
- T.let(
266
- :customer_care,
267
- SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol
268
- )
269
- DELIVERY_NOTIFICATION =
270
- T.let(
271
- :delivery_notification,
272
- SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol
273
- )
274
- FRAUD_ALERT =
275
- T.let(
276
- :fraud_alert,
277
- SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol
278
- )
279
- HIGHER_EDUCATION =
280
- T.let(
281
- :higher_education,
282
- SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol
283
- )
284
- MARKETING =
285
- T.let(
286
- :marketing,
287
- SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol
288
- )
289
- POLLING_VOTING =
290
- T.let(
291
- :polling_voting,
292
- SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol
293
- )
294
- PUBLIC_SERVICE_ANNOUNCEMENT =
295
- T.let(
296
- :public_service_announcement,
297
- SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol
298
- )
299
- SECURITY_ALERT =
300
- T.let(
301
- :security_alert,
302
- SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol
303
- )
304
- TWO_FACTOR_AUTHENTICATION =
305
- T.let(
306
- :two_factor_authentication,
307
- SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol
308
- )
309
-
310
- sig do
311
- override.returns(
312
- T::Array[SurgeAPI::CampaignCreateParams::UseCase::TaggedSymbol]
313
- )
314
- end
315
- def self.values
316
- end
317
- end
318
-
319
- # This will be one of the following:
320
- #
321
- # - `low` - The campaign will be allowed to send up to 2000 SMS segments to
322
- # T-Mobile customers each day. In this case your platform will be charged for
323
- # the setup fee for a low volume number upon receipt of the API request.
324
- # - `high` - The campaign will be allowed to send up to 200k SMS segments to
325
- # T-Mobile customers each day, depending on the trust score assigned by The
326
- # Campaign Registry. Your platform will be charged for the setup fee for a high
327
- # volume number upon receipt of the API request, and phone numbers will be
328
- # charged as high volume numbers going forward.
329
- module Volume
330
- extend SurgeAPI::Internal::Type::Enum
331
-
332
- TaggedSymbol =
333
- T.type_alias { T.all(Symbol, SurgeAPI::CampaignCreateParams::Volume) }
334
- OrSymbol = T.type_alias { T.any(Symbol, String) }
335
-
336
- HIGH =
337
- T.let(:high, SurgeAPI::CampaignCreateParams::Volume::TaggedSymbol)
338
- LOW = T.let(:low, SurgeAPI::CampaignCreateParams::Volume::TaggedSymbol)
339
-
340
- sig do
341
- override.returns(
342
- T::Array[SurgeAPI::CampaignCreateParams::Volume::TaggedSymbol]
343
- )
344
- end
345
- def self.values
346
- end
347
- end
348
-
349
- module Include
350
- extend SurgeAPI::Internal::Type::Enum
351
-
352
- TaggedSymbol =
353
- T.type_alias do
354
- T.all(Symbol, SurgeAPI::CampaignCreateParams::Include)
355
- end
356
- OrSymbol = T.type_alias { T.any(Symbol, String) }
357
-
358
- LINKS =
359
- T.let(:links, SurgeAPI::CampaignCreateParams::Include::TaggedSymbol)
360
- PHONE_NUMBERS =
361
- T.let(
362
- :phone_numbers,
363
- SurgeAPI::CampaignCreateParams::Include::TaggedSymbol
364
- )
365
- AGE_GATED =
366
- T.let(
367
- :age_gated,
368
- SurgeAPI::CampaignCreateParams::Include::TaggedSymbol
369
- )
370
- DIRECT_LENDING =
371
- T.let(
372
- :direct_lending,
373
- SurgeAPI::CampaignCreateParams::Include::TaggedSymbol
374
- )
375
-
376
- sig do
377
- override.returns(
378
- T::Array[SurgeAPI::CampaignCreateParams::Include::TaggedSymbol]
379
- )
380
- end
381
- def self.values
382
- end
383
- end
384
58
  end
385
59
  end
386
60
  end