Class: SurgeAPI::Models::Campaign
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- SurgeAPI::Models::Campaign
- Defined in:
- lib/surge_api/models/campaign.rb
Overview
Defined Under Namespace
Modules: Include, UseCase, Volume
Instance Attribute Summary collapse
-
#consent_flow ⇒ String
A string explaining the method through which end users will opt in to receive messages from the brand.
-
#description ⇒ String
An explanation of the organization’s purpose and how it will be using text messaging to accomplish that purpose.
-
#id ⇒ String
The campaign ID.
-
#includes ⇒ Array<Symbol, SurgeAPI::Models::Campaign::Include>
A list of properties that this campaign should include.
-
#link_sample ⇒ String?
A sample link that might be sent by this campaign.
-
#message_samples ⇒ Array<String>
An array of 2-5 strings with examples of the messages that will be sent from this campaign.
-
#privacy_policy_url ⇒ String
The URL of the privacy policy for the brand in question.
-
#terms_and_conditions_url ⇒ String?
The URL of the terms and conditions presented to end users when they opt in to messaging.
-
#use_cases ⇒ Array<Symbol, SurgeAPI::Models::Campaign::UseCase>
A list containing 1-5 types of messages that will be sent with this campaign.
-
#volume ⇒ Symbol, SurgeAPI::Models::Campaign::Volume
This will be one of the following:.
Class Method Summary collapse
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
This class inherits a constructor from SurgeAPI::Internal::Type::BaseModel
Instance Attribute Details
#consent_flow ⇒ String
A string explaining the method through which end users will opt in to receive messages from the brand. Typically this should include URLs for opt-in forms or screenshots that might be helpful in explaining the flow to someone unfamiliar with the organization’s purpose.
20 |
# File 'lib/surge_api/models/campaign.rb', line 20 required :consent_flow, String |
#description ⇒ String
An explanation of the organization’s purpose and how it will be using text messaging to accomplish that purpose.
27 |
# File 'lib/surge_api/models/campaign.rb', line 27 required :description, String |
#id ⇒ String
The campaign ID
11 |
# File 'lib/surge_api/models/campaign.rb', line 11 required :id, String |
#includes ⇒ Array<Symbol, SurgeAPI::Models::Campaign::Include>
A list of properties that this campaign should include. These properties can be any of the following values:
-
‘links` - whether the campaign might send links in messages
-
‘phone_numbers` - whether the campaign might send phone numbers in messages
-
‘age_gated` - whether the campaign contains age gated content (controlled substances or adult content)
-
‘direct_lending` - whether the campaign contains content related to direct lending or other loan arrangements
41 |
# File 'lib/surge_api/models/campaign.rb', line 41 required :includes, -> { SurgeAPI::Internal::Type::ArrayOf[enum: SurgeAPI::Campaign::Include] } |
#link_sample ⇒ String?
A sample link that might be sent by this campaign. If links from other domains are sent through this campaign, they are much more likely to be filtered by the carriers. If link shortening is enabled for the account, the link shortener URL will be used instead of what is provided. Reach out to support if you would like to disable automatic link shortening.
117 |
# File 'lib/surge_api/models/campaign.rb', line 117 optional :link_sample, String |
#message_samples ⇒ Array<String>
An array of 2-5 strings with examples of the messages that will be sent from this campaign. Typically the first sample should be a compliance message like ‘You are now opted in to messages from name. Frequency varies. Msg&data rates apply. Reply STOP to opt out.` These samples don’t necessarily need to be the only templates that will be used for the campaign, but they should reflect the purpose of the messages that will be sent. Any variable content can be reflected by wrapping it in square brackets like ‘[customer name]`.
53 |
# File 'lib/surge_api/models/campaign.rb', line 53 required :message_samples, SurgeAPI::Internal::Type::ArrayOf[String] |
#privacy_policy_url ⇒ String
The URL of the privacy policy for the brand in question. This may be a shared privacy policy if it’s the policy that is displayed to end users when they opt in to messaging.
61 |
# File 'lib/surge_api/models/campaign.rb', line 61 required :privacy_policy_url, String |
#terms_and_conditions_url ⇒ String?
The URL of the terms and conditions presented to end users when they opt in to messaging. These terms and conditions may be shared among all of a platform’s customers if they’re the terms that are presented to end users when they opt in to messaging.
126 |
# File 'lib/surge_api/models/campaign.rb', line 126 optional :terms_and_conditions_url, String |
#use_cases ⇒ Array<Symbol, SurgeAPI::Models::Campaign::UseCase>
A list containing 1-5 types of messages that will be sent with this campaign.
The following use cases are typically available to all brands:
-
‘account_notification` - For sending reminders, alerts, and general account-related notifications like booking confirmations or appointment reminders.
-
‘customer_care` - For account support, troubleshooting, and general customer service communication.
-
‘delivery_notification` - For notifying customers about the status of product or service deliveries.
-
‘fraud_alert` - For warning customers about suspicious or potentially fraudulent activity.
-
‘higher_education` - For messaging related to colleges, universities, and school districts outside of K–12.
-
‘marketing` - For promotional or advertising messages intended to market products or services.
-
‘polling_voting` - For conducting surveys, polls, or voting-related messaging.
-
‘public_service_announcement` - For raising awareness about social issues or important public information.
-
‘security_alert` - For alerts related to potential security breaches or compromised systems requiring user action.
-
‘two_factor_authentication` - For sending one-time passwords or verification codes for login or password reset.
For access to special use cases not shown here, reach out to support@surge.app.
92 |
# File 'lib/surge_api/models/campaign.rb', line 92 required :use_cases, -> { SurgeAPI::Internal::Type::ArrayOf[enum: SurgeAPI::Campaign::UseCase] } |
#volume ⇒ Symbol, SurgeAPI::Models::Campaign::Volume
This will be one of the following:
-
‘low` - The campaign will be allowed to send up to 2000 SMS segments to T-Mobile customers each day. In this case your platform will be charged for the setup fee for a low volume number upon receipt of the API request.
-
‘high` - The campaign will be allowed to send up to 200k SMS segments to T-Mobile customers each day, depending on the trust score assigned by The Campaign Registry. Your platform will be charged for the setup fee for a high volume number upon receipt of the API request, and phone numbers will be charged as high volume numbers going forward.
107 |
# File 'lib/surge_api/models/campaign.rb', line 107 required :volume, enum: -> { SurgeAPI::Campaign::Volume } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/surge_api/models/campaign.rb', line 163
|