Class: Pingram::TenDlcCampaignUpdateRequest

Inherits:
ApiModelBase show all
Defined in:
lib/pingram/models/ten_dlc_campaign_update_request.rb

Overview

Request body for PATCH /registrations/us/10dlc/campaign

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ TenDlcCampaignUpdateRequest

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {}) —

    Model attributes in the form of hash



149
150
151
152
153
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
183
184
185
186
187
188
189
190
191
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
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 149

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::TenDlcCampaignUpdateRequest` 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::TenDlcCampaignUpdateRequest`. 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?(:'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.campaign_message_flow = 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.campaign_optin_message = 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.campaign_optout_message = 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.campaign_help_message = attributes[:'campaign_help_message']
  end

  if attributes.key?(:'campaign_embedded_link')
    self.campaign_embedded_link = attributes[:'campaign_embedded_link']
  end

  if attributes.key?(:'campaign_embedded_link_url')
    self.campaign_embedded_link_url = attributes[:'campaign_embedded_link_url']
  end

  if attributes.key?(:'campaign_embedded_phone')
    self.campaign_embedded_phone = 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
end

Instance Attribute Details

#campaign_age_gated ⇒ Object

Whether campaign content is age-restricted (18+).



65
66
67
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 65

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.



20
21
22
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 20

def campaign_description
  @campaign_description
end

#campaign_direct_lending ⇒ Object

Whether the campaign relates to direct lending or loan products.



68
69
70
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 68

def campaign_direct_lending
  @campaign_direct_lending
end

Whether campaign messages include URLs.



56
57
58
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 56

def campaign_embedded_link
  @campaign_embedded_link
end

Sample URL that appears in messages. Provide when campaignEmbeddedLink is true.



59
60
61
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 59

def campaign_embedded_link_url
  @campaign_embedded_link_url
end

#campaign_embedded_phone ⇒ Object

Whether campaign messages include phone numbers.



62
63
64
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 62

def campaign_embedded_phone
  @campaign_embedded_phone
end

#campaign_help_keywords ⇒ Object

Extra help keywords as a comma-separated list. HELP is always included.



50
51
52
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 50

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).



53
54
55
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 53

def campaign_help_message
  @campaign_help_message
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.



35
36
37
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 35

def campaign_message_flow
  @campaign_message_flow
end

#campaign_optin_keywords ⇒ Object

Extra opt-in keywords as a comma-separated list. START is always included.



38
39
40
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 38

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.



41
42
43
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 41

def campaign_optin_message
  @campaign_optin_message
end

#campaign_optout_keywords ⇒ Object

Extra opt-out keywords as a comma-separated list. STOP is always included.



44
45
46
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 44

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.



47
48
49
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 47

def campaign_optout_message
  @campaign_optout_message
end

Public URL of the privacy policy that covers this SMS program.



71
72
73
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 71

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.



23
24
25
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 23

def campaign_sample1
  @campaign_sample1
end

#campaign_sample2 ⇒ Object

Second example SMS. Required before carrier submission. Required for MARKETING and MIXED use cases.



26
27
28
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 26

def campaign_sample2
  @campaign_sample2
end

#campaign_sample3 ⇒ Object

Optional third example SMS.



29
30
31
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 29

def campaign_sample3
  @campaign_sample3
end

#campaign_sample4 ⇒ Object

Optional fourth example SMS.



32
33
34
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 32

def campaign_sample4
  @campaign_sample4
end

Public URL of the terms and conditions that cover this SMS program.



74
75
76
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 74

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.



77
78
79
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 77

def campaign_usecase
  @campaign_usecase
end

Class Method Details

.acceptable_attribute_map ⇒ Object

Returns attribute mapping this model knows about



106
107
108
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 106

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributes ⇒ Object

Returns all the JSON keys this model knows about



111
112
113
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 111

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_map ⇒ Object

Attribute mapping from ruby-style variable name to JSON key.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 80

def self.attribute_map
  {
    :'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'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash) —

    Model attributes in the form of hash

Returns:

  • (Object) —

    Returns the model itself



301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 301

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



142
143
144
145
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 142

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_types ⇒ Object

Attribute type mapping.



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 116

def self.openapi_types
  {
    :'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'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object) —

    to be compared



261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 261

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      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 &&
      campaign_message_flow == o.campaign_message_flow &&
      campaign_optin_keywords == o.campaign_optin_keywords &&
      campaign_optin_message == o.campaign_optin_message &&
      campaign_optout_keywords == o.campaign_optout_keywords &&
      campaign_optout_message == o.campaign_optout_message &&
      campaign_help_keywords == o.campaign_help_keywords &&
      campaign_help_message == o.campaign_help_message &&
      campaign_embedded_link == o.campaign_embedded_link &&
      campaign_embedded_link_url == o.campaign_embedded_link_url &&
      campaign_embedded_phone == o.campaign_embedded_phone &&
      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
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object) —

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


288
289
290
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 288

def eql?(o)
  self == o
end

#hash ⇒ Integer

Calculates hash code according to all attributes.

Returns:

  • (Integer) —

    Hash code



294
295
296
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 294

def hash
  [campaign_description, campaign_sample1, campaign_sample2, campaign_sample3, campaign_sample4, campaign_message_flow, campaign_optin_keywords, campaign_optin_message, campaign_optout_keywords, campaign_optout_message, campaign_help_keywords, campaign_help_message, campaign_embedded_link, campaign_embedded_link_url, campaign_embedded_phone, campaign_age_gated, campaign_direct_lending, campaign_privacy_policy_link, campaign_terms_and_conditions_link, campaign_usecase].hash
end

#list_invalid_properties ⇒ Object

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



246
247
248
249
250
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 246

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hash ⇒ Hash

Returns the object in the form of hash

Returns:

  • (Hash) —

    Returns the object in the form of hash



323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 323

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

Returns:

  • (Boolean) —

    true if the model is valid



254
255
256
257
# File 'lib/pingram/models/ten_dlc_campaign_update_request.rb', line 254

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end