Class: UltracartClient::OrderQuery

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

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ OrderQuery

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'cc_email')
    self.cc_email = attributes[:'cc_email']
  end

  if attributes.has_key?(:'channel_partner_code')
    self.channel_partner_code = attributes[:'channel_partner_code']
  end

  if attributes.has_key?(:'channel_partner_order_id')
    self.channel_partner_order_id = attributes[:'channel_partner_order_id']
  end

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

  if attributes.has_key?(:'company')
    self.company = attributes[:'company']
  end

  if attributes.has_key?(:'country_code')
    self.country_code = attributes[:'country_code']
  end

  if attributes.has_key?(:'creation_date_begin')
    self.creation_date_begin = attributes[:'creation_date_begin']
  end

  if attributes.has_key?(:'creation_date_end')
    self.creation_date_end = attributes[:'creation_date_end']
  end

  if attributes.has_key?(:'current_stage')
    self.current_stage = attributes[:'current_stage']
  end

  if attributes.has_key?(:'custom_field_1')
    self.custom_field_1 = attributes[:'custom_field_1']
  end

  if attributes.has_key?(:'custom_field_2')
    self.custom_field_2 = attributes[:'custom_field_2']
  end

  if attributes.has_key?(:'custom_field_3')
    self.custom_field_3 = attributes[:'custom_field_3']
  end

  if attributes.has_key?(:'custom_field_4')
    self.custom_field_4 = attributes[:'custom_field_4']
  end

  if attributes.has_key?(:'custom_field_5')
    self.custom_field_5 = attributes[:'custom_field_5']
  end

  if attributes.has_key?(:'custom_field_6')
    self.custom_field_6 = attributes[:'custom_field_6']
  end

  if attributes.has_key?(:'custom_field_7')
    self.custom_field_7 = attributes[:'custom_field_7']
  end

  if attributes.has_key?(:'customer_profile_oid')
    self.customer_profile_oid = attributes[:'customer_profile_oid']
  end

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

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

  if attributes.has_key?(:'item_id')
    self.item_id = attributes[:'item_id']
  end

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

  if attributes.has_key?(:'order_id')
    self.order_id = attributes[:'order_id']
  end

  if attributes.has_key?(:'payment_date_begin')
    self.payment_date_begin = attributes[:'payment_date_begin']
  end

  if attributes.has_key?(:'payment_date_end')
    self.payment_date_end = attributes[:'payment_date_end']
  end

  if attributes.has_key?(:'payment_method')
    self.payment_method = attributes[:'payment_method']
  end

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

  if attributes.has_key?(:'postal_code')
    self.postal_code = attributes[:'postal_code']
  end

  if attributes.has_key?(:'purchase_order_number')
    self.purchase_order_number = attributes[:'purchase_order_number']
  end

  if attributes.has_key?(:'refund_date_begin')
    self.refund_date_begin = attributes[:'refund_date_begin']
  end

  if attributes.has_key?(:'refund_date_end')
    self.refund_date_end = attributes[:'refund_date_end']
  end

  if attributes.has_key?(:'rma')
    self.rma = attributes[:'rma']
  end

  if attributes.has_key?(:'screen_branding_theme_code')
    self.screen_branding_theme_code = attributes[:'screen_branding_theme_code']
  end

  if attributes.has_key?(:'shipment_date_begin')
    self.shipment_date_begin = attributes[:'shipment_date_begin']
  end

  if attributes.has_key?(:'shipment_date_end')
    self.shipment_date_end = attributes[:'shipment_date_end']
  end

  if attributes.has_key?(:'shipped_on_date_begin')
    self.shipped_on_date_begin = attributes[:'shipped_on_date_begin']
  end

  if attributes.has_key?(:'shipped_on_date_end')
    self.shipped_on_date_end = attributes[:'shipped_on_date_end']
  end

  if attributes.has_key?(:'state_region')
    self.state_region = attributes[:'state_region']
  end

  if attributes.has_key?(:'storefront_host_name')
    self.storefront_host_name = attributes[:'storefront_host_name']
  end

  if attributes.has_key?(:'total')
    self.total = attributes[:'total']
  end
end

Instance Attribute Details

#cc_emailObject

CC Email



18
19
20
# File 'lib/ultracart_api/models/order_query.rb', line 18

def cc_email
  @cc_email
end

#channel_partner_codeObject

The code of the channel partner



21
22
23
# File 'lib/ultracart_api/models/order_query.rb', line 21

def channel_partner_code
  @channel_partner_code
end

#channel_partner_order_idObject

The order ID assigned by the channel partner for this order



24
25
26
# File 'lib/ultracart_api/models/order_query.rb', line 24

def channel_partner_order_id
  @channel_partner_order_id
end

#cityObject

City



27
28
29
# File 'lib/ultracart_api/models/order_query.rb', line 27

def city
  @city
end

#companyObject

Company



30
31
32
# File 'lib/ultracart_api/models/order_query.rb', line 30

def company
  @company
end

#country_codeObject

ISO-3166 two letter country code



33
34
35
# File 'lib/ultracart_api/models/order_query.rb', line 33

def country_code
  @country_code
end

#creation_date_beginObject

Date/time that the order was created



36
37
38
# File 'lib/ultracart_api/models/order_query.rb', line 36

def creation_date_begin
  @creation_date_begin
end

#creation_date_endObject

Date/time that the order was created



39
40
41
# File 'lib/ultracart_api/models/order_query.rb', line 39

def creation_date_end
  @creation_date_end
end

#current_stageObject

Current stage that the order is in.



42
43
44
# File 'lib/ultracart_api/models/order_query.rb', line 42

def current_stage
  @current_stage
end

#custom_field_1Object

Custom field 1



45
46
47
# File 'lib/ultracart_api/models/order_query.rb', line 45

def custom_field_1
  @custom_field_1
end

#custom_field_2Object

Custom field 2



48
49
50
# File 'lib/ultracart_api/models/order_query.rb', line 48

def custom_field_2
  @custom_field_2
end

#custom_field_3Object

Custom field 3



51
52
53
# File 'lib/ultracart_api/models/order_query.rb', line 51

def custom_field_3
  @custom_field_3
end

#custom_field_4Object

Custom field 4



54
55
56
# File 'lib/ultracart_api/models/order_query.rb', line 54

def custom_field_4
  @custom_field_4
end

#custom_field_5Object

Custom field 5



57
58
59
# File 'lib/ultracart_api/models/order_query.rb', line 57

def custom_field_5
  @custom_field_5
end

#custom_field_6Object

Custom field 6



60
61
62
# File 'lib/ultracart_api/models/order_query.rb', line 60

def custom_field_6
  @custom_field_6
end

#custom_field_7Object

Custom field 7



63
64
65
# File 'lib/ultracart_api/models/order_query.rb', line 63

def custom_field_7
  @custom_field_7
end

#customer_profile_oidObject

The customer profile to find associated orders for



66
67
68
# File 'lib/ultracart_api/models/order_query.rb', line 66

def customer_profile_oid
  @customer_profile_oid
end

#emailObject

Email



69
70
71
# File 'lib/ultracart_api/models/order_query.rb', line 69

def email
  @email
end

#first_nameObject

First name



72
73
74
# File 'lib/ultracart_api/models/order_query.rb', line 72

def first_name
  @first_name
end

#item_idObject

Item ID



75
76
77
# File 'lib/ultracart_api/models/order_query.rb', line 75

def item_id
  @item_id
end

#last_nameObject

Last name



78
79
80
# File 'lib/ultracart_api/models/order_query.rb', line 78

def last_name
  @last_name
end

#order_idObject

Order ID



81
82
83
# File 'lib/ultracart_api/models/order_query.rb', line 81

def order_id
  @order_id
end

#payment_date_beginObject

Date/time that the order was successfully processed



84
85
86
# File 'lib/ultracart_api/models/order_query.rb', line 84

def payment_date_begin
  @payment_date_begin
end

#payment_date_endObject

Date/time that the order was successfully processed



87
88
89
# File 'lib/ultracart_api/models/order_query.rb', line 87

def payment_date_end
  @payment_date_end
end

#payment_methodObject

Payment method



90
91
92
# File 'lib/ultracart_api/models/order_query.rb', line 90

def payment_method
  @payment_method
end

#phoneObject

Phone



93
94
95
# File 'lib/ultracart_api/models/order_query.rb', line 93

def phone
  @phone
end

#postal_codeObject

Postal code



96
97
98
# File 'lib/ultracart_api/models/order_query.rb', line 96

def postal_code
  @postal_code
end

#purchase_order_numberObject

Purchase order number



99
100
101
# File 'lib/ultracart_api/models/order_query.rb', line 99

def purchase_order_number
  @purchase_order_number
end

#refund_date_beginObject

Date/time that the order was refunded



102
103
104
# File 'lib/ultracart_api/models/order_query.rb', line 102

def refund_date_begin
  @refund_date_begin
end

#refund_date_endObject

Date/time that the order was refunded



105
106
107
# File 'lib/ultracart_api/models/order_query.rb', line 105

def refund_date_end
  @refund_date_end
end

#rmaObject

RMA number



108
109
110
# File 'lib/ultracart_api/models/order_query.rb', line 108

def rma
  @rma
end

#screen_branding_theme_codeObject

Screen branding theme code associated with the order (legacy checkout)



111
112
113
# File 'lib/ultracart_api/models/order_query.rb', line 111

def screen_branding_theme_code
  @screen_branding_theme_code
end

#shipment_date_beginObject

Date/time that the order was shipped



114
115
116
# File 'lib/ultracart_api/models/order_query.rb', line 114

def shipment_date_begin
  @shipment_date_begin
end

#shipment_date_endObject

Date/time that the order was shipped



117
118
119
# File 'lib/ultracart_api/models/order_query.rb', line 117

def shipment_date_end
  @shipment_date_end
end

#shipped_on_date_beginObject

Date/time that the order should ship on



120
121
122
# File 'lib/ultracart_api/models/order_query.rb', line 120

def shipped_on_date_begin
  @shipped_on_date_begin
end

#shipped_on_date_endObject

Date/time that the order should ship on



123
124
125
# File 'lib/ultracart_api/models/order_query.rb', line 123

def shipped_on_date_end
  @shipped_on_date_end
end

#state_regionObject

State for United States otherwise region or province for other countries



126
127
128
# File 'lib/ultracart_api/models/order_query.rb', line 126

def state_region
  @state_region
end

#storefront_host_nameObject

StoreFront host name associated with the order



129
130
131
# File 'lib/ultracart_api/models/order_query.rb', line 129

def storefront_host_name
  @storefront_host_name
end

#totalObject

Total



132
133
134
# File 'lib/ultracart_api/models/order_query.rb', line 132

def total
  @total
end

Class Method Details

.attribute_mapObject

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



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/ultracart_api/models/order_query.rb', line 157

def self.attribute_map
  {
    :'cc_email' => :'cc_email',
    :'channel_partner_code' => :'channel_partner_code',
    :'channel_partner_order_id' => :'channel_partner_order_id',
    :'city' => :'city',
    :'company' => :'company',
    :'country_code' => :'country_code',
    :'creation_date_begin' => :'creation_date_begin',
    :'creation_date_end' => :'creation_date_end',
    :'current_stage' => :'current_stage',
    :'custom_field_1' => :'custom_field_1',
    :'custom_field_2' => :'custom_field_2',
    :'custom_field_3' => :'custom_field_3',
    :'custom_field_4' => :'custom_field_4',
    :'custom_field_5' => :'custom_field_5',
    :'custom_field_6' => :'custom_field_6',
    :'custom_field_7' => :'custom_field_7',
    :'customer_profile_oid' => :'customer_profile_oid',
    :'email' => :'email',
    :'first_name' => :'first_name',
    :'item_id' => :'item_id',
    :'last_name' => :'last_name',
    :'order_id' => :'order_id',
    :'payment_date_begin' => :'payment_date_begin',
    :'payment_date_end' => :'payment_date_end',
    :'payment_method' => :'payment_method',
    :'phone' => :'phone',
    :'postal_code' => :'postal_code',
    :'purchase_order_number' => :'purchase_order_number',
    :'refund_date_begin' => :'refund_date_begin',
    :'refund_date_end' => :'refund_date_end',
    :'rma' => :'rma',
    :'screen_branding_theme_code' => :'screen_branding_theme_code',
    :'shipment_date_begin' => :'shipment_date_begin',
    :'shipment_date_end' => :'shipment_date_end',
    :'shipped_on_date_begin' => :'shipped_on_date_begin',
    :'shipped_on_date_end' => :'shipped_on_date_end',
    :'state_region' => :'state_region',
    :'storefront_host_name' => :'storefront_host_name',
    :'total' => :'total'
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    :'cc_email' => :'String',
    :'channel_partner_code' => :'String',
    :'channel_partner_order_id' => :'String',
    :'city' => :'String',
    :'company' => :'String',
    :'country_code' => :'String',
    :'creation_date_begin' => :'String',
    :'creation_date_end' => :'String',
    :'current_stage' => :'String',
    :'custom_field_1' => :'String',
    :'custom_field_2' => :'String',
    :'custom_field_3' => :'String',
    :'custom_field_4' => :'String',
    :'custom_field_5' => :'String',
    :'custom_field_6' => :'String',
    :'custom_field_7' => :'String',
    :'customer_profile_oid' => :'Integer',
    :'email' => :'String',
    :'first_name' => :'String',
    :'item_id' => :'String',
    :'last_name' => :'String',
    :'order_id' => :'String',
    :'payment_date_begin' => :'String',
    :'payment_date_end' => :'String',
    :'payment_method' => :'String',
    :'phone' => :'String',
    :'postal_code' => :'String',
    :'purchase_order_number' => :'String',
    :'refund_date_begin' => :'String',
    :'refund_date_end' => :'String',
    :'rma' => :'String',
    :'screen_branding_theme_code' => :'String',
    :'shipment_date_begin' => :'String',
    :'shipment_date_end' => :'String',
    :'shipped_on_date_begin' => :'String',
    :'shipped_on_date_end' => :'String',
    :'state_region' => :'String',
    :'storefront_host_name' => :'String',
    :'total' => :'Float'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
659
660
661
662
663
664
665
666
667
668
669
670
671
672
# File 'lib/ultracart_api/models/order_query.rb', line 630

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      cc_email == o.cc_email &&
      channel_partner_code == o.channel_partner_code &&
      channel_partner_order_id == o.channel_partner_order_id &&
      city == o.city &&
      company == o.company &&
      country_code == o.country_code &&
      creation_date_begin == o.creation_date_begin &&
      creation_date_end == o.creation_date_end &&
      current_stage == o.current_stage &&
      custom_field_1 == o.custom_field_1 &&
      custom_field_2 == o.custom_field_2 &&
      custom_field_3 == o.custom_field_3 &&
      custom_field_4 == o.custom_field_4 &&
      custom_field_5 == o.custom_field_5 &&
      custom_field_6 == o.custom_field_6 &&
      custom_field_7 == o.custom_field_7 &&
      customer_profile_oid == o.customer_profile_oid &&
      email == o.email &&
      first_name == o.first_name &&
      item_id == o.item_id &&
      last_name == o.last_name &&
      order_id == o.order_id &&
      payment_date_begin == o.payment_date_begin &&
      payment_date_end == o.payment_date_end &&
      payment_method == o.payment_method &&
      phone == o.phone &&
      postal_code == o.postal_code &&
      purchase_order_number == o.purchase_order_number &&
      refund_date_begin == o.refund_date_begin &&
      refund_date_end == o.refund_date_end &&
      rma == o.rma &&
      screen_branding_theme_code == o.screen_branding_theme_code &&
      shipment_date_begin == o.shipment_date_begin &&
      shipment_date_end == o.shipment_date_end &&
      shipped_on_date_begin == o.shipped_on_date_begin &&
      shipped_on_date_end == o.shipped_on_date_end &&
      state_region == o.state_region &&
      storefront_host_name == o.storefront_host_name &&
      total == o.total
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



710
711
712
713
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
# File 'lib/ultracart_api/models/order_query.rb', line 710

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.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
    temp_model = UltracartClient.const_get(type).new
    temp_model.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



776
777
778
779
780
781
782
783
784
785
786
787
788
# File 'lib/ultracart_api/models/order_query.rb', line 776

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



689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
# File 'lib/ultracart_api/models/order_query.rb', line 689

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if 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 # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


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

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



682
683
684
# File 'lib/ultracart_api/models/order_query.rb', line 682

def hash
  [cc_email, channel_partner_code, channel_partner_order_id, city, company, country_code, creation_date_begin, creation_date_end, current_stage, custom_field_1, custom_field_2, custom_field_3, custom_field_4, custom_field_5, custom_field_6, custom_field_7, customer_profile_oid, email, first_name, item_id, last_name, order_id, payment_date_begin, payment_date_end, payment_method, phone, postal_code, purchase_order_number, refund_date_begin, refund_date_end, rma, screen_branding_theme_code, shipment_date_begin, shipment_date_end, shipped_on_date_begin, shipped_on_date_end, state_region, storefront_host_name, total].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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

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

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

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

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

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

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

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

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

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

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

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

  if !@state_region.nil? && @state_region.to_s.length > 32
    invalid_properties.push('invalid value for "state_region", 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



756
757
758
# File 'lib/ultracart_api/models/order_query.rb', line 756

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



762
763
764
765
766
767
768
769
770
# File 'lib/ultracart_api/models/order_query.rb', line 762

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



750
751
752
# File 'lib/ultracart_api/models/order_query.rb', line 750

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



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

def valid?
  return false if !@cc_email.nil? && @cc_email.to_s.length > 100
  return false if !@city.nil? && @city.to_s.length > 32
  return false if !@company.nil? && @company.to_s.length > 50
  return false if !@country_code.nil? && @country_code.to_s.length > 2
  current_stage_validator = EnumAttributeValidator.new('String', ['Accounts Receivable', 'Pending Clearance', 'Fraud Review', 'Rejected', 'Shipping Department', 'Completed Order', 'Quote Request', 'Quote Sent', 'Least Cost Routing', 'Unknown'])
  return false unless current_stage_validator.valid?(@current_stage)
  return false if !@email.nil? && @email.to_s.length > 100
  return false if !@first_name.nil? && @first_name.to_s.length > 30
  return false if !@last_name.nil? && @last_name.to_s.length > 30
  payment_method_validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'eCheck', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer'])
  return false unless payment_method_validator.valid?(@payment_method)
  return false if !@phone.nil? && @phone.to_s.length > 25
  return false if !@postal_code.nil? && @postal_code.to_s.length > 20
  return false if !@rma.nil? && @rma.to_s.length > 30
  return false if !@screen_branding_theme_code.nil? && @screen_branding_theme_code.to_s.length > 10
  return false if !@state_region.nil? && @state_region.to_s.length > 32
  true
end