Method: Noths::Order#list_invalid_properties

Defined in:
lib/noths/models/order.rb

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
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
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/noths/models/order.rb', line 415

def list_invalid_properties
  invalid_properties = Array.new
  if @id.nil?
    invalid_properties.push("invalid value for 'id', id cannot be nil.")
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  return invalid_properties
end