Class: ConstantContactClient::EventDto

Inherits:
Object
  • Object
show all
Defined in:
lib/constant_contact_client/models/event_dto.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ EventDto

Initializes the object

Parameters:

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

    Model attributes in the form of hash



217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
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
# File 'lib/constant_contact_client/models/event_dto.rb', line 217

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

  if attributes.key?(:'title')
    self.title = attributes[:'title']
  else
    self.title = nil
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  else
    self.name = nil
  end

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

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

  if attributes.key?(:'event_start')
    self.event_start = attributes[:'event_start']
  else
    self.event_start = nil
  end

  if attributes.key?(:'event_end')
    self.event_end = attributes[:'event_end']
  else
    self.event_end = nil
  end

  if attributes.key?(:'event_type')
    self.event_type = attributes[:'event_type']
  else
    self.event_type = nil
  end

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

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

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

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

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

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

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

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

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

  if attributes.key?(:'default_track')
    self.default_track = attributes[:'default_track']
  else
    self.default_track = nil
  end

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

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

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

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

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

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

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

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

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

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

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

  if attributes.key?(:'location_type')
    self.location_type = attributes[:'location_type']
  else
    self.location_type = nil
  end

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

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

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

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

  if attributes.key?(:'time_zone')
    self.time_zone = attributes[:'time_zone']
  else
    self.time_zone = nil
  end

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

Instance Attribute Details

#active_timeObject

The time the event was published, in ISO format.



51
52
53
# File 'lib/constant_contact_client/models/event_dto.rb', line 51

def active_time
  @active_time
end

#addressObject

Returns the value of attribute address.



62
63
64
# File 'lib/constant_contact_client/models/event_dto.rb', line 62

def address
  @address
end

#campaign_idObject

The system assigned ID that uniquely identifies the event and is identical to the event_id.



31
32
33
# File 'lib/constant_contact_client/models/event_dto.rb', line 31

def campaign_id
  @campaign_id
end

#cancelled_timeObject

The time the event was cancelled, in ISO format. Read-only.



54
55
56
# File 'lib/constant_contact_client/models/event_dto.rb', line 54

def cancelled_time
  @cancelled_time
end

#contactObject

Returns the value of attribute contact.



45
46
47
# File 'lib/constant_contact_client/models/event_dto.rb', line 45

def contact
  @contact
end

#create_timeObject

The time the event was created, in ISO format. Read-only.



48
49
50
# File 'lib/constant_contact_client/models/event_dto.rb', line 48

def create_time
  @create_time
end

#currency_typeObject

The accepted currency for payments. Required for events collecting payments ['AUD','BRL','CAD','CHF','CZK','DKK','EUR','GBP','HKD','HUF','ILS','JPY','MXN','MYR','NOK','NZD','PHP','PLN','RUB','SEK','SGD','THB','TRY','TWD','USD']



65
66
67
# File 'lib/constant_contact_client/models/event_dto.rb', line 65

def currency_type
  @currency_type
end

#default_trackObject

Returns the value of attribute default_track.



67
68
69
# File 'lib/constant_contact_client/models/event_dto.rb', line 67

def default_track
  @default_track
end

#deleted_timeObject

The time the event was deleted, in ISO format. Read-only.



57
58
59
# File 'lib/constant_contact_client/models/event_dto.rb', line 57

def deleted_time
  @deleted_time
end

#descriptionObject

Provides the event description.



19
20
21
# File 'lib/constant_contact_client/models/event_dto.rb', line 19

def description
  @description
end

#display_contact_flagObject

Display or hide event contact information on the registration form and registration confirmation message.



70
71
72
# File 'lib/constant_contact_client/models/event_dto.rb', line 70

def display_contact_flag
  @display_contact_flag
end

#display_end_time_flagObject

Display or hide the event end time on the registration form and registration confirmation message.



73
74
75
# File 'lib/constant_contact_client/models/event_dto.rb', line 73

def display_end_time_flag
  @display_end_time_flag
end

#display_on_calendar_flagObject

Display the event on the Event Calendar.



76
77
78
# File 'lib/constant_contact_client/models/event_dto.rb', line 76

def display_on_calendar_flag
  @display_on_calendar_flag
end

#display_time_zone_flagObject

Display the time zone on the registration form and registration confirmation message.



79
80
81
# File 'lib/constant_contact_client/models/event_dto.rb', line 79

def display_time_zone_flag
  @display_time_zone_flag
end

#esoObject

The encrypted SOId.



43
44
45
# File 'lib/constant_contact_client/models/event_dto.rb', line 43

def eso
  @eso
end

#event_calendar_urlObject

The event calendar URL.



82
83
84
# File 'lib/constant_contact_client/models/event_dto.rb', line 82

def event_calendar_url
  @event_calendar_url
end

#event_codeObject

The short code to use for the event.



87
88
89
# File 'lib/constant_contact_client/models/event_dto.rb', line 87

def event_code
  @event_code
end

#event_endObject

The date the event ends.



37
38
39
# File 'lib/constant_contact_client/models/event_dto.rb', line 37

def event_end
  @event_end
end

#event_idObject

The ID that uniquely identifies the event.



28
29
30
# File 'lib/constant_contact_client/models/event_dto.rb', line 28

def event_id
  @event_id
end

#event_metadataObject

Returns the value of attribute event_metadata.



84
85
86
# File 'lib/constant_contact_client/models/event_dto.rb', line 84

def 
  @event_metadata
end

#event_promotionsObject

List of event promotions.



90
91
92
# File 'lib/constant_contact_client/models/event_dto.rb', line 90

def event_promotions
  @event_promotions
end

#event_settingsObject

Returns the value of attribute event_settings.



92
93
94
# File 'lib/constant_contact_client/models/event_dto.rb', line 92

def event_settings
  @event_settings
end

#event_startObject

The date the event starts.



34
35
36
# File 'lib/constant_contact_client/models/event_dto.rb', line 34

def event_start
  @event_start
end

#event_typeObject

Identifies the event type.



40
41
42
# File 'lib/constant_contact_client/models/event_dto.rb', line 40

def event_type
  @event_type
end

#event_widget_urlObject

The event widget URL.



95
96
97
# File 'lib/constant_contact_client/models/event_dto.rb', line 95

def event_widget_url
  @event_widget_url
end

#failed_campaign_activitiesObject

List of failed campaign activities.



98
99
100
# File 'lib/constant_contact_client/models/event_dto.rb', line 98

def failed_campaign_activities
  @failed_campaign_activities
end

#last_update_timeObject

The date and time the event was last modified.



60
61
62
# File 'lib/constant_contact_client/models/event_dto.rb', line 60

def last_update_time
  @last_update_time
end

#location_typeObject

Specifies if the event is physical and/or virtual, or to be determined.



101
102
103
# File 'lib/constant_contact_client/models/event_dto.rb', line 101

def location_type
  @location_type
end

#nameObject

The name of the event, has to be unique for the account.



25
26
27
# File 'lib/constant_contact_client/models/event_dto.rb', line 25

def name
  @name
end

#notify_owner_on_regObject

If true, sends an email to the event owner when a registration is made.



104
105
106
# File 'lib/constant_contact_client/models/event_dto.rb', line 104

def notify_owner_on_reg
  @notify_owner_on_reg
end

#online_meetingObject

Returns the value of attribute online_meeting.



106
107
108
# File 'lib/constant_contact_client/models/event_dto.rb', line 106

def online_meeting
  @online_meeting
end

#registration_urlObject

The event registration URL.



109
110
111
# File 'lib/constant_contact_client/models/event_dto.rb', line 109

def registration_url
  @registration_url
end

#statusObject

Specifies the event's current status.



112
113
114
# File 'lib/constant_contact_client/models/event_dto.rb', line 112

def status
  @status
end

#time_zoneObject

The time zone where the event takes place.



115
116
117
# File 'lib/constant_contact_client/models/event_dto.rb', line 115

def time_zone
  @time_zone
end

#time_zone_abbreviationObject

The abbreviation to use to indicate the time zone where the event takes place.



118
119
120
# File 'lib/constant_contact_client/models/event_dto.rb', line 118

def time_zone_abbreviation
  @time_zone_abbreviation
end

#titleObject

The title for the event. The title does not have to be unique for an account.



22
23
24
# File 'lib/constant_contact_client/models/event_dto.rb', line 22

def title
  @title
end

Class Method Details

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



621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
# File 'lib/constant_contact_client/models/event_dto.rb', line 621

def self._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 = ConstantContactClient.const_get(type)
    klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



163
164
165
# File 'lib/constant_contact_client/models/event_dto.rb', line 163

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



121
122
123
124
125
126
127
128
129
130
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
159
160
# File 'lib/constant_contact_client/models/event_dto.rb', line 121

def self.attribute_map
  {
    :'description' => :'description',
    :'title' => :'title',
    :'name' => :'name',
    :'event_id' => :'event_id',
    :'campaign_id' => :'campaign_id',
    :'event_start' => :'event_start',
    :'event_end' => :'event_end',
    :'event_type' => :'event_type',
    :'eso' => :'eso',
    :'contact' => :'contact',
    :'create_time' => :'create_time',
    :'active_time' => :'active_time',
    :'cancelled_time' => :'cancelled_time',
    :'deleted_time' => :'deleted_time',
    :'last_update_time' => :'last_update_time',
    :'address' => :'address',
    :'currency_type' => :'currency_type',
    :'default_track' => :'default_track',
    :'display_contact_flag' => :'display_contact_flag',
    :'display_end_time_flag' => :'display_end_time_flag',
    :'display_on_calendar_flag' => :'display_on_calendar_flag',
    :'display_time_zone_flag' => :'display_time_zone_flag',
    :'event_calendar_url' => :'event_calendar_url',
    :'event_metadata' => :'event_metadata',
    :'event_code' => :'event_code',
    :'event_promotions' => :'event_promotions',
    :'event_settings' => :'event_settings',
    :'event_widget_url' => :'event_widget_url',
    :'failed_campaign_activities' => :'failed_campaign_activities',
    :'location_type' => :'location_type',
    :'notify_owner_on_reg' => :'notify_owner_on_reg',
    :'online_meeting' => :'online_meeting',
    :'registration_url' => :'registration_url',
    :'status' => :'status',
    :'time_zone' => :'time_zone',
    :'time_zone_abbreviation' => :'time_zone_abbreviation'
  }
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



597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
# File 'lib/constant_contact_client/models/event_dto.rb', line 597

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



210
211
212
213
# File 'lib/constant_contact_client/models/event_dto.rb', line 210

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

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'description' => :'String',
    :'title' => :'String',
    :'name' => :'String',
    :'event_id' => :'String',
    :'campaign_id' => :'String',
    :'event_start' => :'String',
    :'event_end' => :'String',
    :'event_type' => :'String',
    :'eso' => :'String',
    :'contact' => :'ContactDto1',
    :'create_time' => :'String',
    :'active_time' => :'String',
    :'cancelled_time' => :'String',
    :'deleted_time' => :'String',
    :'last_update_time' => :'String',
    :'address' => :'AddressDto1',
    :'currency_type' => :'String',
    :'default_track' => :'TrackDto1',
    :'display_contact_flag' => :'Boolean',
    :'display_end_time_flag' => :'Boolean',
    :'display_on_calendar_flag' => :'Boolean',
    :'display_time_zone_flag' => :'Boolean',
    :'event_calendar_url' => :'String',
    :'event_metadata' => :'EventMetaDataDto1',
    :'event_code' => :'String',
    :'event_promotions' => :'Array<CreateEvent201ResponseEventPromotionsInner>',
    :'event_settings' => :'CreateEvent201ResponseEventSettings',
    :'event_widget_url' => :'String',
    :'failed_campaign_activities' => :'Array<String>',
    :'location_type' => :'String',
    :'notify_owner_on_reg' => :'Boolean',
    :'online_meeting' => :'OnlineMeetingDto1',
    :'registration_url' => :'String',
    :'status' => :'String',
    :'time_zone' => :'String',
    :'time_zone_abbreviation' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'lib/constant_contact_client/models/event_dto.rb', line 541

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      description == o.description &&
      title == o.title &&
      name == o.name &&
      event_id == o.event_id &&
      campaign_id == o.campaign_id &&
      event_start == o.event_start &&
      event_end == o.event_end &&
      event_type == o.event_type &&
      eso == o.eso &&
      contact == o.contact &&
      create_time == o.create_time &&
      active_time == o.active_time &&
      cancelled_time == o.cancelled_time &&
      deleted_time == o.deleted_time &&
      last_update_time == o.last_update_time &&
      address == o.address &&
      currency_type == o.currency_type &&
      default_track == o.default_track &&
      display_contact_flag == o.display_contact_flag &&
      display_end_time_flag == o.display_end_time_flag &&
      display_on_calendar_flag == o.display_on_calendar_flag &&
      display_time_zone_flag == o.display_time_zone_flag &&
      event_calendar_url == o.event_calendar_url &&
       == o. &&
      event_code == o.event_code &&
      event_promotions == o.event_promotions &&
      event_settings == o.event_settings &&
      event_widget_url == o.event_widget_url &&
      failed_campaign_activities == o.failed_campaign_activities &&
      location_type == o.location_type &&
      notify_owner_on_reg == o.notify_owner_on_reg &&
      online_meeting == o.online_meeting &&
      registration_url == o.registration_url &&
      status == o.status &&
      time_zone == o.time_zone &&
      time_zone_abbreviation == o.time_zone_abbreviation
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



692
693
694
695
696
697
698
699
700
701
702
703
704
# File 'lib/constant_contact_client/models/event_dto.rb', line 692

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

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


584
585
586
# File 'lib/constant_contact_client/models/event_dto.rb', line 584

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



590
591
592
# File 'lib/constant_contact_client/models/event_dto.rb', line 590

def hash
  [description, title, name, event_id, campaign_id, event_start, event_end, event_type, eso, contact, create_time, active_time, cancelled_time, deleted_time, last_update_time, address, currency_type, default_track, display_contact_flag, display_end_time_flag, display_on_calendar_flag, display_time_zone_flag, event_calendar_url, , event_code, event_promotions, event_settings, event_widget_url, failed_campaign_activities, location_type, notify_owner_on_reg, online_meeting, registration_url, status, time_zone, time_zone_abbreviation].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
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
# File 'lib/constant_contact_client/models/event_dto.rb', line 401

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @description.nil?
    invalid_properties.push('invalid value for "description", description cannot be nil.')
  end

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

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

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

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

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

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

  if @name.to_s.length < 1
    invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
  end

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

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

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

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

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

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

  if @time_zone.nil?
    invalid_properties.push('invalid value for "time_zone", time_zone 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



668
669
670
# File 'lib/constant_contact_client/models/event_dto.rb', line 668

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



674
675
676
677
678
679
680
681
682
683
684
685
686
# File 'lib/constant_contact_client/models/event_dto.rb', line 674

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



662
663
664
# File 'lib/constant_contact_client/models/event_dto.rb', line 662

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



469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/constant_contact_client/models/event_dto.rb', line 469

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @description.nil?
  return false if @description.to_s.length > 600
  return false if @description.to_s.length < 0
  return false if @title.nil?
  return false if @title.to_s.length > 100
  return false if @name.nil?
  return false if @name.to_s.length > 100
  return false if @name.to_s.length < 1
  return false if @campaign_id.nil?
  return false if @event_start.nil?
  return false if @event_end.nil?
  return false if @event_type.nil?
  return false if @default_track.nil?
  return false if @location_type.nil?
  return false if @time_zone.nil?
  true
end