Class: ConstantContactClient::CreateImportJSONActivityRequestImportDataInner

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateImportJSONActivityRequestImportDataInner

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 243

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#anniversaryObject

The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY.



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

def anniversary
  @anniversary
end

#birthday_dayObject

The day value for the contact’s birthday. Valid values are from 1 through 31. The birthday_day property is required if you use birthday_month.



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

def birthday_day
  @birthday_day
end

#birthday_monthObject

The month value for the contact’s birthday. Valid values are from 1 through 12. The birthday_month property is required if you use birthday_day.



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

def birthday_month
  @birthday_month
end

#cfcustom_field_nameObject

The name of this property is dynamic based on the custom fields you want to import. Use a key-value pair where the key is an existing custom field name prefixed with cf:, and the value is a custom field string value. For example, if you have a custom field named first_name you can use \"cf:first_name\":\"Joe\". Each contact can contain up to 25 different custom fields.



130
131
132
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 130

def cfcustom_field_name
  @cfcustom_field_name
end

#cityObject

The name of the primary city for the contact. Use this field to add the default kind of city to the imported contact’s home address. The default kind is home.



64
65
66
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 64

def city
  @city
end

#company_nameObject

The name of the company where the contact works.



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

def company_name
  @company_name
end

#countryObject

The name of the primary country where the contact is located. Use this field to add the default kind of country to the imported contact’s street address. The default kind is home.



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

def country
  @country
end

#emailObject

The email address of the contact. This method identifies each unique contact using their email address.



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

def email
  @email
end

#first_nameObject

The first name of the contact.



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

def first_name
  @first_name
end

#home_cityObject

The name of the city where the contact lives.



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

def home_city
  @home_city
end

#home_countryObject

The name of the country where the contact lives.



91
92
93
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 91

def home_country
  @home_country
end

#home_phoneObject

The home phone number for the contact.



46
47
48
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 46

def home_phone
  @home_phone
end

#home_stateObject

The name of the home state or province where the contact lives.



85
86
87
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 85

def home_state
  @home_state
end

#home_streetObject

Line one of the home street address for the contact.



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

def home_street
  @home_street
end

#home_street2Object

Line two of the home street address for the contact. This value is automatically appended to the home_street value.



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

def home_street2
  @home_street2
end

#home_zipObject

The zip or postal code associated with the contact’s home address.



88
89
90
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 88

def home_zip
  @home_zip
end

#job_titleObject

The job title of the contact.



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

def job_title
  @job_title
end

#last_nameObject

The last name of the contact.



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

def last_name
  @last_name
end

#mobile_phoneObject

The mobile phone number for the contact.



52
53
54
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 52

def mobile_phone
  @mobile_phone
end

#other_cityObject

The name of another city where the contact is located.



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

def other_city
  @other_city
end

#other_countryObject

The name of another country where the contact is located.



127
128
129
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 127

def other_country
  @other_country
end

#other_phoneObject

A phone number for the contact.



55
56
57
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 55

def other_phone
  @other_phone
end

#other_stateObject

The name of another state or province where the contact is located.



121
122
123
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 121

def other_state
  @other_state
end

#other_streetObject

Line one of the other street address for the contact.



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

def other_street
  @other_street
end

#other_street2Object

Line two of the other street address for the contact. This value is automatically appended to the other_street value.



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

def other_street2
  @other_street2
end

#other_zipObject

The zip or postal code associated with the contact’s other address.



124
125
126
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 124

def other_zip
  @other_zip
end

#phoneObject

The primary phone number for the contact. Use this field to add the default kind of phone number to the imported contact’s phone number. Default kind is other.



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

def phone
  @phone
end

Required if the SMS permission is set to ‘explict`. The date that the contact consented to receiving SMS messages. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY .



136
137
138
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 136

def sms_consent_date
  @sms_consent_date
end

#sms_numberObject

The US phone number to associate with the contact’s SMS-enabled phone. The country code must be valid. Valid formats are 1231231234 or 123-123-1234.



133
134
135
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 133

def sms_number
  @sms_number
end

#stateObject

The name of the primary state or province for the contact. Use this field to add the default kind of state to the imported contact’s home address. The default kind is home.



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

def state
  @state
end

#streetObject

Line one of the primary street address for the contact. Use this field to add the default kind of street to the imported contact’s street address. The default kind is home. which maps to the street_addresses array` in the response.



58
59
60
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 58

def street
  @street
end

#street2Object

Line two of the primary street address for the contact. This value is automatically appended to the street value. Use this field to add the default kind for line two of the street address to the imported contact’s address. The default kind is other.



61
62
63
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 61

def street2
  @street2
end

#work_cityObject

The name of the city where the contact works.



100
101
102
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 100

def work_city
  @work_city
end

#work_countryObject

The name of the country where the contact works.



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

def work_country
  @work_country
end

#work_phoneObject

The work phone number for the contact.



49
50
51
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 49

def work_phone
  @work_phone
end

#work_stateObject

The name of the state or province where the contact works.



103
104
105
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 103

def work_state
  @work_state
end

#work_streetObject

Line one of the work street address for the contact.



94
95
96
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 94

def work_street
  @work_street
end

#work_street2Object

Line two of the work street address for the contact. This value is automatically appended to the work_street value.



97
98
99
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 97

def work_street2
  @work_street2
end

#work_zipObject

The zip or postal code associated with the contact’s work address.



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

def work_zip
  @work_zip
end

#zipObject

The zip or postal code associated with the contact’s primary address. Use this field to add the default kind of zip to the imported contact’s street address. The default kind is home.



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

def zip
  @zip
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



1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 1228

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



185
186
187
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 185

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



139
140
141
142
143
144
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
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 139

def self.attribute_map
  {
    :'email' => :'email',
    :'first_name' => :'first_name',
    :'last_name' => :'last_name',
    :'job_title' => :'job_title',
    :'company_name' => :'company_name',
    :'birthday_month' => :'birthday_month',
    :'birthday_day' => :'birthday_day',
    :'anniversary' => :'anniversary',
    :'phone' => :'phone',
    :'home_phone' => :'home_phone',
    :'work_phone' => :'work_phone',
    :'mobile_phone' => :'mobile_phone',
    :'other_phone' => :'other_phone',
    :'street' => :'street',
    :'street2' => :'street2',
    :'city' => :'city',
    :'state' => :'state',
    :'zip' => :'zip',
    :'country' => :'country',
    :'home_street' => :'home_street',
    :'home_street2' => :'home_street2',
    :'home_city' => :'home_city',
    :'home_state' => :'home_state',
    :'home_zip' => :'home_zip',
    :'home_country' => :'home country',
    :'work_street' => :'work_street',
    :'work_street2' => :'work_street2',
    :'work_city' => :'work_city',
    :'work_state' => :'work_state',
    :'work_zip' => :'work_zip',
    :'work_country' => :'work_country',
    :'other_street' => :'other_street',
    :'other_street2' => :'other_street2',
    :'other_city' => :'other_city',
    :'other_state' => :'other_state',
    :'other_zip' => :'other_zip',
    :'other_country' => :'other_country',
    :'cfcustom_field_name' => :'cf:custom_field_name',
    :'sms_number' => :'sms_number',
    :'sms_consent_date' => :'sms_consent_date'
  }
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



1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 1204

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



236
237
238
239
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 236

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

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'email' => :'String',
    :'first_name' => :'String',
    :'last_name' => :'String',
    :'job_title' => :'String',
    :'company_name' => :'String',
    :'birthday_month' => :'Integer',
    :'birthday_day' => :'Integer',
    :'anniversary' => :'String',
    :'phone' => :'String',
    :'home_phone' => :'String',
    :'work_phone' => :'String',
    :'mobile_phone' => :'String',
    :'other_phone' => :'String',
    :'street' => :'String',
    :'street2' => :'String',
    :'city' => :'String',
    :'state' => :'String',
    :'zip' => :'String',
    :'country' => :'String',
    :'home_street' => :'String',
    :'home_street2' => :'String',
    :'home_city' => :'String',
    :'home_state' => :'String',
    :'home_zip' => :'String',
    :'home_country' => :'String',
    :'work_street' => :'String',
    :'work_street2' => :'String',
    :'work_city' => :'String',
    :'work_state' => :'String',
    :'work_zip' => :'String',
    :'work_country' => :'String',
    :'other_street' => :'String',
    :'other_street2' => :'String',
    :'other_city' => :'String',
    :'other_state' => :'String',
    :'other_zip' => :'String',
    :'other_country' => :'String',
    :'cfcustom_field_name' => :'String',
    :'sms_number' => :'String',
    :'sms_consent_date' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 1144

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      email == o.email &&
      first_name == o.first_name &&
      last_name == o.last_name &&
      job_title == o.job_title &&
      company_name == o.company_name &&
      birthday_month == o.birthday_month &&
      birthday_day == o.birthday_day &&
      anniversary == o.anniversary &&
      phone == o.phone &&
      home_phone == o.home_phone &&
      work_phone == o.work_phone &&
      mobile_phone == o.mobile_phone &&
      other_phone == o.other_phone &&
      street == o.street &&
      street2 == o.street2 &&
      city == o.city &&
      state == o.state &&
      zip == o.zip &&
      country == o.country &&
      home_street == o.home_street &&
      home_street2 == o.home_street2 &&
      home_city == o.home_city &&
      home_state == o.home_state &&
      home_zip == o.home_zip &&
      home_country == o.home_country &&
      work_street == o.work_street &&
      work_street2 == o.work_street2 &&
      work_city == o.work_city &&
      work_state == o.work_state &&
      work_zip == o.work_zip &&
      work_country == o.work_country &&
      other_street == o.other_street &&
      other_street2 == o.other_street2 &&
      other_city == o.other_city &&
      other_state == o.other_state &&
      other_zip == o.other_zip &&
      other_country == o.other_country &&
      cfcustom_field_name == o.cfcustom_field_name &&
      sms_number == o.sms_number &&
      sms_consent_date == o.sms_consent_date
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



1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 1299

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


1191
1192
1193
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 1191

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



1197
1198
1199
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 1197

def hash
  [email, first_name, last_name, job_title, company_name, birthday_month, birthday_day, anniversary, phone, home_phone, work_phone, mobile_phone, other_phone, street, street2, city, state, zip, country, home_street, home_street2, home_city, home_state, home_zip, home_country, work_street, work_street2, work_city, work_state, work_zip, work_country, other_street, other_street2, other_city, other_state, other_zip, other_country, cfcustom_field_name, sms_number, sms_consent_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



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
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
529
530
531
532
533
534
535
536
537
538
539
540
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
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 421

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  if !@sms_consent_date.nil? && @sms_consent_date.to_s.length > 16
    invalid_properties.push('invalid value for "sms_consent_date", the character length must be smaller than or equal to 16.')
  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



1275
1276
1277
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 1275

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



1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 1281

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



1269
1270
1271
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 1269

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



581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
# File 'lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb', line 581

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @email.nil?
  return false if @email.to_s.length > 50
  return false if !@first_name.nil? && @first_name.to_s.length > 50
  return false if !@last_name.nil? && @last_name.to_s.length > 50
  return false if !@job_title.nil? && @job_title.to_s.length > 50
  return false if !@company_name.nil? && @company_name.to_s.length > 50
  return false if !@phone.nil? && @phone.to_s.length > 50
  return false if !@home_phone.nil? && @home_phone.to_s.length > 50
  return false if !@work_phone.nil? && @work_phone.to_s.length > 50
  return false if !@mobile_phone.nil? && @mobile_phone.to_s.length > 50
  return false if !@other_phone.nil? && @other_phone.to_s.length > 50
  return false if !@street.nil? && @street.to_s.length > 255
  return false if !@street2.nil? && @street2.to_s.length > 255
  return false if !@city.nil? && @city.to_s.length > 50
  return false if !@state.nil? && @state.to_s.length > 50
  return false if !@zip.nil? && @zip.to_s.length > 50
  return false if !@country.nil? && @country.to_s.length > 50
  return false if !@home_street.nil? && @home_street.to_s.length > 255
  return false if !@home_street2.nil? && @home_street2.to_s.length > 255
  return false if !@home_city.nil? && @home_city.to_s.length > 50
  return false if !@home_state.nil? && @home_state.to_s.length > 50
  return false if !@home_zip.nil? && @home_zip.to_s.length > 50
  return false if !@home_country.nil? && @home_country.to_s.length > 50
  return false if !@work_street.nil? && @work_street.to_s.length > 255
  return false if !@work_street2.nil? && @work_street2.to_s.length > 255
  return false if !@work_city.nil? && @work_city.to_s.length > 50
  return false if !@work_state.nil? && @work_state.to_s.length > 50
  return false if !@work_zip.nil? && @work_zip.to_s.length > 50
  return false if !@work_country.nil? && @work_country.to_s.length > 50
  return false if !@other_street.nil? && @other_street.to_s.length > 255
  return false if !@other_street2.nil? && @other_street2.to_s.length > 255
  return false if !@other_city.nil? && @other_city.to_s.length > 50
  return false if !@other_state.nil? && @other_state.to_s.length > 50
  return false if !@other_zip.nil? && @other_zip.to_s.length > 50
  return false if !@other_country.nil? && @other_country.to_s.length > 50
  return false if !@cfcustom_field_name.nil? && @cfcustom_field_name.to_s.length > 255
  return false if !@sms_number.nil? && @sms_number.to_s.length > 16
  return false if !@sms_consent_date.nil? && @sms_consent_date.to_s.length > 16
  true
end