Class: Pingram::TenDlcCampaignRegistrationDetails
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Pingram::TenDlcCampaignRegistrationDetails
- Defined in:
- lib/pingram/models/ten_dlc_campaign_registration_details.rb
Overview
Admin GET/PATCH response for 10DLC campaign registration
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#campaign_age_gated ⇒ Object
Whether campaign content is age-restricted (18+).
-
#campaign_description ⇒ Object
Summary of what this campaign sends and why, including audience and typical message content.
-
#campaign_direct_lending ⇒ Object
Whether the campaign relates to direct lending or loan products.
-
#campaign_embedded_link ⇒ Object
Whether campaign messages include URLs.
-
#campaign_embedded_link_url ⇒ Object
Sample URL that appears in messages.
-
#campaign_embedded_phone ⇒ Object
Whether campaign messages include phone numbers.
-
#campaign_help_keywords ⇒ Object
Extra help keywords as a comma-separated list.
-
#campaign_help_message ⇒ Object
Auto-reply sent when a recipient texts a help keyword.
-
#campaign_id ⇒ Object
Returns the value of attribute campaign_id.
-
#campaign_message_flow ⇒ Object
How recipients opt in (for example website form, checkout, or keyword).
-
#campaign_optin_keywords ⇒ Object
Extra opt-in keywords as a comma-separated list.
-
#campaign_optin_message ⇒ Object
Auto-reply sent when a recipient opts in.
-
#campaign_optout_keywords ⇒ Object
Extra opt-out keywords as a comma-separated list.
-
#campaign_optout_message ⇒ Object
Auto-reply sent when a recipient opts out.
-
#campaign_privacy_policy_link ⇒ Object
Public URL of the privacy policy that covers this SMS program.
-
#campaign_sample1 ⇒ Object
Example SMS that represents actual campaign traffic.
-
#campaign_sample2 ⇒ Object
Second example SMS.
-
#campaign_sample3 ⇒ Object
Optional third example SMS.
-
#campaign_sample4 ⇒ Object
Optional fourth example SMS.
-
#campaign_status ⇒ Object
Pingram-side 10DLC registration workflow status (brand or campaign).
-
#campaign_terms_and_conditions_link ⇒ Object
Public URL of the terms and conditions that cover this SMS program.
-
#campaign_usecase ⇒ Object
10DLC campaign use case submitted to carriers.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ TenDlcCampaignRegistrationDetails
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ TenDlcCampaignRegistrationDetails
Initializes the object
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 192 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::TenDlcCampaignRegistrationDetails` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::TenDlcCampaignRegistrationDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] else self.account_id = nil end if attributes.key?(:'campaign_status') self.campaign_status = attributes[:'campaign_status'] else self.campaign_status = nil end if attributes.key?(:'campaign_description') self.campaign_description = attributes[:'campaign_description'] end if attributes.key?(:'campaign_sample1') self.campaign_sample1 = attributes[:'campaign_sample1'] end if attributes.key?(:'campaign_sample2') self.campaign_sample2 = attributes[:'campaign_sample2'] end if attributes.key?(:'campaign_sample3') self.campaign_sample3 = attributes[:'campaign_sample3'] end if attributes.key?(:'campaign_sample4') self.campaign_sample4 = attributes[:'campaign_sample4'] end if attributes.key?(:'campaign_message_flow') self. = attributes[:'campaign_message_flow'] end if attributes.key?(:'campaign_optin_keywords') self.campaign_optin_keywords = attributes[:'campaign_optin_keywords'] end if attributes.key?(:'campaign_optin_message') self. = attributes[:'campaign_optin_message'] end if attributes.key?(:'campaign_optout_keywords') self.campaign_optout_keywords = attributes[:'campaign_optout_keywords'] end if attributes.key?(:'campaign_optout_message') self. = attributes[:'campaign_optout_message'] end if attributes.key?(:'campaign_help_keywords') self.campaign_help_keywords = attributes[:'campaign_help_keywords'] end if attributes.key?(:'campaign_help_message') self. = attributes[:'campaign_help_message'] end if attributes.key?(:'campaign_embedded_link') self. = attributes[:'campaign_embedded_link'] end if attributes.key?(:'campaign_embedded_link_url') self. = attributes[:'campaign_embedded_link_url'] end if attributes.key?(:'campaign_embedded_phone') self. = attributes[:'campaign_embedded_phone'] end if attributes.key?(:'campaign_age_gated') self.campaign_age_gated = attributes[:'campaign_age_gated'] end if attributes.key?(:'campaign_direct_lending') self.campaign_direct_lending = attributes[:'campaign_direct_lending'] end if attributes.key?(:'campaign_privacy_policy_link') self.campaign_privacy_policy_link = attributes[:'campaign_privacy_policy_link'] end if attributes.key?(:'campaign_terms_and_conditions_link') self.campaign_terms_and_conditions_link = attributes[:'campaign_terms_and_conditions_link'] end if attributes.key?(:'campaign_usecase') self.campaign_usecase = attributes[:'campaign_usecase'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] else self.created_at = nil end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] else self.updated_at = nil end if attributes.key?(:'campaign_id') self.campaign_id = attributes[:'campaign_id'] end end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
19 20 21 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 19 def account_id @account_id end |
#campaign_age_gated ⇒ Object
Whether campaign content is age-restricted (18+).
70 71 72 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 70 def campaign_age_gated @campaign_age_gated end |
#campaign_description ⇒ Object
Summary of what this campaign sends and why, including audience and typical message content. Required before carrier submission.
25 26 27 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 25 def campaign_description @campaign_description end |
#campaign_direct_lending ⇒ Object
Whether the campaign relates to direct lending or loan products.
73 74 75 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 73 def campaign_direct_lending @campaign_direct_lending end |
#campaign_embedded_link ⇒ Object
Whether campaign messages include URLs.
61 62 63 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 61 def @campaign_embedded_link end |
#campaign_embedded_link_url ⇒ Object
Sample URL that appears in messages. Provide when campaignEmbeddedLink is true.
64 65 66 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 64 def @campaign_embedded_link_url end |
#campaign_embedded_phone ⇒ Object
Whether campaign messages include phone numbers.
67 68 69 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 67 def @campaign_embedded_phone end |
#campaign_help_keywords ⇒ Object
Extra help keywords as a comma-separated list. HELP is always included.
55 56 57 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 55 def campaign_help_keywords @campaign_help_keywords end |
#campaign_help_message ⇒ Object
Auto-reply sent when a recipient texts a help keyword. Required before carrier submission. Should include a support contact (email and/or phone).
58 59 60 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 58 def @campaign_help_message end |
#campaign_id ⇒ Object
Returns the value of attribute campaign_id.
88 89 90 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 88 def campaign_id @campaign_id end |
#campaign_message_flow ⇒ Object
How recipients opt in (for example website form, checkout, or keyword). Describe the call-to-action and where consent is collected. Required before carrier submission.
40 41 42 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 40 def @campaign_message_flow end |
#campaign_optin_keywords ⇒ Object
Extra opt-in keywords as a comma-separated list. START is always included.
43 44 45 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 43 def campaign_optin_keywords @campaign_optin_keywords end |
#campaign_optin_message ⇒ Object
Auto-reply sent when a recipient opts in. Required before carrier submission. Should confirm the subscription, mention message frequency, and include STOP and HELP instructions.
46 47 48 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 46 def @campaign_optin_message end |
#campaign_optout_keywords ⇒ Object
Extra opt-out keywords as a comma-separated list. STOP is always included.
49 50 51 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 49 def campaign_optout_keywords @campaign_optout_keywords end |
#campaign_optout_message ⇒ Object
Auto-reply sent when a recipient opts out. Required before carrier submission. Should confirm they will receive no further messages.
52 53 54 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 52 def @campaign_optout_message end |
#campaign_privacy_policy_link ⇒ Object
Public URL of the privacy policy that covers this SMS program.
76 77 78 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 76 def campaign_privacy_policy_link @campaign_privacy_policy_link end |
#campaign_sample1 ⇒ Object
Example SMS that represents actual campaign traffic. Required before carrier submission. Should match the use case and typically identify the brand and include STOP/HELP language.
28 29 30 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 28 def campaign_sample1 @campaign_sample1 end |
#campaign_sample2 ⇒ Object
Second example SMS. Required before carrier submission. Required for MARKETING and MIXED use cases.
31 32 33 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 31 def campaign_sample2 @campaign_sample2 end |
#campaign_sample3 ⇒ Object
Optional third example SMS.
34 35 36 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 34 def campaign_sample3 @campaign_sample3 end |
#campaign_sample4 ⇒ Object
Optional fourth example SMS.
37 38 39 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 37 def campaign_sample4 @campaign_sample4 end |
#campaign_status ⇒ Object
Pingram-side 10DLC registration workflow status (brand or campaign). - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
22 23 24 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 22 def campaign_status @campaign_status end |
#campaign_terms_and_conditions_link ⇒ Object
Public URL of the terms and conditions that cover this SMS program.
79 80 81 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 79 def campaign_terms_and_conditions_link @campaign_terms_and_conditions_link end |
#campaign_usecase ⇒ Object
10DLC campaign use case submitted to carriers. Required before carrier submission. One of 2FA, ACCOUNT_NOTIFICATION, CUSTOMER_CARE, DELIVERY_NOTIFICATION, FRAUD_ALERT, MARKETING, MIXED, POLLING_VOTING, PUBLIC_SERVICE_ANNOUNCEMENT, or SECURITY_ALERT. For MIXED, append comma-separated sub-use cases after MIXED (sub-use cases cannot include MIXED), for example MIXED,2FA,ACCOUNT_NOTIFICATION.
82 83 84 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 82 def campaign_usecase @campaign_usecase end |
#created_at ⇒ Object
Returns the value of attribute created_at.
84 85 86 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 84 def created_at @created_at end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
86 87 88 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 86 def updated_at @updated_at end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
144 145 146 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 144 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
149 150 151 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 149 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 113 def self.attribute_map { :'account_id' => :'accountId', :'campaign_status' => :'campaignStatus', :'campaign_description' => :'campaignDescription', :'campaign_sample1' => :'campaignSample1', :'campaign_sample2' => :'campaignSample2', :'campaign_sample3' => :'campaignSample3', :'campaign_sample4' => :'campaignSample4', :'campaign_message_flow' => :'campaignMessageFlow', :'campaign_optin_keywords' => :'campaignOptinKeywords', :'campaign_optin_message' => :'campaignOptinMessage', :'campaign_optout_keywords' => :'campaignOptoutKeywords', :'campaign_optout_message' => :'campaignOptoutMessage', :'campaign_help_keywords' => :'campaignHelpKeywords', :'campaign_help_message' => :'campaignHelpMessage', :'campaign_embedded_link' => :'campaignEmbeddedLink', :'campaign_embedded_link_url' => :'campaignEmbeddedLinkUrl', :'campaign_embedded_phone' => :'campaignEmbeddedPhone', :'campaign_age_gated' => :'campaignAgeGated', :'campaign_direct_lending' => :'campaignDirectLending', :'campaign_privacy_policy_link' => :'campaignPrivacyPolicyLink', :'campaign_terms_and_conditions_link' => :'campaignTermsAndConditionsLink', :'campaign_usecase' => :'campaignUsecase', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', :'campaign_id' => :'campaignId' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 439 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
185 186 187 188 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 185 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 154 def self.openapi_types { :'account_id' => :'String', :'campaign_status' => :'String', :'campaign_description' => :'String', :'campaign_sample1' => :'String', :'campaign_sample2' => :'String', :'campaign_sample3' => :'String', :'campaign_sample4' => :'String', :'campaign_message_flow' => :'String', :'campaign_optin_keywords' => :'String', :'campaign_optin_message' => :'String', :'campaign_optout_keywords' => :'String', :'campaign_optout_message' => :'String', :'campaign_help_keywords' => :'String', :'campaign_help_message' => :'String', :'campaign_embedded_link' => :'Boolean', :'campaign_embedded_link_url' => :'String', :'campaign_embedded_phone' => :'Boolean', :'campaign_age_gated' => :'Boolean', :'campaign_direct_lending' => :'Boolean', :'campaign_privacy_policy_link' => :'String', :'campaign_terms_and_conditions_link' => :'String', :'campaign_usecase' => :'String', :'created_at' => :'String', :'updated_at' => :'String', :'campaign_id' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 394 def ==(o) return true if self.equal?(o) self.class == o.class && account_id == o.account_id && campaign_status == o.campaign_status && campaign_description == o.campaign_description && campaign_sample1 == o.campaign_sample1 && campaign_sample2 == o.campaign_sample2 && campaign_sample3 == o.campaign_sample3 && campaign_sample4 == o.campaign_sample4 && == o. && campaign_optin_keywords == o.campaign_optin_keywords && == o. && campaign_optout_keywords == o.campaign_optout_keywords && == o. && campaign_help_keywords == o.campaign_help_keywords && == o. && == o. && == o. && == o. && campaign_age_gated == o.campaign_age_gated && campaign_direct_lending == o.campaign_direct_lending && campaign_privacy_policy_link == o.campaign_privacy_policy_link && campaign_terms_and_conditions_link == o.campaign_terms_and_conditions_link && campaign_usecase == o.campaign_usecase && created_at == o.created_at && updated_at == o.updated_at && campaign_id == o.campaign_id end |
#eql?(o) ⇒ Boolean
426 427 428 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 426 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
432 433 434 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 432 def hash [account_id, campaign_status, campaign_description, campaign_sample1, campaign_sample2, campaign_sample3, campaign_sample4, , campaign_optin_keywords, , campaign_optout_keywords, , campaign_help_keywords, , , , , campaign_age_gated, campaign_direct_lending, campaign_privacy_policy_link, campaign_terms_and_conditions_link, campaign_usecase, created_at, updated_at, campaign_id].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 317 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @account_id.nil? invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') end if @campaign_status.nil? invalid_properties.push('invalid value for "campaign_status", campaign_status cannot be nil.') end if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
461 462 463 464 465 466 467 468 469 470 471 472 473 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 461 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
341 342 343 344 345 346 347 348 349 350 |
# File 'lib/pingram/models/ten_dlc_campaign_registration_details.rb', line 341 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @account_id.nil? return false if @campaign_status.nil? campaign_status_validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"]) return false unless campaign_status_validator.valid?(@campaign_status) return false if @created_at.nil? return false if @updated_at.nil? true end |