Class: Freeclimb::SMSTenDLCCampaign

Inherits:
Object
  • Object
show all
Defined in:
lib/freeclimb/models/sms_ten_dlc_campaign.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SMSTenDLCCampaign

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
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
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/freeclimb/models/sms_ten_dlc_campaign.rb', line 252

def initialize(attributes = {})
  if !attributes.is_a?(Hash)
    fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTenDLCCampaign` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if !self.class.attribute_map.key?(k.to_sym)
      fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTenDLCCampaign`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

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

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

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

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

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

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

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

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

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

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

  if attributes.key?(:sub_usecases)
    if (value = attributes[:sub_usecases]).is_a?(Array)
      self.sub_usecases = value
    end
  end

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

  self.embedded_link = if attributes.key?(:embedded_link)
    attributes[:embedded_link]
  else
    false
  end

  self.embedded_phone = if attributes.key?(:embedded_phone)
    attributes[:embedded_phone]
  else
    false
  end

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

  self.number_pool = if attributes.key?(:number_pool)
    attributes[:number_pool]
  else
    false
  end

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

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

  self.subscriber_optin = if attributes.key?(:subscriber_optin)
    attributes[:subscriber_optin]
  else
    false
  end

  self.subscriber_optout = if attributes.key?(:subscriber_optout)
    attributes[:subscriber_optout]
  else
    false
  end

  self.subscriber_help = if attributes.key?(:subscriber_help)
    attributes[:subscriber_help]
  else
    false
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#account_idObject

ID of the account that created this Queue.



17
18
19
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 17

def 
  @account_id
end

#affiliate_marketingObject

Does message content controlled by affiliate marketing other than the brand?



58
59
60
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 58

def affiliate_marketing
  @affiliate_marketing
end

#age_gatedObject

Age gated content in campaign.



64
65
66
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 64

def age_gated
  @age_gated
end

#auto_renewalObject

Campaign subscription auto-renewal status.



34
35
36
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 34

def auto_renewal
  @auto_renewal
end

#billed_dateObject

Campaign recent billed date.



37
38
39
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 37

def billed_date
  @billed_date
end

#brand_idObject

Alphanumeric identifier of the brand associated with this campaign.



40
41
42
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 40

def brand_id
  @brand_id
end

#campaign_idObject

Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC.



20
21
22
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 20

def campaign_id
  @campaign_id
end

#create_dateObject

Unix timestamp when campaign was created.



31
32
33
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 31

def create_date
  @create_date
end

#csp_idObject

Alphanumeric identifier of the CSP associated with this campaign.



23
24
25
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 23

def csp_id
  @csp_id
end

#descriptionObject

Summary description of this campaign.



49
50
51
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 49

def description
  @description
end

#direct_lendingObject

Returns the value of attribute direct_lending.



66
67
68
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 66

def direct_lending
  @direct_lending
end

Does message generated by the campaign include URL link in SMS?



52
53
54
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 52

def embedded_link
  @embedded_link
end

#embedded_phoneObject

Does message generated by the campaign include phone number in SMS?



55
56
57
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 55

def embedded_phone
  @embedded_phone
end

#help_keywordsObject

Subscriber help keywords. Multiple keywords are comma separated without space.



105
106
107
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 105

def help_keywords
  @help_keywords
end

#help_messageObject

Help message of the campaign.



96
97
98
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 96

def help_message
  @help_message
end

#message_flowObject

Message flow description.



93
94
95
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 93

def message_flow
  @message_flow
end

#mockObject

Campaign created from mock brand. Mocked campaign cannot be shared with an upstream CNP.



117
118
119
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 117

def mock
  @mock
end

#next_renewal_or_expiration_dateObject

When the campaign would be due for its next renew/bill date.



120
121
122
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 120

def next_renewal_or_expiration_date
  @next_renewal_or_expiration_date
end

#number_poolObject

Does campaign utilize pool of phone nubers?



61
62
63
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 61

def number_pool
  @number_pool
end

#optin_keywordsObject

Subscriber opt-in keywords. Multiple keywords are comma separated without space.



99
100
101
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 99

def optin_keywords
  @optin_keywords
end

#optin_messageObject

Subscriber opt-in message.



108
109
110
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 108

def optin_message
  @optin_message
end

#optout_keywordsObject

Subscriber opt-out keywords. Multiple keywords are comma separated without space.



102
103
104
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 102

def optout_keywords
  @optout_keywords
end

#optout_messageObject

Subscriber opt-out message.



111
112
113
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 111

def optout_message
  @optout_message
end

#reference_idObject

Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations.



114
115
116
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 114

def reference_id
  @reference_id
end

#reseller_idObject

Alphanumeric identifier of the reseller that you want to associate with this campaign.



26
27
28
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 26

def reseller_id
  @reseller_id
end

#sample1Object

Message sample. Some campaign tiers require 1 or more message samples.



78
79
80
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 78

def sample1
  @sample1
end

#sample2Object

Message sample. Some campaign tiers require 2 or more message samples.



81
82
83
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 81

def sample2
  @sample2
end

#sample3Object

Message sample. Some campaign tiers require 3 or more message samples.



84
85
86
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 84

def sample3
  @sample3
end

#sample4Object

Message sample. Some campaign tiers require 4 or more message samples.



87
88
89
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 87

def sample4
  @sample4
end

#sample5Object

Message sample. Some campaign tiers require 5 or more message samples.



90
91
92
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 90

def sample5
  @sample5
end

#statusObject

Returns the value of attribute status.



28
29
30
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 28

def status
  @status
end

#sub_usecasesObject

Campaign sub-usecases. Must be of defined valid sub-usecase types. Use ‘/registry/enum/usecase` operation to retrieve list of valid sub-usecases



46
47
48
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 46

def sub_usecases
  @sub_usecases
end

#subscriber_helpObject

Does campaign responds to help keyword(s)?



75
76
77
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 75

def subscriber_help
  @subscriber_help
end

#subscriber_optinObject

Does campaign require subscriber to opt-in before SMS is sent to subscriber?



69
70
71
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 69

def subscriber_optin
  @subscriber_optin
end

#subscriber_optoutObject

Does campaign support subscriber opt-out keyword(s)?



72
73
74
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 72

def subscriber_optout
  @subscriber_optout
end

#usecaseObject

Campaign usecase. Must be of defined valid types. Use ‘/registry/enum/usecase` operation to retrieve usecases available for given brand.



43
44
45
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 43

def usecase
  @usecase
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



187
188
189
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 187

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



145
146
147
148
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
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 145

def self.attribute_map
  {
    account_id: :accountId,
    campaign_id: :campaignId,
    csp_id: :cspId,
    reseller_id: :resellerId,
    status: :status,
    create_date: :createDate,
    auto_renewal: :autoRenewal,
    billed_date: :billedDate,
    brand_id: :brandId,
    usecase: :usecase,
    sub_usecases: :subUsecases,
    description: :description,
    embedded_link: :embeddedLink,
    embedded_phone: :embeddedPhone,
    affiliate_marketing: :affiliateMarketing,
    number_pool: :numberPool,
    age_gated: :ageGated,
    direct_lending: :directLending,
    subscriber_optin: :subscriberOptin,
    subscriber_optout: :subscriberOptout,
    subscriber_help: :subscriberHelp,
    sample1: :sample1,
    sample2: :sample2,
    sample3: :sample3,
    sample4: :sample4,
    sample5: :sample5,
    message_flow: :messageFlow,
    help_message: :helpMessage,
    optin_keywords: :optinKeywords,
    optout_keywords: :optoutKeywords,
    help_keywords: :helpKeywords,
    optin_message: :optinMessage,
    optout_message: :optoutMessage,
    reference_id: :referenceId,
    mock: :mock,
    next_renewal_or_expiration_date: :nextRenewalOrExpirationDate
  }
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



787
788
789
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 787

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 234

def self.openapi_nullable
  Set.new([
    :account_id,
    :reseller_id,
    :billed_date,
    :sample2,
    :sample3,
    :sample4,
    :sample5,
    :message_flow,
    :help_message,
    :reference_id,
    :next_renewal_or_expiration_date
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 192

def self.openapi_types
  {
    account_id: :String,
    campaign_id: :String,
    csp_id: :String,
    reseller_id: :String,
    status: :SMSTenDLCCampaignStatus,
    create_date: :Time,
    auto_renewal: :Boolean,
    billed_date: :Time,
    brand_id: :String,
    usecase: :String,
    sub_usecases: :"Array<String>",
    description: :String,
    embedded_link: :Boolean,
    embedded_phone: :Boolean,
    affiliate_marketing: :Boolean,
    number_pool: :Boolean,
    age_gated: :Boolean,
    direct_lending: :Boolean,
    subscriber_optin: :Boolean,
    subscriber_optout: :Boolean,
    subscriber_help: :Boolean,
    sample1: :String,
    sample2: :String,
    sample3: :String,
    sample4: :String,
    sample5: :String,
    message_flow: :String,
    help_message: :String,
    optin_keywords: :String,
    optout_keywords: :String,
    help_keywords: :String,
    optin_message: :String,
    optout_message: :String,
    reference_id: :String,
    mock: :Boolean,
    next_renewal_or_expiration_date: :Date
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 731

def ==(other)
  return true if equal?(other)
  self.class == other.class &&
     == other. &&
    campaign_id == other.campaign_id &&
    csp_id == other.csp_id &&
    reseller_id == other.reseller_id &&
    status == other.status &&
    create_date == other.create_date &&
    auto_renewal == other.auto_renewal &&
    billed_date == other.billed_date &&
    brand_id == other.brand_id &&
    usecase == other.usecase &&
    sub_usecases == other.sub_usecases &&
    description == other.description &&
    embedded_link == other.embedded_link &&
    embedded_phone == other.embedded_phone &&
    affiliate_marketing == other.affiliate_marketing &&
    number_pool == other.number_pool &&
    age_gated == other.age_gated &&
    direct_lending == other.direct_lending &&
    subscriber_optin == other.subscriber_optin &&
    subscriber_optout == other.subscriber_optout &&
    subscriber_help == other.subscriber_help &&
    sample1 == other.sample1 &&
    sample2 == other.sample2 &&
    sample3 == other.sample3 &&
    sample4 == other.sample4 &&
    sample5 == other.sample5 &&
    message_flow == other.message_flow &&
    help_message == other.help_message &&
    optin_keywords == other.optin_keywords &&
    optout_keywords == other.optout_keywords &&
    help_keywords == other.help_keywords &&
    optin_message == other.optin_message &&
    optout_message == other.optout_message &&
    reference_id == other.reference_id &&
    mock == other.mock &&
    next_renewal_or_expiration_date == other.next_renewal_or_expiration_date
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 817

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = Freeclimb.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



888
889
890
891
892
893
894
895
896
897
898
899
900
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 888

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
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



794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 794

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      send(:"#{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[self.class.attribute_map[key]].is_a?(Array)
        send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


774
775
776
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 774

def eql?(other)
  self == other
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



780
781
782
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 780

def hash
  [, campaign_id, csp_id, reseller_id, status, create_date, auto_renewal, billed_date, brand_id, usecase, sub_usecases, description, embedded_link, embedded_phone, affiliate_marketing, number_pool, age_gated, direct_lending, subscriber_optin, subscriber_optout, subscriber_help, sample1, sample2, sample3, sample4, sample5, message_flow, help_message, optin_keywords, optout_keywords, help_keywords, optin_message, optout_message, reference_id, mock, next_renewal_or_expiration_date].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 426

def list_invalid_properties
  invalid_properties = []
  if @campaign_id.nil?
    invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.')
  end

  if @csp_id.nil?
    invalid_properties.push('invalid value for "csp_id", csp_id cannot be nil.')
  end

  if !@reseller_id.nil? && @reseller_id.to_s.length > 8
    invalid_properties.push('invalid value for "reseller_id", the character length must be smaller than or equal to 8.')
  end

  if @brand_id.nil?
    invalid_properties.push('invalid value for "brand_id", brand_id cannot be nil.')
  end

  if @brand_id.to_s.length > 8
    invalid_properties.push('invalid value for "brand_id", the character length must be smaller than or equal to 8.')
  end

  if @usecase.nil?
    invalid_properties.push('invalid value for "usecase", usecase cannot be nil.')
  end

  if @usecase.to_s.length > 20
    invalid_properties.push('invalid value for "usecase", the character length must be smaller than or equal to 20.')
  end

  if @sub_usecases.nil?
    invalid_properties.push('invalid value for "sub_usecases", sub_usecases cannot be nil.')
  end

  if @description.nil?
    invalid_properties.push('invalid value for "description", description cannot be nil.')
  end

  if @description.to_s.length > 4096
    invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 4096.')
  end

  if !@sample1.nil? && @sample1.to_s.length > 1024
    invalid_properties.push('invalid value for "sample1", the character length must be smaller than or equal to 1024.')
  end

  if !@sample2.nil? && @sample2.to_s.length > 1024
    invalid_properties.push('invalid value for "sample2", the character length must be smaller than or equal to 1024.')
  end

  if !@sample3.nil? && @sample3.to_s.length > 1024
    invalid_properties.push('invalid value for "sample3", the character length must be smaller than or equal to 1024.')
  end

  if !@sample4.nil? && @sample4.to_s.length > 1024
    invalid_properties.push('invalid value for "sample4", the character length must be smaller than or equal to 1024.')
  end

  if !@sample5.nil? && @sample5.to_s.length > 1024
    invalid_properties.push('invalid value for "sample5", the character length must be smaller than or equal to 1024.')
  end

  if !@message_flow.nil? && @message_flow.to_s.length > 2048
    invalid_properties.push('invalid value for "message_flow", the character length must be smaller than or equal to 2048.')
  end

  if !@help_message.nil? && @help_message.to_s.length > 255
    invalid_properties.push('invalid value for "help_message", the character length must be smaller than or equal to 255.')
  end

  if !@optin_keywords.nil? && @optin_keywords.to_s.length > 255
    invalid_properties.push('invalid value for "optin_keywords", the character length must be smaller than or equal to 255.')
  end

  if !@optout_keywords.nil? && @optout_keywords.to_s.length > 255
    invalid_properties.push('invalid value for "optout_keywords", the character length must be smaller than or equal to 255.')
  end

  if !@help_keywords.nil? && @help_keywords.to_s.length > 255
    invalid_properties.push('invalid value for "help_keywords", the character length must be smaller than or equal to 255.')
  end

  if !@optin_message.nil? && @optin_message.to_s.length > 255
    invalid_properties.push('invalid value for "optin_message", the character length must be smaller than or equal to 255.')
  end

  if !@optout_message.nil? && @optout_message.to_s.length > 255
    invalid_properties.push('invalid value for "optout_message", the character length must be smaller than or equal to 255.')
  end

  if !@reference_id.nil? && @reference_id.to_s.length > 50
    invalid_properties.push('invalid value for "reference_id", the character length must be smaller than or equal to 50.')
  end

  if @mock.nil?
    invalid_properties.push('invalid value for "mock", mock cannot be nil.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



864
865
866
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 864

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



870
871
872
873
874
875
876
877
878
879
880
881
882
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 870

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = 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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



858
859
860
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 858

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



529
530
531
532
533
534
535
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 529

def valid?
  if @account_id.nil?
    false
  else
    list_invalid_properties.length == 0
  end
end