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



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

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

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

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

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

  if attributes.key?(:'number_pool')
    self.number_pool = attributes[:'number_pool']
  else
    self.number_pool = 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

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

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

  if attributes.key?(:'subscriber_help')
    self.subscriber_help = attributes[:'subscriber_help']
  else
    self.subscriber_help = 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.



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

def 
  @account_id
end

#affiliate_marketingObject

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



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

def affiliate_marketing
  @affiliate_marketing
end

#age_gatedObject

Age gated content in campaign.



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

def age_gated
  @age_gated
end

#auto_renewalObject

Campaign subscription auto-renewal status.



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

def auto_renewal
  @auto_renewal
end

#billed_dateObject

Campaign recent billed date.



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

def billed_date
  @billed_date
end

#brand_idObject

Alphanumeric identifier of the brand associated with this campaign.



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

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.



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

def campaign_id
  @campaign_id
end

#create_dateObject

Unix timestamp when campaign was created.



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

def create_date
  @create_date
end

#csp_idObject

Alphanumeric identifier of the CSP associated with this campaign.



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

def csp_id
  @csp_id
end

#descriptionObject

Summary description of this campaign.



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

def description
  @description
end

#direct_lendingObject

Returns the value of attribute direct_lending.



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

def direct_lending
  @direct_lending
end

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



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

def embedded_link
  @embedded_link
end

#embedded_phoneObject

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



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

def embedded_phone
  @embedded_phone
end

#help_keywordsObject

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



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

def help_keywords
  @help_keywords
end

#help_messageObject

Help message of the campaign.



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

def help_message
  @help_message
end

#message_flowObject

Message flow description.



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

def message_flow
  @message_flow
end

#mockObject

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



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

def mock
  @mock
end

#next_renewal_or_expiration_dateObject

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



123
124
125
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 123

def next_renewal_or_expiration_date
  @next_renewal_or_expiration_date
end

#number_poolObject

Does campaign utilize pool of phone nubers?



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

def number_pool
  @number_pool
end

#optin_keywordsObject

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



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

def optin_keywords
  @optin_keywords
end

#optin_messageObject

Subscriber opt-in message.



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

def optin_message
  @optin_message
end

#optout_keywordsObject

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



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

def optout_keywords
  @optout_keywords
end

#optout_messageObject

Subscriber opt-out message.



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

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.



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

def reference_id
  @reference_id
end

#reseller_idObject

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



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

def reseller_id
  @reseller_id
end

#sample1Object

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



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

def sample1
  @sample1
end

#sample2Object

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



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

def sample2
  @sample2
end

#sample3Object

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



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

def sample3
  @sample3
end

#sample4Object

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



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

def sample4
  @sample4
end

#sample5Object

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



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

def sample5
  @sample5
end

#statusObject

Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status.



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

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



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

def sub_usecases
  @sub_usecases
end

#subscriber_helpObject

Does campaign responds to help keyword(s)?



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

def subscriber_help
  @subscriber_help
end

#subscriber_optinObject

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



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

def subscriber_optin
  @subscriber_optin
end

#subscriber_optoutObject

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



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

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.



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

def usecase
  @usecase
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



190
191
192
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 190

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



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

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



801
802
803
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 801

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

.openapi_nullableObject

List of attributes with nullable: true



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

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.



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

def self.openapi_types
  {
    :'account_id' => :'String',
    :'campaign_id' => :'String',
    :'csp_id' => :'String',
    :'reseller_id' => :'String',
    :'status' => :'String',
    :'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

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
771
772
773
774
775
776
777
778
779
780
781
782
783
784
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 745

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



831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 831

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



902
903
904
905
906
907
908
909
910
911
912
913
914
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 902

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



808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 808

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)
      self.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)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


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

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



794
795
796
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 794

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



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

def list_invalid_properties
  invalid_properties = Array.new
  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



878
879
880
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 878

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



884
885
886
887
888
889
890
891
892
893
894
895
896
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 884

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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



872
873
874
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 872

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



532
533
534
535
536
537
538
539
# File 'lib/freeclimb/models/sms_ten_dlc_campaign.rb', line 532

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