Class: Pingram::TenDlcCampaignRegistration

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

Overview

Public response type for 10DLC campaign registration

Defined Under Namespace

Classes: EnumAttributeValidator

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 = {}) ⇒ TenDlcCampaignRegistration

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 168

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

  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
end

Instance Attribute Details

#account_idObject

Returns the value of attribute account_id.



19
20
21
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 19

def 
  @account_id
end

#campaign_age_gatedObject

Returns the value of attribute campaign_age_gated.



54
55
56
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 54

def campaign_age_gated
  @campaign_age_gated
end

#campaign_descriptionObject

Returns the value of attribute campaign_description.



24
25
26
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 24

def campaign_description
  @campaign_description
end

#campaign_direct_lendingObject

Returns the value of attribute campaign_direct_lending.



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

def campaign_direct_lending
  @campaign_direct_lending
end

Returns the value of attribute campaign_embedded_link.



48
49
50
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 48

def campaign_embedded_link
  @campaign_embedded_link
end

Returns the value of attribute campaign_embedded_link_url.



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

def campaign_embedded_link_url
  @campaign_embedded_link_url
end

#campaign_embedded_phoneObject

Returns the value of attribute campaign_embedded_phone.



52
53
54
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 52

def campaign_embedded_phone
  @campaign_embedded_phone
end

#campaign_help_keywordsObject

Returns the value of attribute campaign_help_keywords.



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

def campaign_help_keywords
  @campaign_help_keywords
end

#campaign_help_messageObject

Returns the value of attribute campaign_help_message.



46
47
48
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 46

def campaign_help_message
  @campaign_help_message
end

#campaign_message_flowObject

Returns the value of attribute campaign_message_flow.



34
35
36
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 34

def campaign_message_flow
  @campaign_message_flow
end

#campaign_optin_keywordsObject

Returns the value of attribute campaign_optin_keywords.



36
37
38
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 36

def campaign_optin_keywords
  @campaign_optin_keywords
end

#campaign_optin_messageObject

Returns the value of attribute campaign_optin_message.



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

def campaign_optin_message
  @campaign_optin_message
end

#campaign_optout_keywordsObject

Returns the value of attribute campaign_optout_keywords.



40
41
42
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 40

def campaign_optout_keywords
  @campaign_optout_keywords
end

#campaign_optout_messageObject

Returns the value of attribute campaign_optout_message.



42
43
44
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 42

def campaign_optout_message
  @campaign_optout_message
end

Returns the value of attribute campaign_privacy_policy_link.



58
59
60
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 58

def campaign_privacy_policy_link
  @campaign_privacy_policy_link
end

#campaign_sample1Object

Returns the value of attribute campaign_sample1.



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

def campaign_sample1
  @campaign_sample1
end

#campaign_sample2Object

Returns the value of attribute campaign_sample2.



28
29
30
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 28

def campaign_sample2
  @campaign_sample2
end

#campaign_sample3Object

Returns the value of attribute campaign_sample3.



30
31
32
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 30

def campaign_sample3
  @campaign_sample3
end

#campaign_sample4Object

Returns the value of attribute campaign_sample4.



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

def campaign_sample4
  @campaign_sample4
end

#campaign_statusObject

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.rb', line 22

def campaign_status
  @campaign_status
end

Returns the value of attribute campaign_terms_and_conditions_link.



60
61
62
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 60

def campaign_terms_and_conditions_link
  @campaign_terms_and_conditions_link
end

#campaign_usecaseObject

Returns the value of attribute campaign_usecase.



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

def campaign_usecase
  @campaign_usecase
end

#created_atObject

Returns the value of attribute created_at.



64
65
66
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 64

def created_at
  @created_at
end

#updated_atObject

Returns the value of attribute updated_at.



66
67
68
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 66

def updated_at
  @updated_at
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



121
122
123
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 121

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



126
127
128
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 126

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 91

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'
  }
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



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 410

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_nullableObject

List of attributes with nullable: true



161
162
163
164
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 161

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

.openapi_typesObject

Attribute type mapping.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 131

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'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 366

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
       == o. &&
      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 &&
      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 &&
      created_at == o.created_at &&
      updated_at == o.updated_at
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


397
398
399
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 397

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



403
404
405
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 403

def hash
  [, campaign_status, 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, created_at, updated_at].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 289

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_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



432
433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 432

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



313
314
315
316
317
318
319
320
321
322
# File 'lib/pingram/models/ten_dlc_campaign_registration.rb', line 313

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