connectwise-ruby-sdk 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -18
  3. data/connectwise-ruby-sdk.gemspec +2 -1
  4. data/lib/connectwise-ruby-sdk/api/documents_api.rb +8 -8
  5. data/lib/connectwise-ruby-sdk/api_client.rb +1 -1
  6. data/lib/connectwise-ruby-sdk/models/activity.rb +27 -15
  7. data/lib/connectwise-ruby-sdk/models/activity_status.rb +11 -3
  8. data/lib/connectwise-ruby-sdk/models/activity_type.rb +11 -3
  9. data/lib/connectwise-ruby-sdk/models/addition.rb +16 -12
  10. data/lib/connectwise-ruby-sdk/models/adjustment.rb +8 -6
  11. data/lib/connectwise-ruby-sdk/models/agreement.rb +43 -27
  12. data/lib/connectwise-ruby-sdk/models/agreement_type.rb +27 -15
  13. data/lib/connectwise-ruby-sdk/models/audit_trail_entry_insert_request.rb +11 -3
  14. data/lib/connectwise-ruby-sdk/models/batch.rb +11 -3
  15. data/lib/connectwise-ruby-sdk/models/board.rb +11 -3
  16. data/lib/connectwise-ruby-sdk/models/callback_entry.rb +8 -6
  17. data/lib/connectwise-ruby-sdk/models/campaign.rb +11 -3
  18. data/lib/connectwise-ruby-sdk/models/campaign_audit.rb +46 -20
  19. data/lib/connectwise-ruby-sdk/models/campaign_status.rb +11 -3
  20. data/lib/connectwise-ruby-sdk/models/campaign_sub_type.rb +11 -3
  21. data/lib/connectwise-ruby-sdk/models/campaign_type.rb +11 -3
  22. data/lib/connectwise-ruby-sdk/models/catalog_item.rb +57 -27
  23. data/lib/connectwise-ruby-sdk/models/category.rb +27 -15
  24. data/lib/connectwise-ruby-sdk/models/code.rb +11 -3
  25. data/lib/connectwise-ruby-sdk/models/company.rb +185 -123
  26. data/lib/connectwise-ruby-sdk/models/company_management_summary.rb +11 -3
  27. data/lib/connectwise-ruby-sdk/models/company_site.rb +67 -45
  28. data/lib/connectwise-ruby-sdk/models/company_status.rb +19 -9
  29. data/lib/connectwise-ruby-sdk/models/company_type.rb +11 -3
  30. data/lib/connectwise-ruby-sdk/models/configuration.rb +131 -93
  31. data/lib/connectwise-ruby-sdk/models/configuration_status.rb +11 -3
  32. data/lib/connectwise-ruby-sdk/models/configuration_type.rb +11 -3
  33. data/lib/connectwise-ruby-sdk/models/configuration_type_question.rb +24 -10
  34. data/lib/connectwise-ruby-sdk/models/connect_wise_hosted_setup.rb +30 -12
  35. data/lib/connectwise-ruby-sdk/models/contact.rb +128 -88
  36. data/lib/connectwise-ruby-sdk/models/contact_communication.rb +19 -9
  37. data/lib/connectwise-ruby-sdk/models/contact_communication_item.rb +19 -9
  38. data/lib/connectwise-ruby-sdk/models/contact_department.rb +11 -3
  39. data/lib/connectwise-ruby-sdk/models/contact_relationship.rb +11 -3
  40. data/lib/connectwise-ruby-sdk/models/contact_type.rb +11 -3
  41. data/lib/connectwise-ruby-sdk/models/currency.rb +35 -21
  42. data/lib/connectwise-ruby-sdk/models/expense_type.rb +11 -3
  43. data/lib/connectwise-ruby-sdk/models/forecast.rb +8 -6
  44. data/lib/connectwise-ruby-sdk/models/form_submitted.rb +11 -3
  45. data/lib/connectwise-ruby-sdk/models/group.rb +8 -6
  46. data/lib/connectwise-ruby-sdk/models/integrator_login.rb +118 -78
  47. data/lib/connectwise-ruby-sdk/models/invoice.rb +32 -24
  48. data/lib/connectwise-ruby-sdk/models/item.rb +11 -3
  49. data/lib/connectwise-ruby-sdk/models/link.rb +19 -9
  50. data/lib/connectwise-ruby-sdk/models/link_clicked.rb +11 -3
  51. data/lib/connectwise-ruby-sdk/models/location.rb +11 -3
  52. data/lib/connectwise-ruby-sdk/models/manufacturer.rb +11 -3
  53. data/lib/connectwise-ruby-sdk/models/marketing_contact.rb +8 -6
  54. data/lib/connectwise-ruby-sdk/models/member.rb +129 -81
  55. data/lib/connectwise-ruby-sdk/models/menu_entry.rb +30 -12
  56. data/lib/connectwise-ruby-sdk/models/opportunity.rb +27 -15
  57. data/lib/connectwise-ruby-sdk/models/opportunity_rating.rb +11 -3
  58. data/lib/connectwise-ruby-sdk/models/opportunity_status.rb +11 -3
  59. data/lib/connectwise-ruby-sdk/models/opportunity_type.rb +11 -3
  60. data/lib/connectwise-ruby-sdk/models/order.rb +8 -6
  61. data/lib/connectwise-ruby-sdk/models/order_status.rb +11 -3
  62. data/lib/connectwise-ruby-sdk/models/pricing_schedule.rb +11 -3
  63. data/lib/connectwise-ruby-sdk/models/priority.rb +22 -6
  64. data/lib/connectwise-ruby-sdk/models/product_item.rb +40 -30
  65. data/lib/connectwise-ruby-sdk/models/product_type.rb +11 -3
  66. data/lib/connectwise-ruby-sdk/models/project.rb +27 -15
  67. data/lib/connectwise-ruby-sdk/models/project_phase.rb +19 -9
  68. data/lib/connectwise-ruby-sdk/models/purchase_order.rb +32 -24
  69. data/lib/connectwise-ruby-sdk/models/purchase_order_line_item.rb +59 -39
  70. data/lib/connectwise-ruby-sdk/models/schedule_entry.rb +8 -6
  71. data/lib/connectwise-ruby-sdk/models/schedule_status.rb +11 -3
  72. data/lib/connectwise-ruby-sdk/models/schedule_type.rb +22 -6
  73. data/lib/connectwise-ruby-sdk/models/shipment_method.rb +11 -3
  74. data/lib/connectwise-ruby-sdk/models/source.rb +11 -3
  75. data/lib/connectwise-ruby-sdk/models/status.rb +11 -3
  76. data/lib/connectwise-ruby-sdk/models/sub_category.rb +11 -3
  77. data/lib/connectwise-ruby-sdk/models/sub_type.rb +11 -3
  78. data/lib/connectwise-ruby-sdk/models/survey.rb +35 -21
  79. data/lib/connectwise-ruby-sdk/models/survey_question.rb +11 -3
  80. data/lib/connectwise-ruby-sdk/models/survey_question_option.rb +11 -3
  81. data/lib/connectwise-ruby-sdk/models/task.rb +13 -7
  82. data/lib/connectwise-ruby-sdk/models/team.rb +11 -3
  83. data/lib/connectwise-ruby-sdk/models/ticket.rb +115 -81
  84. data/lib/connectwise-ruby-sdk/models/type.rb +11 -3
  85. data/lib/connectwise-ruby-sdk/models/unit_of_measure.rb +19 -9
  86. data/lib/connectwise-ruby-sdk/models/user_defined_field.rb +52 -22
  87. data/lib/connectwise-ruby-sdk/models/user_defined_field_option.rb +11 -3
  88. data/lib/connectwise-ruby-sdk/version.rb +1 -1
  89. data/spec/api_client_spec.rb +3 -2
  90. data/spec/configuration_spec.rb +1 -0
  91. data/spec/spec_helper.rb +1 -0
  92. metadata +2 -3
  93. data/git_push.sh +0 -67
@@ -213,6 +213,14 @@ module Connectwise
213
213
  # @return Array for valid properies with the reasons
214
214
  def list_invalid_properties
215
215
  invalid_properties = Array.new
216
+ if @name.nil?
217
+ invalid_properties.push("invalid value for 'name', name cannot be nil.")
218
+ end
219
+
220
+ if @name.to_s.length > 30
221
+ invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 30.")
222
+ end
223
+
216
224
  return invalid_properties
217
225
  end
218
226
 
@@ -223,7 +231,7 @@ module Connectwise
223
231
  type_validator = EnumAttributeValidator.new('String', ["Individual", "Team"])
224
232
  return false unless type_validator.valid?(@type)
225
233
  return false if @name.nil?
226
- return false if @name.to_s.length <
234
+ return false if @name.to_s.length > 30
227
235
  return false if @team_leader.nil?
228
236
  return true
229
237
  end
@@ -245,8 +253,8 @@ module Connectwise
245
253
  fail ArgumentError, "name cannot be nil"
246
254
  end
247
255
 
248
- if name.to_s.length <
249
- fail ArgumentError, "invalid value for 'name', the character length must be great than or equal to ."
256
+ if name.to_s.length > 30
257
+ fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 30."
250
258
  end
251
259
 
252
260
  @name = name
@@ -790,6 +790,79 @@ module Connectwise
790
790
  # @return Array for valid properies with the reasons
791
791
  def list_invalid_properties
792
792
  invalid_properties = Array.new
793
+ if @summary.nil?
794
+ invalid_properties.push("invalid value for 'summary', summary cannot be nil.")
795
+ end
796
+
797
+ if @summary.to_s.length > 100
798
+ invalid_properties.push("invalid value for 'summary', the character length must be smaller than or equal to 100.")
799
+ end
800
+
801
+
802
+ if !@wbs_code.nil? && @wbs_code.to_s.length > 50
803
+ invalid_properties.push("invalid value for 'wbs_code', the character length must be smaller than or equal to 50.")
804
+ end
805
+
806
+
807
+ if !@site_name.nil? && @site_name.to_s.length > 50
808
+ invalid_properties.push("invalid value for 'site_name', the character length must be smaller than or equal to 50.")
809
+ end
810
+
811
+
812
+ if !@address_line1.nil? && @address_line1.to_s.length > 50
813
+ invalid_properties.push("invalid value for 'address_line1', the character length must be smaller than or equal to 50.")
814
+ end
815
+
816
+
817
+ if !@address_line2.nil? && @address_line2.to_s.length > 50
818
+ invalid_properties.push("invalid value for 'address_line2', the character length must be smaller than or equal to 50.")
819
+ end
820
+
821
+
822
+ if !@city.nil? && @city.to_s.length > 50
823
+ invalid_properties.push("invalid value for 'city', the character length must be smaller than or equal to 50.")
824
+ end
825
+
826
+
827
+ if !@state_identifier.nil? && @state_identifier.to_s.length > 50
828
+ invalid_properties.push("invalid value for 'state_identifier', the character length must be smaller than or equal to 50.")
829
+ end
830
+
831
+
832
+ if !@zip.nil? && @zip.to_s.length > 12
833
+ invalid_properties.push("invalid value for 'zip', the character length must be smaller than or equal to 12.")
834
+ end
835
+
836
+
837
+ if !@contact_phone_number.nil? && @contact_phone_number.to_s.length > 20
838
+ invalid_properties.push("invalid value for 'contact_phone_number', the character length must be smaller than or equal to 20.")
839
+ end
840
+
841
+
842
+ if !@contact_phone_extension.nil? && @contact_phone_extension.to_s.length > 15
843
+ invalid_properties.push("invalid value for 'contact_phone_extension', the character length must be smaller than or equal to 15.")
844
+ end
845
+
846
+
847
+ if !@contact_email_address.nil? && @contact_email_address.to_s.length > 250
848
+ invalid_properties.push("invalid value for 'contact_email_address', the character length must be smaller than or equal to 250.")
849
+ end
850
+
851
+
852
+ if !@external_x_ref.nil? && @external_x_ref.to_s.length > 100
853
+ invalid_properties.push("invalid value for 'external_x_ref', the character length must be smaller than or equal to 100.")
854
+ end
855
+
856
+
857
+ if !@po_number.nil? && @po_number.to_s.length > 50
858
+ invalid_properties.push("invalid value for 'po_number', the character length must be smaller than or equal to 50.")
859
+ end
860
+
861
+
862
+ if !@automatic_email_cc.nil? && @automatic_email_cc.to_s.length > 1000
863
+ invalid_properties.push("invalid value for 'automatic_email_cc', the character length must be smaller than or equal to 1000.")
864
+ end
865
+
793
866
  return invalid_properties
794
867
  end
795
868
 
@@ -797,27 +870,27 @@ module Connectwise
797
870
  # @return true if the model is valid
798
871
  def valid?
799
872
  return false if @summary.nil?
800
- return false if @summary.to_s.length <
873
+ return false if @summary.to_s.length > 100
801
874
  record_type_validator = EnumAttributeValidator.new('String', ["ServiceTicket", "ProjectTicket", "ProjectIssue"])
802
875
  return false unless record_type_validator.valid?(@record_type)
803
- return false if @wbs_code.to_s.length <
876
+ return false if !@wbs_code.nil? && @wbs_code.to_s.length > 50
804
877
  return false if @company.nil?
805
- return false if @site_name.to_s.length <
806
- return false if @address_line1.to_s.length <
807
- return false if @address_line2.to_s.length <
808
- return false if @city.to_s.length <
809
- return false if @state_identifier.to_s.length <
810
- return false if @zip.to_s.length <
811
- return false if @contact_phone_number.to_s.length <
812
- return false if @contact_phone_extension.to_s.length <
813
- return false if @contact_email_address.to_s.length <
878
+ return false if !@site_name.nil? && @site_name.to_s.length > 50
879
+ return false if !@address_line1.nil? && @address_line1.to_s.length > 50
880
+ return false if !@address_line2.nil? && @address_line2.to_s.length > 50
881
+ return false if !@city.nil? && @city.to_s.length > 50
882
+ return false if !@state_identifier.nil? && @state_identifier.to_s.length > 50
883
+ return false if !@zip.nil? && @zip.to_s.length > 12
884
+ return false if !@contact_phone_number.nil? && @contact_phone_number.to_s.length > 20
885
+ return false if !@contact_phone_extension.nil? && @contact_phone_extension.to_s.length > 15
886
+ return false if !@contact_email_address.nil? && @contact_email_address.to_s.length > 250
814
887
  severity_validator = EnumAttributeValidator.new('String', ["Low", "Medium", "High"])
815
888
  return false unless severity_validator.valid?(@severity)
816
889
  impact_validator = EnumAttributeValidator.new('String', ["Low", "Medium", "High"])
817
890
  return false unless impact_validator.valid?(@impact)
818
- return false if @external_x_ref.to_s.length <
819
- return false if @po_number.to_s.length <
820
- return false if @automatic_email_cc.to_s.length <
891
+ return false if !@external_x_ref.nil? && @external_x_ref.to_s.length > 100
892
+ return false if !@po_number.nil? && @po_number.to_s.length > 50
893
+ return false if !@automatic_email_cc.nil? && @automatic_email_cc.to_s.length > 1000
821
894
  sub_billing_method_validator = EnumAttributeValidator.new('String', ["ActualRates", "FixedFee", "NotToExceed", "OverrideRate"])
822
895
  return false unless sub_billing_method_validator.valid?(@sub_billing_method)
823
896
  knowledge_base_link_type_validator = EnumAttributeValidator.new('String', ["ServiceTicket", "ProjectTicket", "ProjectIssue", "KnowledgeBaseArticle", "Time", "Activity"])
@@ -840,8 +913,8 @@ module Connectwise
840
913
  fail ArgumentError, "summary cannot be nil"
841
914
  end
842
915
 
843
- if summary.to_s.length <
844
- fail ArgumentError, "invalid value for 'summary', the character length must be great than or equal to ."
916
+ if summary.to_s.length > 100
917
+ fail ArgumentError, "invalid value for 'summary', the character length must be smaller than or equal to 100."
845
918
  end
846
919
 
847
920
  @summary = summary
@@ -860,12 +933,9 @@ module Connectwise
860
933
  # Custom attribute writer method with validation
861
934
  # @param [Object] wbs_code Value to be assigned
862
935
  def wbs_code=(wbs_code)
863
- if wbs_code.nil?
864
- fail ArgumentError, "wbs_code cannot be nil"
865
- end
866
936
 
867
- if wbs_code.to_s.length <
868
- fail ArgumentError, "invalid value for 'wbs_code', the character length must be great than or equal to ."
937
+ if !wbs_code.nil? && wbs_code.to_s.length > 50
938
+ fail ArgumentError, "invalid value for 'wbs_code', the character length must be smaller than or equal to 50."
869
939
  end
870
940
 
871
941
  @wbs_code = wbs_code
@@ -874,12 +944,9 @@ module Connectwise
874
944
  # Custom attribute writer method with validation
875
945
  # @param [Object] site_name Value to be assigned
876
946
  def site_name=(site_name)
877
- if site_name.nil?
878
- fail ArgumentError, "site_name cannot be nil"
879
- end
880
947
 
881
- if site_name.to_s.length <
882
- fail ArgumentError, "invalid value for 'site_name', the character length must be great than or equal to ."
948
+ if !site_name.nil? && site_name.to_s.length > 50
949
+ fail ArgumentError, "invalid value for 'site_name', the character length must be smaller than or equal to 50."
883
950
  end
884
951
 
885
952
  @site_name = site_name
@@ -888,12 +955,9 @@ module Connectwise
888
955
  # Custom attribute writer method with validation
889
956
  # @param [Object] address_line1 Value to be assigned
890
957
  def address_line1=(address_line1)
891
- if address_line1.nil?
892
- fail ArgumentError, "address_line1 cannot be nil"
893
- end
894
958
 
895
- if address_line1.to_s.length <
896
- fail ArgumentError, "invalid value for 'address_line1', the character length must be great than or equal to ."
959
+ if !address_line1.nil? && address_line1.to_s.length > 50
960
+ fail ArgumentError, "invalid value for 'address_line1', the character length must be smaller than or equal to 50."
897
961
  end
898
962
 
899
963
  @address_line1 = address_line1
@@ -902,12 +966,9 @@ module Connectwise
902
966
  # Custom attribute writer method with validation
903
967
  # @param [Object] address_line2 Value to be assigned
904
968
  def address_line2=(address_line2)
905
- if address_line2.nil?
906
- fail ArgumentError, "address_line2 cannot be nil"
907
- end
908
969
 
909
- if address_line2.to_s.length <
910
- fail ArgumentError, "invalid value for 'address_line2', the character length must be great than or equal to ."
970
+ if !address_line2.nil? && address_line2.to_s.length > 50
971
+ fail ArgumentError, "invalid value for 'address_line2', the character length must be smaller than or equal to 50."
911
972
  end
912
973
 
913
974
  @address_line2 = address_line2
@@ -916,12 +977,9 @@ module Connectwise
916
977
  # Custom attribute writer method with validation
917
978
  # @param [Object] city Value to be assigned
918
979
  def city=(city)
919
- if city.nil?
920
- fail ArgumentError, "city cannot be nil"
921
- end
922
980
 
923
- if city.to_s.length <
924
- fail ArgumentError, "invalid value for 'city', the character length must be great than or equal to ."
981
+ if !city.nil? && city.to_s.length > 50
982
+ fail ArgumentError, "invalid value for 'city', the character length must be smaller than or equal to 50."
925
983
  end
926
984
 
927
985
  @city = city
@@ -930,12 +988,9 @@ module Connectwise
930
988
  # Custom attribute writer method with validation
931
989
  # @param [Object] state_identifier Value to be assigned
932
990
  def state_identifier=(state_identifier)
933
- if state_identifier.nil?
934
- fail ArgumentError, "state_identifier cannot be nil"
935
- end
936
991
 
937
- if state_identifier.to_s.length <
938
- fail ArgumentError, "invalid value for 'state_identifier', the character length must be great than or equal to ."
992
+ if !state_identifier.nil? && state_identifier.to_s.length > 50
993
+ fail ArgumentError, "invalid value for 'state_identifier', the character length must be smaller than or equal to 50."
939
994
  end
940
995
 
941
996
  @state_identifier = state_identifier
@@ -944,12 +999,9 @@ module Connectwise
944
999
  # Custom attribute writer method with validation
945
1000
  # @param [Object] zip Value to be assigned
946
1001
  def zip=(zip)
947
- if zip.nil?
948
- fail ArgumentError, "zip cannot be nil"
949
- end
950
1002
 
951
- if zip.to_s.length <
952
- fail ArgumentError, "invalid value for 'zip', the character length must be great than or equal to ."
1003
+ if !zip.nil? && zip.to_s.length > 12
1004
+ fail ArgumentError, "invalid value for 'zip', the character length must be smaller than or equal to 12."
953
1005
  end
954
1006
 
955
1007
  @zip = zip
@@ -958,12 +1010,9 @@ module Connectwise
958
1010
  # Custom attribute writer method with validation
959
1011
  # @param [Object] contact_phone_number Value to be assigned
960
1012
  def contact_phone_number=(contact_phone_number)
961
- if contact_phone_number.nil?
962
- fail ArgumentError, "contact_phone_number cannot be nil"
963
- end
964
1013
 
965
- if contact_phone_number.to_s.length <
966
- fail ArgumentError, "invalid value for 'contact_phone_number', the character length must be great than or equal to ."
1014
+ if !contact_phone_number.nil? && contact_phone_number.to_s.length > 20
1015
+ fail ArgumentError, "invalid value for 'contact_phone_number', the character length must be smaller than or equal to 20."
967
1016
  end
968
1017
 
969
1018
  @contact_phone_number = contact_phone_number
@@ -972,12 +1021,9 @@ module Connectwise
972
1021
  # Custom attribute writer method with validation
973
1022
  # @param [Object] contact_phone_extension Value to be assigned
974
1023
  def contact_phone_extension=(contact_phone_extension)
975
- if contact_phone_extension.nil?
976
- fail ArgumentError, "contact_phone_extension cannot be nil"
977
- end
978
1024
 
979
- if contact_phone_extension.to_s.length <
980
- fail ArgumentError, "invalid value for 'contact_phone_extension', the character length must be great than or equal to ."
1025
+ if !contact_phone_extension.nil? && contact_phone_extension.to_s.length > 15
1026
+ fail ArgumentError, "invalid value for 'contact_phone_extension', the character length must be smaller than or equal to 15."
981
1027
  end
982
1028
 
983
1029
  @contact_phone_extension = contact_phone_extension
@@ -986,12 +1032,9 @@ module Connectwise
986
1032
  # Custom attribute writer method with validation
987
1033
  # @param [Object] contact_email_address Value to be assigned
988
1034
  def contact_email_address=(contact_email_address)
989
- if contact_email_address.nil?
990
- fail ArgumentError, "contact_email_address cannot be nil"
991
- end
992
1035
 
993
- if contact_email_address.to_s.length <
994
- fail ArgumentError, "invalid value for 'contact_email_address', the character length must be great than or equal to ."
1036
+ if !contact_email_address.nil? && contact_email_address.to_s.length > 250
1037
+ fail ArgumentError, "invalid value for 'contact_email_address', the character length must be smaller than or equal to 250."
995
1038
  end
996
1039
 
997
1040
  @contact_email_address = contact_email_address
@@ -1020,12 +1063,9 @@ module Connectwise
1020
1063
  # Custom attribute writer method with validation
1021
1064
  # @param [Object] external_x_ref Value to be assigned
1022
1065
  def external_x_ref=(external_x_ref)
1023
- if external_x_ref.nil?
1024
- fail ArgumentError, "external_x_ref cannot be nil"
1025
- end
1026
1066
 
1027
- if external_x_ref.to_s.length <
1028
- fail ArgumentError, "invalid value for 'external_x_ref', the character length must be great than or equal to ."
1067
+ if !external_x_ref.nil? && external_x_ref.to_s.length > 100
1068
+ fail ArgumentError, "invalid value for 'external_x_ref', the character length must be smaller than or equal to 100."
1029
1069
  end
1030
1070
 
1031
1071
  @external_x_ref = external_x_ref
@@ -1034,12 +1074,9 @@ module Connectwise
1034
1074
  # Custom attribute writer method with validation
1035
1075
  # @param [Object] po_number Value to be assigned
1036
1076
  def po_number=(po_number)
1037
- if po_number.nil?
1038
- fail ArgumentError, "po_number cannot be nil"
1039
- end
1040
1077
 
1041
- if po_number.to_s.length <
1042
- fail ArgumentError, "invalid value for 'po_number', the character length must be great than or equal to ."
1078
+ if !po_number.nil? && po_number.to_s.length > 50
1079
+ fail ArgumentError, "invalid value for 'po_number', the character length must be smaller than or equal to 50."
1043
1080
  end
1044
1081
 
1045
1082
  @po_number = po_number
@@ -1048,12 +1085,9 @@ module Connectwise
1048
1085
  # Custom attribute writer method with validation
1049
1086
  # @param [Object] automatic_email_cc Value to be assigned
1050
1087
  def automatic_email_cc=(automatic_email_cc)
1051
- if automatic_email_cc.nil?
1052
- fail ArgumentError, "automatic_email_cc cannot be nil"
1053
- end
1054
1088
 
1055
- if automatic_email_cc.to_s.length <
1056
- fail ArgumentError, "invalid value for 'automatic_email_cc', the character length must be great than or equal to ."
1089
+ if !automatic_email_cc.nil? && automatic_email_cc.to_s.length > 1000
1090
+ fail ArgumentError, "invalid value for 'automatic_email_cc', the character length must be smaller than or equal to 1000."
1057
1091
  end
1058
1092
 
1059
1093
  @automatic_email_cc = automatic_email_cc
@@ -155,6 +155,14 @@ module Connectwise
155
155
  # @return Array for valid properies with the reasons
156
156
  def list_invalid_properties
157
157
  invalid_properties = Array.new
158
+ if @name.nil?
159
+ invalid_properties.push("invalid value for 'name', name cannot be nil.")
160
+ end
161
+
162
+ if @name.to_s.length > 50
163
+ invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 50.")
164
+ end
165
+
158
166
  return invalid_properties
159
167
  end
160
168
 
@@ -162,7 +170,7 @@ module Connectwise
162
170
  # @return true if the model is valid
163
171
  def valid?
164
172
  return false if @name.nil?
165
- return false if @name.to_s.length <
173
+ return false if @name.to_s.length > 50
166
174
  category_validator = EnumAttributeValidator.new('String', ["Reactive", "Proactive"])
167
175
  return false unless category_validator.valid?(@category)
168
176
  return true
@@ -175,8 +183,8 @@ module Connectwise
175
183
  fail ArgumentError, "name cannot be nil"
176
184
  end
177
185
 
178
- if name.to_s.length <
179
- fail ArgumentError, "invalid value for 'name', the character length must be great than or equal to ."
186
+ if name.to_s.length > 50
187
+ fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 50."
180
188
  end
181
189
 
182
190
  @name = name
@@ -102,6 +102,19 @@ module Connectwise
102
102
  # @return Array for valid properies with the reasons
103
103
  def list_invalid_properties
104
104
  invalid_properties = Array.new
105
+ if @name.nil?
106
+ invalid_properties.push("invalid value for 'name', name cannot be nil.")
107
+ end
108
+
109
+ if @name.to_s.length > 50
110
+ invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 50.")
111
+ end
112
+
113
+
114
+ if !@uom_schedule_xref.nil? && @uom_schedule_xref.to_s.length > 10
115
+ invalid_properties.push("invalid value for 'uom_schedule_xref', the character length must be smaller than or equal to 10.")
116
+ end
117
+
105
118
  return invalid_properties
106
119
  end
107
120
 
@@ -109,8 +122,8 @@ module Connectwise
109
122
  # @return true if the model is valid
110
123
  def valid?
111
124
  return false if @name.nil?
112
- return false if @name.to_s.length <
113
- return false if @uom_schedule_xref.to_s.length <
125
+ return false if @name.to_s.length > 50
126
+ return false if !@uom_schedule_xref.nil? && @uom_schedule_xref.to_s.length > 10
114
127
  return true
115
128
  end
116
129
 
@@ -121,8 +134,8 @@ module Connectwise
121
134
  fail ArgumentError, "name cannot be nil"
122
135
  end
123
136
 
124
- if name.to_s.length <
125
- fail ArgumentError, "invalid value for 'name', the character length must be great than or equal to ."
137
+ if name.to_s.length > 50
138
+ fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 50."
126
139
  end
127
140
 
128
141
  @name = name
@@ -131,12 +144,9 @@ module Connectwise
131
144
  # Custom attribute writer method with validation
132
145
  # @param [Object] uom_schedule_xref Value to be assigned
133
146
  def uom_schedule_xref=(uom_schedule_xref)
134
- if uom_schedule_xref.nil?
135
- fail ArgumentError, "uom_schedule_xref cannot be nil"
136
- end
137
147
 
138
- if uom_schedule_xref.to_s.length <
139
- fail ArgumentError, "invalid value for 'uom_schedule_xref', the character length must be great than or equal to ."
148
+ if !uom_schedule_xref.nil? && uom_schedule_xref.to_s.length > 10
149
+ fail ArgumentError, "invalid value for 'uom_schedule_xref', the character length must be smaller than or equal to 10."
140
150
  end
141
151
 
142
152
  @uom_schedule_xref = uom_schedule_xref
@@ -266,6 +266,45 @@ module Connectwise
266
266
  # @return Array for valid properies with the reasons
267
267
  def list_invalid_properties
268
268
  invalid_properties = Array.new
269
+ if @caption.nil?
270
+ invalid_properties.push("invalid value for 'caption', caption cannot be nil.")
271
+ end
272
+
273
+ if @caption.to_s.length > 25
274
+ invalid_properties.push("invalid value for 'caption', the character length must be smaller than or equal to 25.")
275
+ end
276
+
277
+ if @sequence_number.nil?
278
+ invalid_properties.push("invalid value for 'sequence_number', sequence_number cannot be nil.")
279
+ end
280
+
281
+ if @sequence_number > 50.0
282
+ invalid_properties.push("invalid value for 'sequence_number', must be smaller than or equal to 50.0.")
283
+ end
284
+
285
+ if @sequence_number < 1.0
286
+ invalid_properties.push("invalid value for 'sequence_number', must be greater than or equal to 1.0.")
287
+ end
288
+
289
+
290
+ if !@help_text.nil? && @help_text.to_s.length > 1000
291
+ invalid_properties.push("invalid value for 'help_text', the character length must be smaller than or equal to 1000.")
292
+ end
293
+
294
+
295
+ if !@number_decimals.nil? && @number_decimals > 5.0
296
+ invalid_properties.push("invalid value for 'number_decimals', must be smaller than or equal to 5.0.")
297
+ end
298
+
299
+ if !@number_decimals.nil? && @number_decimals < 0.0
300
+ invalid_properties.push("invalid value for 'number_decimals', must be greater than or equal to 0.0.")
301
+ end
302
+
303
+
304
+ if !@button_url.nil? && @button_url.to_s.length > 1000
305
+ invalid_properties.push("invalid value for 'button_url', the character length must be smaller than or equal to 1000.")
306
+ end
307
+
269
308
  return invalid_properties
270
309
  end
271
310
 
@@ -274,19 +313,19 @@ module Connectwise
274
313
  def valid?
275
314
  return false if @pod_id.nil?
276
315
  return false if @caption.nil?
277
- return false if @caption.to_s.length <
316
+ return false if @caption.to_s.length > 25
278
317
  return false if @sequence_number.nil?
279
318
  return false if @sequence_number > 50.0
280
319
  return false if @sequence_number < 1.0
281
- return false if @help_text.to_s.length <
320
+ return false if !@help_text.nil? && @help_text.to_s.length > 1000
282
321
  return false if @field_type_identifier.nil?
283
322
  field_type_identifier_validator = EnumAttributeValidator.new('String', ["Text", "Button", "Date", "Hyperlink", "Checkbox", "Number", "Percent", "TextArea"])
284
323
  return false unless field_type_identifier_validator.valid?(@field_type_identifier)
285
- return false if @number_decimals > 5.0
286
- return false if @number_decimals < 0.0
324
+ return false if !@number_decimals.nil? && @number_decimals > 5.0
325
+ return false if !@number_decimals.nil? && @number_decimals < 0.0
287
326
  entry_type_identifier_validator = EnumAttributeValidator.new('String', ["EntryField", "List", "Option"])
288
327
  return false unless entry_type_identifier_validator.valid?(@entry_type_identifier)
289
- return false if @button_url.to_s.length <
328
+ return false if !@button_url.nil? && @button_url.to_s.length > 1000
290
329
  return true
291
330
  end
292
331
 
@@ -297,8 +336,8 @@ module Connectwise
297
336
  fail ArgumentError, "caption cannot be nil"
298
337
  end
299
338
 
300
- if caption.to_s.length <
301
- fail ArgumentError, "invalid value for 'caption', the character length must be great than or equal to ."
339
+ if caption.to_s.length > 25
340
+ fail ArgumentError, "invalid value for 'caption', the character length must be smaller than or equal to 25."
302
341
  end
303
342
 
304
343
  @caption = caption
@@ -325,12 +364,9 @@ module Connectwise
325
364
  # Custom attribute writer method with validation
326
365
  # @param [Object] help_text Value to be assigned
327
366
  def help_text=(help_text)
328
- if help_text.nil?
329
- fail ArgumentError, "help_text cannot be nil"
330
- end
331
367
 
332
- if help_text.to_s.length <
333
- fail ArgumentError, "invalid value for 'help_text', the character length must be great than or equal to ."
368
+ if !help_text.nil? && help_text.to_s.length > 1000
369
+ fail ArgumentError, "invalid value for 'help_text', the character length must be smaller than or equal to 1000."
334
370
  end
335
371
 
336
372
  @help_text = help_text
@@ -349,15 +385,12 @@ module Connectwise
349
385
  # Custom attribute writer method with validation
350
386
  # @param [Object] number_decimals Value to be assigned
351
387
  def number_decimals=(number_decimals)
352
- if number_decimals.nil?
353
- fail ArgumentError, "number_decimals cannot be nil"
354
- end
355
388
 
356
- if number_decimals > 5.0
389
+ if !number_decimals.nil? && number_decimals > 5.0
357
390
  fail ArgumentError, "invalid value for 'number_decimals', must be smaller than or equal to 5.0."
358
391
  end
359
392
 
360
- if number_decimals < 0.0
393
+ if !number_decimals.nil? && number_decimals < 0.0
361
394
  fail ArgumentError, "invalid value for 'number_decimals', must be greater than or equal to 0.0."
362
395
  end
363
396
 
@@ -377,12 +410,9 @@ module Connectwise
377
410
  # Custom attribute writer method with validation
378
411
  # @param [Object] button_url Value to be assigned
379
412
  def button_url=(button_url)
380
- if button_url.nil?
381
- fail ArgumentError, "button_url cannot be nil"
382
- end
383
413
 
384
- if button_url.to_s.length <
385
- fail ArgumentError, "invalid value for 'button_url', the character length must be great than or equal to ."
414
+ if !button_url.nil? && button_url.to_s.length > 1000
415
+ fail ArgumentError, "invalid value for 'button_url', the character length must be smaller than or equal to 1000."
386
416
  end
387
417
 
388
418
  @button_url = button_url