ultracart_api 3.10.37 → 3.10.40

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,510 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ItemReview
17
+ # Customer profile object identifier
18
+ attr_accessor :customer_profile_oid
19
+
20
+ attr_accessor :featured
21
+
22
+ attr_accessor :helperful_no_votes
23
+
24
+ attr_accessor :helpful_yes_votes
25
+
26
+ attr_accessor :order_id
27
+
28
+ attr_accessor :overall
29
+
30
+ attr_accessor :rating_name1
31
+
32
+ attr_accessor :rating_name10
33
+
34
+ attr_accessor :rating_name2
35
+
36
+ attr_accessor :rating_name3
37
+
38
+ attr_accessor :rating_name4
39
+
40
+ attr_accessor :rating_name5
41
+
42
+ attr_accessor :rating_name6
43
+
44
+ attr_accessor :rating_name7
45
+
46
+ attr_accessor :rating_name8
47
+
48
+ attr_accessor :rating_name9
49
+
50
+ attr_accessor :rating_score1
51
+
52
+ attr_accessor :rating_score10
53
+
54
+ attr_accessor :rating_score2
55
+
56
+ attr_accessor :rating_score3
57
+
58
+ attr_accessor :rating_score4
59
+
60
+ attr_accessor :rating_score5
61
+
62
+ attr_accessor :rating_score6
63
+
64
+ attr_accessor :rating_score7
65
+
66
+ attr_accessor :rating_score8
67
+
68
+ attr_accessor :rating_score9
69
+
70
+ attr_accessor :recommend_store_to_friend
71
+
72
+ attr_accessor :recommend_to_friend
73
+
74
+ attr_accessor :review
75
+
76
+ attr_accessor :review_oid
77
+
78
+ attr_accessor :reviewed_nickname
79
+
80
+ attr_accessor :reviewer_email
81
+
82
+ attr_accessor :reviewer_location
83
+
84
+ attr_accessor :status
85
+
86
+ attr_accessor :store_feedback
87
+
88
+ # Date/time of review submission
89
+ attr_accessor :submitted_dts
90
+
91
+ attr_accessor :title
92
+
93
+ # Attribute mapping from ruby-style variable name to JSON key.
94
+ def self.attribute_map
95
+ {
96
+ :'customer_profile_oid' => :'customer_profile_oid',
97
+ :'featured' => :'featured',
98
+ :'helperful_no_votes' => :'helperful_no_votes',
99
+ :'helpful_yes_votes' => :'helpful_yes_votes',
100
+ :'order_id' => :'order_id',
101
+ :'overall' => :'overall',
102
+ :'rating_name1' => :'rating_name1',
103
+ :'rating_name10' => :'rating_name10',
104
+ :'rating_name2' => :'rating_name2',
105
+ :'rating_name3' => :'rating_name3',
106
+ :'rating_name4' => :'rating_name4',
107
+ :'rating_name5' => :'rating_name5',
108
+ :'rating_name6' => :'rating_name6',
109
+ :'rating_name7' => :'rating_name7',
110
+ :'rating_name8' => :'rating_name8',
111
+ :'rating_name9' => :'rating_name9',
112
+ :'rating_score1' => :'rating_score1',
113
+ :'rating_score10' => :'rating_score10',
114
+ :'rating_score2' => :'rating_score2',
115
+ :'rating_score3' => :'rating_score3',
116
+ :'rating_score4' => :'rating_score4',
117
+ :'rating_score5' => :'rating_score5',
118
+ :'rating_score6' => :'rating_score6',
119
+ :'rating_score7' => :'rating_score7',
120
+ :'rating_score8' => :'rating_score8',
121
+ :'rating_score9' => :'rating_score9',
122
+ :'recommend_store_to_friend' => :'recommend_store_to_friend',
123
+ :'recommend_to_friend' => :'recommend_to_friend',
124
+ :'review' => :'review',
125
+ :'review_oid' => :'review_oid',
126
+ :'reviewed_nickname' => :'reviewed_nickname',
127
+ :'reviewer_email' => :'reviewer_email',
128
+ :'reviewer_location' => :'reviewer_location',
129
+ :'status' => :'status',
130
+ :'store_feedback' => :'store_feedback',
131
+ :'submitted_dts' => :'submitted_dts',
132
+ :'title' => :'title'
133
+ }
134
+ end
135
+
136
+ # Attribute type mapping.
137
+ def self.swagger_types
138
+ {
139
+ :'customer_profile_oid' => :'Integer',
140
+ :'featured' => :'BOOLEAN',
141
+ :'helperful_no_votes' => :'Integer',
142
+ :'helpful_yes_votes' => :'Integer',
143
+ :'order_id' => :'String',
144
+ :'overall' => :'Float',
145
+ :'rating_name1' => :'String',
146
+ :'rating_name10' => :'String',
147
+ :'rating_name2' => :'String',
148
+ :'rating_name3' => :'String',
149
+ :'rating_name4' => :'String',
150
+ :'rating_name5' => :'String',
151
+ :'rating_name6' => :'String',
152
+ :'rating_name7' => :'String',
153
+ :'rating_name8' => :'String',
154
+ :'rating_name9' => :'String',
155
+ :'rating_score1' => :'Float',
156
+ :'rating_score10' => :'Float',
157
+ :'rating_score2' => :'Float',
158
+ :'rating_score3' => :'Float',
159
+ :'rating_score4' => :'Float',
160
+ :'rating_score5' => :'Float',
161
+ :'rating_score6' => :'Float',
162
+ :'rating_score7' => :'Float',
163
+ :'rating_score8' => :'Float',
164
+ :'rating_score9' => :'Float',
165
+ :'recommend_store_to_friend' => :'Integer',
166
+ :'recommend_to_friend' => :'BOOLEAN',
167
+ :'review' => :'String',
168
+ :'review_oid' => :'Integer',
169
+ :'reviewed_nickname' => :'String',
170
+ :'reviewer_email' => :'String',
171
+ :'reviewer_location' => :'String',
172
+ :'status' => :'String',
173
+ :'store_feedback' => :'String',
174
+ :'submitted_dts' => :'String',
175
+ :'title' => :'String'
176
+ }
177
+ end
178
+
179
+ # Initializes the object
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ def initialize(attributes = {})
182
+ return unless attributes.is_a?(Hash)
183
+
184
+ # convert string to symbol for hash key
185
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
186
+
187
+ if attributes.has_key?(:'customer_profile_oid')
188
+ self.customer_profile_oid = attributes[:'customer_profile_oid']
189
+ end
190
+
191
+ if attributes.has_key?(:'featured')
192
+ self.featured = attributes[:'featured']
193
+ end
194
+
195
+ if attributes.has_key?(:'helperful_no_votes')
196
+ self.helperful_no_votes = attributes[:'helperful_no_votes']
197
+ end
198
+
199
+ if attributes.has_key?(:'helpful_yes_votes')
200
+ self.helpful_yes_votes = attributes[:'helpful_yes_votes']
201
+ end
202
+
203
+ if attributes.has_key?(:'order_id')
204
+ self.order_id = attributes[:'order_id']
205
+ end
206
+
207
+ if attributes.has_key?(:'overall')
208
+ self.overall = attributes[:'overall']
209
+ end
210
+
211
+ if attributes.has_key?(:'rating_name1')
212
+ self.rating_name1 = attributes[:'rating_name1']
213
+ end
214
+
215
+ if attributes.has_key?(:'rating_name10')
216
+ self.rating_name10 = attributes[:'rating_name10']
217
+ end
218
+
219
+ if attributes.has_key?(:'rating_name2')
220
+ self.rating_name2 = attributes[:'rating_name2']
221
+ end
222
+
223
+ if attributes.has_key?(:'rating_name3')
224
+ self.rating_name3 = attributes[:'rating_name3']
225
+ end
226
+
227
+ if attributes.has_key?(:'rating_name4')
228
+ self.rating_name4 = attributes[:'rating_name4']
229
+ end
230
+
231
+ if attributes.has_key?(:'rating_name5')
232
+ self.rating_name5 = attributes[:'rating_name5']
233
+ end
234
+
235
+ if attributes.has_key?(:'rating_name6')
236
+ self.rating_name6 = attributes[:'rating_name6']
237
+ end
238
+
239
+ if attributes.has_key?(:'rating_name7')
240
+ self.rating_name7 = attributes[:'rating_name7']
241
+ end
242
+
243
+ if attributes.has_key?(:'rating_name8')
244
+ self.rating_name8 = attributes[:'rating_name8']
245
+ end
246
+
247
+ if attributes.has_key?(:'rating_name9')
248
+ self.rating_name9 = attributes[:'rating_name9']
249
+ end
250
+
251
+ if attributes.has_key?(:'rating_score1')
252
+ self.rating_score1 = attributes[:'rating_score1']
253
+ end
254
+
255
+ if attributes.has_key?(:'rating_score10')
256
+ self.rating_score10 = attributes[:'rating_score10']
257
+ end
258
+
259
+ if attributes.has_key?(:'rating_score2')
260
+ self.rating_score2 = attributes[:'rating_score2']
261
+ end
262
+
263
+ if attributes.has_key?(:'rating_score3')
264
+ self.rating_score3 = attributes[:'rating_score3']
265
+ end
266
+
267
+ if attributes.has_key?(:'rating_score4')
268
+ self.rating_score4 = attributes[:'rating_score4']
269
+ end
270
+
271
+ if attributes.has_key?(:'rating_score5')
272
+ self.rating_score5 = attributes[:'rating_score5']
273
+ end
274
+
275
+ if attributes.has_key?(:'rating_score6')
276
+ self.rating_score6 = attributes[:'rating_score6']
277
+ end
278
+
279
+ if attributes.has_key?(:'rating_score7')
280
+ self.rating_score7 = attributes[:'rating_score7']
281
+ end
282
+
283
+ if attributes.has_key?(:'rating_score8')
284
+ self.rating_score8 = attributes[:'rating_score8']
285
+ end
286
+
287
+ if attributes.has_key?(:'rating_score9')
288
+ self.rating_score9 = attributes[:'rating_score9']
289
+ end
290
+
291
+ if attributes.has_key?(:'recommend_store_to_friend')
292
+ self.recommend_store_to_friend = attributes[:'recommend_store_to_friend']
293
+ end
294
+
295
+ if attributes.has_key?(:'recommend_to_friend')
296
+ self.recommend_to_friend = attributes[:'recommend_to_friend']
297
+ end
298
+
299
+ if attributes.has_key?(:'review')
300
+ self.review = attributes[:'review']
301
+ end
302
+
303
+ if attributes.has_key?(:'review_oid')
304
+ self.review_oid = attributes[:'review_oid']
305
+ end
306
+
307
+ if attributes.has_key?(:'reviewed_nickname')
308
+ self.reviewed_nickname = attributes[:'reviewed_nickname']
309
+ end
310
+
311
+ if attributes.has_key?(:'reviewer_email')
312
+ self.reviewer_email = attributes[:'reviewer_email']
313
+ end
314
+
315
+ if attributes.has_key?(:'reviewer_location')
316
+ self.reviewer_location = attributes[:'reviewer_location']
317
+ end
318
+
319
+ if attributes.has_key?(:'status')
320
+ self.status = attributes[:'status']
321
+ end
322
+
323
+ if attributes.has_key?(:'store_feedback')
324
+ self.store_feedback = attributes[:'store_feedback']
325
+ end
326
+
327
+ if attributes.has_key?(:'submitted_dts')
328
+ self.submitted_dts = attributes[:'submitted_dts']
329
+ end
330
+
331
+ if attributes.has_key?(:'title')
332
+ self.title = attributes[:'title']
333
+ end
334
+ end
335
+
336
+ # Show invalid properties with the reasons. Usually used together with valid?
337
+ # @return Array for valid properties with the reasons
338
+ def list_invalid_properties
339
+ invalid_properties = Array.new
340
+ invalid_properties
341
+ end
342
+
343
+ # Check to see if the all the properties in the model are valid
344
+ # @return true if the model is valid
345
+ def valid?
346
+ true
347
+ end
348
+
349
+ # Checks equality by comparing each attribute.
350
+ # @param [Object] Object to be compared
351
+ def ==(o)
352
+ return true if self.equal?(o)
353
+ self.class == o.class &&
354
+ customer_profile_oid == o.customer_profile_oid &&
355
+ featured == o.featured &&
356
+ helperful_no_votes == o.helperful_no_votes &&
357
+ helpful_yes_votes == o.helpful_yes_votes &&
358
+ order_id == o.order_id &&
359
+ overall == o.overall &&
360
+ rating_name1 == o.rating_name1 &&
361
+ rating_name10 == o.rating_name10 &&
362
+ rating_name2 == o.rating_name2 &&
363
+ rating_name3 == o.rating_name3 &&
364
+ rating_name4 == o.rating_name4 &&
365
+ rating_name5 == o.rating_name5 &&
366
+ rating_name6 == o.rating_name6 &&
367
+ rating_name7 == o.rating_name7 &&
368
+ rating_name8 == o.rating_name8 &&
369
+ rating_name9 == o.rating_name9 &&
370
+ rating_score1 == o.rating_score1 &&
371
+ rating_score10 == o.rating_score10 &&
372
+ rating_score2 == o.rating_score2 &&
373
+ rating_score3 == o.rating_score3 &&
374
+ rating_score4 == o.rating_score4 &&
375
+ rating_score5 == o.rating_score5 &&
376
+ rating_score6 == o.rating_score6 &&
377
+ rating_score7 == o.rating_score7 &&
378
+ rating_score8 == o.rating_score8 &&
379
+ rating_score9 == o.rating_score9 &&
380
+ recommend_store_to_friend == o.recommend_store_to_friend &&
381
+ recommend_to_friend == o.recommend_to_friend &&
382
+ review == o.review &&
383
+ review_oid == o.review_oid &&
384
+ reviewed_nickname == o.reviewed_nickname &&
385
+ reviewer_email == o.reviewer_email &&
386
+ reviewer_location == o.reviewer_location &&
387
+ status == o.status &&
388
+ store_feedback == o.store_feedback &&
389
+ submitted_dts == o.submitted_dts &&
390
+ title == o.title
391
+ end
392
+
393
+ # @see the `==` method
394
+ # @param [Object] Object to be compared
395
+ def eql?(o)
396
+ self == o
397
+ end
398
+
399
+ # Calculates hash code according to all attributes.
400
+ # @return [Fixnum] Hash code
401
+ def hash
402
+ [customer_profile_oid, featured, helperful_no_votes, helpful_yes_votes, order_id, overall, rating_name1, rating_name10, rating_name2, rating_name3, rating_name4, rating_name5, rating_name6, rating_name7, rating_name8, rating_name9, rating_score1, rating_score10, rating_score2, rating_score3, rating_score4, rating_score5, rating_score6, rating_score7, rating_score8, rating_score9, recommend_store_to_friend, recommend_to_friend, review, review_oid, reviewed_nickname, reviewer_email, reviewer_location, status, store_feedback, submitted_dts, title].hash
403
+ end
404
+
405
+ # Builds the object from hash
406
+ # @param [Hash] attributes Model attributes in the form of hash
407
+ # @return [Object] Returns the model itself
408
+ def build_from_hash(attributes)
409
+ return nil unless attributes.is_a?(Hash)
410
+ self.class.swagger_types.each_pair do |key, type|
411
+ if type =~ /\AArray<(.*)>/i
412
+ # check to ensure the input is an array given that the attribute
413
+ # is documented as an array but the input is not
414
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
415
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
416
+ end
417
+ elsif !attributes[self.class.attribute_map[key]].nil?
418
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
419
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
420
+ end
421
+
422
+ self
423
+ end
424
+
425
+ # Deserializes the data based on type
426
+ # @param string type Data type
427
+ # @param string value Value to be deserialized
428
+ # @return [Object] Deserialized data
429
+ def _deserialize(type, value)
430
+ case type.to_sym
431
+ when :DateTime
432
+ DateTime.parse(value)
433
+ when :Date
434
+ Date.parse(value)
435
+ when :String
436
+ value.to_s
437
+ when :Integer
438
+ value.to_i
439
+ when :Float
440
+ value.to_f
441
+ when :BOOLEAN
442
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
443
+ true
444
+ else
445
+ false
446
+ end
447
+ when :Object
448
+ # generic object (usually a Hash), return directly
449
+ value
450
+ when /\AArray<(?<inner_type>.+)>\z/
451
+ inner_type = Regexp.last_match[:inner_type]
452
+ value.map { |v| _deserialize(inner_type, v) }
453
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
454
+ k_type = Regexp.last_match[:k_type]
455
+ v_type = Regexp.last_match[:v_type]
456
+ {}.tap do |hash|
457
+ value.each do |k, v|
458
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
459
+ end
460
+ end
461
+ else # model
462
+ temp_model = UltracartClient.const_get(type).new
463
+ temp_model.build_from_hash(value)
464
+ end
465
+ end
466
+
467
+ # Returns the string representation of the object
468
+ # @return [String] String presentation of the object
469
+ def to_s
470
+ to_hash.to_s
471
+ end
472
+
473
+ # to_body is an alias to to_hash (backward compatibility)
474
+ # @return [Hash] Returns the object in the form of hash
475
+ def to_body
476
+ to_hash
477
+ end
478
+
479
+ # Returns the object in the form of hash
480
+ # @return [Hash] Returns the object in the form of hash
481
+ def to_hash
482
+ hash = {}
483
+ self.class.attribute_map.each_pair do |attr, param|
484
+ value = self.send(attr)
485
+ next if value.nil?
486
+ hash[param] = _to_hash(value)
487
+ end
488
+ hash
489
+ end
490
+
491
+ # Outputs non-array value in the form of hash
492
+ # For object, use to_hash. Otherwise, just return the value
493
+ # @param [Object] value Any valid value
494
+ # @return [Hash] Returns the value in the form of hash
495
+ def _to_hash(value)
496
+ if value.is_a?(Array)
497
+ value.compact.map { |v| _to_hash(v) }
498
+ elsif value.is_a?(Hash)
499
+ {}.tap do |hash|
500
+ value.each { |k, v| hash[k] = _to_hash(v) }
501
+ end
502
+ elsif value.respond_to? :to_hash
503
+ value.to_hash
504
+ else
505
+ value
506
+ end
507
+ end
508
+
509
+ end
510
+ end
@@ -20,6 +20,8 @@ module UltracartClient
20
20
  # True if the item has a review
21
21
  attr_accessor :has_review
22
22
 
23
+ attr_accessor :individual_reviews
24
+
23
25
  # Number of approved reviews
24
26
  attr_accessor :review_count
25
27
 
@@ -46,6 +48,7 @@ module UltracartClient
46
48
  {
47
49
  :'has_approved_review' => :'has_approved_review',
48
50
  :'has_review' => :'has_review',
51
+ :'individual_reviews' => :'individual_reviews',
49
52
  :'review_count' => :'review_count',
50
53
  :'review_overall' => :'review_overall',
51
54
  :'review_template_name' => :'review_template_name',
@@ -61,6 +64,7 @@ module UltracartClient
61
64
  {
62
65
  :'has_approved_review' => :'BOOLEAN',
63
66
  :'has_review' => :'BOOLEAN',
67
+ :'individual_reviews' => :'Array<ItemReview>',
64
68
  :'review_count' => :'Integer',
65
69
  :'review_overall' => :'Float',
66
70
  :'review_template_name' => :'String',
@@ -87,6 +91,12 @@ module UltracartClient
87
91
  self.has_review = attributes[:'has_review']
88
92
  end
89
93
 
94
+ if attributes.has_key?(:'individual_reviews')
95
+ if (value = attributes[:'individual_reviews']).is_a?(Array)
96
+ self.individual_reviews = value
97
+ end
98
+ end
99
+
90
100
  if attributes.has_key?(:'review_count')
91
101
  self.review_count = attributes[:'review_count']
92
102
  end
@@ -136,6 +146,7 @@ module UltracartClient
136
146
  self.class == o.class &&
137
147
  has_approved_review == o.has_approved_review &&
138
148
  has_review == o.has_review &&
149
+ individual_reviews == o.individual_reviews &&
139
150
  review_count == o.review_count &&
140
151
  review_overall == o.review_overall &&
141
152
  review_template_name == o.review_template_name &&
@@ -154,7 +165,7 @@ module UltracartClient
154
165
  # Calculates hash code according to all attributes.
155
166
  # @return [Fixnum] Hash code
156
167
  def hash
157
- [has_approved_review, has_review, review_count, review_overall, review_template_name, review_template_oid, reviewable, share_reviews_with_merchant_item_id, share_reviews_with_merchant_item_oid].hash
168
+ [has_approved_review, has_review, individual_reviews, review_count, review_overall, review_template_name, review_template_oid, reviewable, share_reviews_with_merchant_item_id, share_reviews_with_merchant_item_oid].hash
158
169
  end
159
170
 
160
171
  # Builds the object from hash
@@ -23,6 +23,12 @@ module UltracartClient
23
23
  # CC emails. Multiple allowed, but total length of all emails can not exceed 100 characters.
24
24
  attr_accessor :cc_emails
25
25
 
26
+ # Cell phone
27
+ attr_accessor :cell_phone
28
+
29
+ # Cell phone (E164 format)
30
+ attr_accessor :cell_phone_e164
31
+
26
32
  # City
27
33
  attr_accessor :city
28
34
 
@@ -68,6 +74,8 @@ module UltracartClient
68
74
  :'address1' => :'address1',
69
75
  :'address2' => :'address2',
70
76
  :'cc_emails' => :'cc_emails',
77
+ :'cell_phone' => :'cell_phone',
78
+ :'cell_phone_e164' => :'cell_phone_e164',
71
79
  :'city' => :'city',
72
80
  :'company' => :'company',
73
81
  :'country_code' => :'country_code',
@@ -90,6 +98,8 @@ module UltracartClient
90
98
  :'address1' => :'String',
91
99
  :'address2' => :'String',
92
100
  :'cc_emails' => :'Array<String>',
101
+ :'cell_phone' => :'String',
102
+ :'cell_phone_e164' => :'String',
93
103
  :'city' => :'String',
94
104
  :'company' => :'String',
95
105
  :'country_code' => :'String',
@@ -128,6 +138,14 @@ module UltracartClient
128
138
  end
129
139
  end
130
140
 
141
+ if attributes.has_key?(:'cell_phone')
142
+ self.cell_phone = attributes[:'cell_phone']
143
+ end
144
+
145
+ if attributes.has_key?(:'cell_phone_e164')
146
+ self.cell_phone_e164 = attributes[:'cell_phone_e164']
147
+ end
148
+
131
149
  if attributes.has_key?(:'city')
132
150
  self.city = attributes[:'city']
133
151
  end
@@ -193,6 +211,14 @@ module UltracartClient
193
211
  invalid_properties.push('invalid value for "address2", the character length must be smaller than or equal to 50.')
194
212
  end
195
213
 
214
+ if !@cell_phone.nil? && @cell_phone.to_s.length > 25
215
+ invalid_properties.push('invalid value for "cell_phone", the character length must be smaller than or equal to 25.')
216
+ end
217
+
218
+ if !@cell_phone_e164.nil? && @cell_phone_e164.to_s.length > 25
219
+ invalid_properties.push('invalid value for "cell_phone_e164", the character length must be smaller than or equal to 25.')
220
+ end
221
+
196
222
  if !@city.nil? && @city.to_s.length > 32
197
223
  invalid_properties.push('invalid value for "city", the character length must be smaller than or equal to 32.')
198
224
  end
@@ -253,6 +279,8 @@ module UltracartClient
253
279
  def valid?
254
280
  return false if !@address1.nil? && @address1.to_s.length > 50
255
281
  return false if !@address2.nil? && @address2.to_s.length > 50
282
+ return false if !@cell_phone.nil? && @cell_phone.to_s.length > 25
283
+ return false if !@cell_phone_e164.nil? && @cell_phone_e164.to_s.length > 25
256
284
  return false if !@city.nil? && @city.to_s.length > 32
257
285
  return false if !@company.nil? && @company.to_s.length > 50
258
286
  return false if !@country_code.nil? && @country_code.to_s.length > 2
@@ -289,6 +317,26 @@ module UltracartClient
289
317
  @address2 = address2
290
318
  end
291
319
 
320
+ # Custom attribute writer method with validation
321
+ # @param [Object] cell_phone Value to be assigned
322
+ def cell_phone=(cell_phone)
323
+ if !cell_phone.nil? && cell_phone.to_s.length > 25
324
+ fail ArgumentError, 'invalid value for "cell_phone", the character length must be smaller than or equal to 25.'
325
+ end
326
+
327
+ @cell_phone = cell_phone
328
+ end
329
+
330
+ # Custom attribute writer method with validation
331
+ # @param [Object] cell_phone_e164 Value to be assigned
332
+ def cell_phone_e164=(cell_phone_e164)
333
+ if !cell_phone_e164.nil? && cell_phone_e164.to_s.length > 25
334
+ fail ArgumentError, 'invalid value for "cell_phone_e164", the character length must be smaller than or equal to 25.'
335
+ end
336
+
337
+ @cell_phone_e164 = cell_phone_e164
338
+ end
339
+
292
340
  # Custom attribute writer method with validation
293
341
  # @param [Object] city Value to be assigned
294
342
  def city=(city)
@@ -427,6 +475,8 @@ module UltracartClient
427
475
  address1 == o.address1 &&
428
476
  address2 == o.address2 &&
429
477
  cc_emails == o.cc_emails &&
478
+ cell_phone == o.cell_phone &&
479
+ cell_phone_e164 == o.cell_phone_e164 &&
430
480
  city == o.city &&
431
481
  company == o.company &&
432
482
  country_code == o.country_code &&
@@ -451,7 +501,7 @@ module UltracartClient
451
501
  # Calculates hash code according to all attributes.
452
502
  # @return [Fixnum] Hash code
453
503
  def hash
454
- [address1, address2, cc_emails, city, company, country_code, day_phone, day_phone_e164, email, evening_phone, evening_phone_e164, first_name, last_name, postal_code, state_region, title].hash
504
+ [address1, address2, cc_emails, cell_phone, cell_phone_e164, city, company, country_code, day_phone, day_phone_e164, email, evening_phone, evening_phone_e164, first_name, last_name, postal_code, state_region, title].hash
455
505
  end
456
506
 
457
507
  # Builds the object from hash