Class: UltracartClient::CustomerQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/models/customer_query.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CustomerQuery

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
# File 'lib/ultracart_api/models/customer_query.rb', line 193

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#all_tagsObject

All tags the customer must have



19
20
21
# File 'lib/ultracart_api/models/customer_query.rb', line 19

def all_tags
  @all_tags
end

#any_tagsObject

Any of these tags the customer must have



22
23
24
# File 'lib/ultracart_api/models/customer_query.rb', line 22

def any_tags
  @any_tags
end

#billing_cityObject

Billing city



25
26
27
# File 'lib/ultracart_api/models/customer_query.rb', line 25

def billing_city
  @billing_city
end

#billing_companyObject

Billing company



28
29
30
# File 'lib/ultracart_api/models/customer_query.rb', line 28

def billing_company
  @billing_company
end

#billing_country_codeObject

Billing country code



31
32
33
# File 'lib/ultracart_api/models/customer_query.rb', line 31

def billing_country_code
  @billing_country_code
end

#billing_day_phoneObject

Billing day phone



34
35
36
# File 'lib/ultracart_api/models/customer_query.rb', line 34

def billing_day_phone
  @billing_day_phone
end

#billing_evening_phoneObject

Billing evening phone



37
38
39
# File 'lib/ultracart_api/models/customer_query.rb', line 37

def billing_evening_phone
  @billing_evening_phone
end

#billing_first_nameObject

Billing first name



40
41
42
# File 'lib/ultracart_api/models/customer_query.rb', line 40

def billing_first_name
  @billing_first_name
end

#billing_last_nameObject

Billing last name



43
44
45
# File 'lib/ultracart_api/models/customer_query.rb', line 43

def billing_last_name
  @billing_last_name
end

#billing_postal_codeObject

Billing postal code



46
47
48
# File 'lib/ultracart_api/models/customer_query.rb', line 46

def billing_postal_code
  @billing_postal_code
end

#billing_stateObject

Billing state



49
50
51
# File 'lib/ultracart_api/models/customer_query.rb', line 49

def billing_state
  @billing_state
end

#emailObject

Email address of this customer profile



52
53
54
# File 'lib/ultracart_api/models/customer_query.rb', line 52

def email
  @email
end

#emailsObject

Emails allows for searching on multiple email addresses and work with our without the single email variable. You may specify a single email address here or use the email property.



55
56
57
# File 'lib/ultracart_api/models/customer_query.rb', line 55

def emails
  @emails
end

#last_modified_dts_endObject

Last modified date end



58
59
60
# File 'lib/ultracart_api/models/customer_query.rb', line 58

def last_modified_dts_end
  @last_modified_dts_end
end

#last_modified_dts_startObject

Last modified date start



61
62
63
# File 'lib/ultracart_api/models/customer_query.rb', line 61

def last_modified_dts_start
  @last_modified_dts_start
end

#pricing_tier_nameObject

Pricing tier name



64
65
66
# File 'lib/ultracart_api/models/customer_query.rb', line 64

def pricing_tier_name
  @pricing_tier_name
end

#pricing_tier_oidObject

Pricing tier oid



67
68
69
# File 'lib/ultracart_api/models/customer_query.rb', line 67

def pricing_tier_oid
  @pricing_tier_oid
end

#qb_classObject

QuickBooks class to import this customer as



70
71
72
# File 'lib/ultracart_api/models/customer_query.rb', line 70

def qb_class
  @qb_class
end

#quickbooks_codeObject

QuickBooks name to import this customer as



73
74
75
# File 'lib/ultracart_api/models/customer_query.rb', line 73

def quickbooks_code
  @quickbooks_code
end

#shipping_cityObject

Billing city



76
77
78
# File 'lib/ultracart_api/models/customer_query.rb', line 76

def shipping_city
  @shipping_city
end

#shipping_companyObject

Billing company



79
80
81
# File 'lib/ultracart_api/models/customer_query.rb', line 79

def shipping_company
  @shipping_company
end

#shipping_country_codeObject

Billing country code



82
83
84
# File 'lib/ultracart_api/models/customer_query.rb', line 82

def shipping_country_code
  @shipping_country_code
end

#shipping_day_phoneObject

Billing day phone



85
86
87
# File 'lib/ultracart_api/models/customer_query.rb', line 85

def shipping_day_phone
  @shipping_day_phone
end

#shipping_evening_phoneObject

Billing evening phone



88
89
90
# File 'lib/ultracart_api/models/customer_query.rb', line 88

def shipping_evening_phone
  @shipping_evening_phone
end

#shipping_first_nameObject

Billing first name



91
92
93
# File 'lib/ultracart_api/models/customer_query.rb', line 91

def shipping_first_name
  @shipping_first_name
end

#shipping_last_nameObject

Billing last name



94
95
96
# File 'lib/ultracart_api/models/customer_query.rb', line 94

def shipping_last_name
  @shipping_last_name
end

#shipping_postal_codeObject

Billing postal code



97
98
99
# File 'lib/ultracart_api/models/customer_query.rb', line 97

def shipping_postal_code
  @shipping_postal_code
end

#shipping_stateObject

Billing state



100
101
102
# File 'lib/ultracart_api/models/customer_query.rb', line 100

def shipping_state
  @shipping_state
end

#signup_dts_endObject

Signup date end



103
104
105
# File 'lib/ultracart_api/models/customer_query.rb', line 103

def 
  @signup_dts_end
end

#signup_dts_startObject

Signup date start



106
107
108
# File 'lib/ultracart_api/models/customer_query.rb', line 106

def 
  @signup_dts_start
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



145
146
147
# File 'lib/ultracart_api/models/customer_query.rb', line 145

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/ultracart_api/models/customer_query.rb', line 109

def self.attribute_map
  {
    :'all_tags' => :'all_tags',
    :'any_tags' => :'any_tags',
    :'billing_city' => :'billing_city',
    :'billing_company' => :'billing_company',
    :'billing_country_code' => :'billing_country_code',
    :'billing_day_phone' => :'billing_day_phone',
    :'billing_evening_phone' => :'billing_evening_phone',
    :'billing_first_name' => :'billing_first_name',
    :'billing_last_name' => :'billing_last_name',
    :'billing_postal_code' => :'billing_postal_code',
    :'billing_state' => :'billing_state',
    :'email' => :'email',
    :'emails' => :'emails',
    :'last_modified_dts_end' => :'last_modified_dts_end',
    :'last_modified_dts_start' => :'last_modified_dts_start',
    :'pricing_tier_name' => :'pricing_tier_name',
    :'pricing_tier_oid' => :'pricing_tier_oid',
    :'qb_class' => :'qb_class',
    :'quickbooks_code' => :'quickbooks_code',
    :'shipping_city' => :'shipping_city',
    :'shipping_company' => :'shipping_company',
    :'shipping_country_code' => :'shipping_country_code',
    :'shipping_day_phone' => :'shipping_day_phone',
    :'shipping_evening_phone' => :'shipping_evening_phone',
    :'shipping_first_name' => :'shipping_first_name',
    :'shipping_last_name' => :'shipping_last_name',
    :'shipping_postal_code' => :'shipping_postal_code',
    :'shipping_state' => :'shipping_state',
    :'signup_dts_end' => :'signup_dts_end',
    :'signup_dts_start' => :'signup_dts_start'
  }
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



683
684
685
# File 'lib/ultracart_api/models/customer_query.rb', line 683

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

.openapi_nullableObject

List of attributes with nullable: true



186
187
188
189
# File 'lib/ultracart_api/models/customer_query.rb', line 186

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

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/ultracart_api/models/customer_query.rb', line 150

def self.openapi_types
  {
    :'all_tags' => :'Array<String>',
    :'any_tags' => :'Array<String>',
    :'billing_city' => :'String',
    :'billing_company' => :'String',
    :'billing_country_code' => :'String',
    :'billing_day_phone' => :'String',
    :'billing_evening_phone' => :'String',
    :'billing_first_name' => :'String',
    :'billing_last_name' => :'String',
    :'billing_postal_code' => :'String',
    :'billing_state' => :'String',
    :'email' => :'String',
    :'emails' => :'Array<String>',
    :'last_modified_dts_end' => :'String',
    :'last_modified_dts_start' => :'String',
    :'pricing_tier_name' => :'String',
    :'pricing_tier_oid' => :'Integer',
    :'qb_class' => :'String',
    :'quickbooks_code' => :'String',
    :'shipping_city' => :'String',
    :'shipping_company' => :'String',
    :'shipping_country_code' => :'String',
    :'shipping_day_phone' => :'String',
    :'shipping_evening_phone' => :'String',
    :'shipping_first_name' => :'String',
    :'shipping_last_name' => :'String',
    :'shipping_postal_code' => :'String',
    :'shipping_state' => :'String',
    :'signup_dts_end' => :'String',
    :'signup_dts_start' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
659
660
661
662
663
664
665
666
# File 'lib/ultracart_api/models/customer_query.rb', line 633

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      all_tags == o.all_tags &&
      any_tags == o.any_tags &&
      billing_city == o.billing_city &&
      billing_company == o.billing_company &&
      billing_country_code == o.billing_country_code &&
      billing_day_phone == o.billing_day_phone &&
      billing_evening_phone == o.billing_evening_phone &&
      billing_first_name == o.billing_first_name &&
      billing_last_name == o.billing_last_name &&
      billing_postal_code == o.billing_postal_code &&
      billing_state == o.billing_state &&
      email == o.email &&
      emails == o.emails &&
      last_modified_dts_end == o.last_modified_dts_end &&
      last_modified_dts_start == o.last_modified_dts_start &&
      pricing_tier_name == o.pricing_tier_name &&
      pricing_tier_oid == o.pricing_tier_oid &&
      qb_class == o.qb_class &&
      quickbooks_code == o.quickbooks_code &&
      shipping_city == o.shipping_city &&
      shipping_company == o.shipping_company &&
      shipping_country_code == o.shipping_country_code &&
      shipping_day_phone == o.shipping_day_phone &&
      shipping_evening_phone == o.shipping_evening_phone &&
      shipping_first_name == o.shipping_first_name &&
      shipping_last_name == o.shipping_last_name &&
      shipping_postal_code == o.shipping_postal_code &&
      shipping_state == o.shipping_state &&
       == o. &&
       == o.
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



714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
# File 'lib/ultracart_api/models/customer_query.rb', line 714

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 = UltracartClient.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



785
786
787
788
789
790
791
792
793
794
795
796
797
# File 'lib/ultracart_api/models/customer_query.rb', line 785

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



690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
# File 'lib/ultracart_api/models/customer_query.rb', line 690

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  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


670
671
672
# File 'lib/ultracart_api/models/customer_query.rb', line 670

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



676
677
678
# File 'lib/ultracart_api/models/customer_query.rb', line 676

def hash
  [all_tags, any_tags, billing_city, billing_company, billing_country_code, billing_day_phone, billing_evening_phone, billing_first_name, billing_last_name, billing_postal_code, billing_state, email, emails, last_modified_dts_end, last_modified_dts_start, pricing_tier_name, pricing_tier_oid, qb_class, quickbooks_code, shipping_city, shipping_company, shipping_country_code, shipping_day_phone, shipping_evening_phone, shipping_first_name, shipping_last_name, shipping_postal_code, shipping_state, , ].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/ultracart_api/models/customer_query.rb', line 335

def list_invalid_properties
  invalid_properties = Array.new
  if !@billing_city.nil? && @billing_city.to_s.length > 32
    invalid_properties.push('invalid value for "billing_city", the character length must be smaller than or equal to 32.')
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



761
762
763
# File 'lib/ultracart_api/models/customer_query.rb', line 761

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



767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'lib/ultracart_api/models/customer_query.rb', line 767

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



755
756
757
# File 'lib/ultracart_api/models/customer_query.rb', line 755

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



418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/ultracart_api/models/customer_query.rb', line 418

def valid?
  return false if !@billing_city.nil? && @billing_city.to_s.length > 32
  return false if !@billing_company.nil? && @billing_company.to_s.length > 50
  return false if !@billing_country_code.nil? && @billing_country_code.to_s.length > 2
  return false if !@billing_day_phone.nil? && @billing_day_phone.to_s.length > 25
  return false if !@billing_evening_phone.nil? && @billing_evening_phone.to_s.length > 25
  return false if !@billing_first_name.nil? && @billing_first_name.to_s.length > 30
  return false if !@billing_last_name.nil? && @billing_last_name.to_s.length > 30
  return false if !@billing_postal_code.nil? && @billing_postal_code.to_s.length > 20
  return false if !@billing_state.nil? && @billing_state.to_s.length > 32
  return false if !@pricing_tier_name.nil? && @pricing_tier_name.to_s.length > 50
  return false if !@shipping_city.nil? && @shipping_city.to_s.length > 32
  return false if !@shipping_company.nil? && @shipping_company.to_s.length > 50
  return false if !@shipping_country_code.nil? && @shipping_country_code.to_s.length > 2
  return false if !@shipping_day_phone.nil? && @shipping_day_phone.to_s.length > 25
  return false if !@shipping_evening_phone.nil? && @shipping_evening_phone.to_s.length > 25
  return false if !@shipping_first_name.nil? && @shipping_first_name.to_s.length > 30
  return false if !@shipping_last_name.nil? && @shipping_last_name.to_s.length > 30
  return false if !@shipping_postal_code.nil? && @shipping_postal_code.to_s.length > 20
  return false if !@shipping_state.nil? && @shipping_state.to_s.length > 32
  true
end