Class: ConnectWise::CompanyMerge
- Inherits:
-
Object
- Object
- ConnectWise::CompanyMerge
- Defined in:
- lib/connectwise-ruby-sdk/models/company_merge.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_number ⇒ Object
Returns the value of attribute account_number.
-
#activities ⇒ Object
Returns the value of attribute activities.
-
#billing_address ⇒ Object
Returns the value of attribute billing_address.
-
#billing_contact ⇒ Object
Returns the value of attribute billing_contact.
-
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
-
#contacts ⇒ Object
Returns the value of attribute contacts.
-
#date_acquired ⇒ Object
Returns the value of attribute date_acquired.
-
#documents ⇒ Object
Returns the value of attribute documents.
-
#fax ⇒ Object
Returns the value of attribute fax.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#market ⇒ Object
Returns the value of attribute market.
-
#name ⇒ Object
Returns the value of attribute name.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#number_of_employees ⇒ Object
Returns the value of attribute number_of_employees.
-
#opportunities ⇒ Object
Returns the value of attribute opportunities.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#primary_address ⇒ Object
Returns the value of attribute primary_address.
-
#primary_contact ⇒ Object
Returns the value of attribute primary_contact.
-
#projects ⇒ Object
Returns the value of attribute projects.
-
#revenue ⇒ Object
Returns the value of attribute revenue.
-
#revenue_year ⇒ Object
Returns the value of attribute revenue_year.
-
#services ⇒ Object
Returns the value of attribute services.
-
#sic_code ⇒ Object
Returns the value of attribute sic_code.
-
#sites ⇒ Object
Returns the value of attribute sites.
-
#source_list ⇒ Object
Returns the value of attribute source_list.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tax_code ⇒ Object
Returns the value of attribute tax_code.
-
#territory ⇒ Object
Returns the value of attribute territory.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#to_company_id ⇒ Object
Returns the value of attribute to_company_id.
-
#type ⇒ Object
Returns the value of attribute type.
-
#user_defined_field1 ⇒ Object
Returns the value of attribute user_defined_field1.
-
#user_defined_field10 ⇒ Object
Returns the value of attribute user_defined_field10.
-
#user_defined_field2 ⇒ Object
Returns the value of attribute user_defined_field2.
-
#user_defined_field3 ⇒ Object
Returns the value of attribute user_defined_field3.
-
#user_defined_field4 ⇒ Object
Returns the value of attribute user_defined_field4.
-
#user_defined_field5 ⇒ Object
Returns the value of attribute user_defined_field5.
-
#user_defined_field6 ⇒ Object
Returns the value of attribute user_defined_field6.
-
#user_defined_field7 ⇒ Object
Returns the value of attribute user_defined_field7.
-
#user_defined_field8 ⇒ Object
Returns the value of attribute user_defined_field8.
-
#user_defined_field9 ⇒ Object
Returns the value of attribute user_defined_field9.
-
#website ⇒ Object
Returns the value of attribute website.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CompanyMerge
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CompanyMerge
Initializes the object
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 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 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 211 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?(:'toCompanyId') self.to_company_id = attributes[:'toCompanyId'] end if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'identifier') self.identifier = attributes[:'identifier'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end if attributes.has_key?(:'primaryAddress') self.primary_address = attributes[:'primaryAddress'] end if attributes.has_key?(:'primaryContact') self.primary_contact = attributes[:'primaryContact'] end if attributes.has_key?(:'phone') self.phone = attributes[:'phone'] end if attributes.has_key?(:'fax') self.fax = attributes[:'fax'] end if attributes.has_key?(:'website') self.website = attributes[:'website'] end if attributes.has_key?(:'market') self.market = attributes[:'market'] end if attributes.has_key?(:'territory') self.territory = attributes[:'territory'] end if attributes.has_key?(:'revenue') self.revenue = attributes[:'revenue'] end if attributes.has_key?(:'revenueYear') self.revenue_year = attributes[:'revenueYear'] end if attributes.has_key?(:'numberOfEmployees') self.number_of_employees = attributes[:'numberOfEmployees'] end if attributes.has_key?(:'sicCode') self.sic_code = attributes[:'sicCode'] end if attributes.has_key?(:'dateAcquired') self.date_acquired = attributes[:'dateAcquired'] end if attributes.has_key?(:'timeZone') self.time_zone = attributes[:'timeZone'] end if attributes.has_key?(:'sourceList') self.source_list = attributes[:'sourceList'] end if attributes.has_key?(:'userDefinedField1') self.user_defined_field1 = attributes[:'userDefinedField1'] end if attributes.has_key?(:'userDefinedField2') self.user_defined_field2 = attributes[:'userDefinedField2'] end if attributes.has_key?(:'userDefinedField3') self.user_defined_field3 = attributes[:'userDefinedField3'] end if attributes.has_key?(:'userDefinedField4') self.user_defined_field4 = attributes[:'userDefinedField4'] end if attributes.has_key?(:'userDefinedField5') self.user_defined_field5 = attributes[:'userDefinedField5'] end if attributes.has_key?(:'userDefinedField6') self.user_defined_field6 = attributes[:'userDefinedField6'] end if attributes.has_key?(:'userDefinedField7') self.user_defined_field7 = attributes[:'userDefinedField7'] end if attributes.has_key?(:'userDefinedField8') self.user_defined_field8 = attributes[:'userDefinedField8'] end if attributes.has_key?(:'userDefinedField9') self.user_defined_field9 = attributes[:'userDefinedField9'] end if attributes.has_key?(:'userDefinedField10') self.user_defined_field10 = attributes[:'userDefinedField10'] end if attributes.has_key?(:'billingAddress') self.billing_address = attributes[:'billingAddress'] end if attributes.has_key?(:'billingContact') self.billing_contact = attributes[:'billingContact'] end if attributes.has_key?(:'taxCode') self.tax_code = attributes[:'taxCode'] end if attributes.has_key?(:'accountNumber') self.account_number = attributes[:'accountNumber'] end if attributes.has_key?(:'billingTerms') self.billing_terms = attributes[:'billingTerms'] end if attributes.has_key?(:'notes') self.notes = attributes[:'notes'] end if attributes.has_key?(:'sites') self.sites = attributes[:'sites'] end if attributes.has_key?(:'activities') self.activities = attributes[:'activities'] end if attributes.has_key?(:'opportunities') self.opportunities = attributes[:'opportunities'] end if attributes.has_key?(:'services') self.services = attributes[:'services'] end if attributes.has_key?(:'projects') self.projects = attributes[:'projects'] end if attributes.has_key?(:'contacts') self.contacts = attributes[:'contacts'] end if attributes.has_key?(:'documents') self.documents = attributes[:'documents'] end end |
Instance Attribute Details
#account_number ⇒ Object
Returns the value of attribute account_number.
71 72 73 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 71 def account_number @account_number end |
#activities ⇒ Object
Returns the value of attribute activities.
79 80 81 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 79 def activities @activities end |
#billing_address ⇒ Object
Returns the value of attribute billing_address.
65 66 67 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 65 def billing_address @billing_address end |
#billing_contact ⇒ Object
Returns the value of attribute billing_contact.
67 68 69 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 67 def billing_contact @billing_contact end |
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
73 74 75 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 73 def billing_terms @billing_terms end |
#contacts ⇒ Object
Returns the value of attribute contacts.
87 88 89 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 87 def contacts @contacts end |
#date_acquired ⇒ Object
Returns the value of attribute date_acquired.
39 40 41 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 39 def date_acquired @date_acquired end |
#documents ⇒ Object
Returns the value of attribute documents.
89 90 91 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 89 def documents @documents end |
#fax ⇒ Object
Returns the value of attribute fax.
23 24 25 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 23 def fax @fax end |
#identifier ⇒ Object
Returns the value of attribute identifier.
11 12 13 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 11 def identifier @identifier end |
#market ⇒ Object
Returns the value of attribute market.
27 28 29 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 27 def market @market end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 9 def name @name end |
#notes ⇒ Object
Returns the value of attribute notes.
75 76 77 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 75 def notes @notes end |
#number_of_employees ⇒ Object
Returns the value of attribute number_of_employees.
35 36 37 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 35 def number_of_employees @number_of_employees end |
#opportunities ⇒ Object
Returns the value of attribute opportunities.
81 82 83 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 81 def opportunities @opportunities end |
#phone ⇒ Object
Returns the value of attribute phone.
21 22 23 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 21 def phone @phone end |
#primary_address ⇒ Object
Returns the value of attribute primary_address.
17 18 19 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 17 def primary_address @primary_address end |
#primary_contact ⇒ Object
Returns the value of attribute primary_contact.
19 20 21 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 19 def primary_contact @primary_contact end |
#projects ⇒ Object
Returns the value of attribute projects.
85 86 87 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 85 def projects @projects end |
#revenue ⇒ Object
Returns the value of attribute revenue.
31 32 33 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 31 def revenue @revenue end |
#revenue_year ⇒ Object
Returns the value of attribute revenue_year.
33 34 35 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 33 def revenue_year @revenue_year end |
#services ⇒ Object
Returns the value of attribute services.
83 84 85 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 83 def services @services end |
#sic_code ⇒ Object
Returns the value of attribute sic_code.
37 38 39 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 37 def sic_code @sic_code end |
#sites ⇒ Object
Returns the value of attribute sites.
77 78 79 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 77 def sites @sites end |
#source_list ⇒ Object
Returns the value of attribute source_list.
43 44 45 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 43 def source_list @source_list end |
#status ⇒ Object
Returns the value of attribute status.
13 14 15 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 13 def status @status end |
#tax_code ⇒ Object
Returns the value of attribute tax_code.
69 70 71 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 69 def tax_code @tax_code end |
#territory ⇒ Object
Returns the value of attribute territory.
29 30 31 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 29 def territory @territory end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
41 42 43 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 41 def time_zone @time_zone end |
#to_company_id ⇒ Object
Returns the value of attribute to_company_id.
7 8 9 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 7 def to_company_id @to_company_id end |
#type ⇒ Object
Returns the value of attribute type.
15 16 17 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 15 def type @type end |
#user_defined_field1 ⇒ Object
Returns the value of attribute user_defined_field1.
45 46 47 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 45 def user_defined_field1 @user_defined_field1 end |
#user_defined_field10 ⇒ Object
Returns the value of attribute user_defined_field10.
63 64 65 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 63 def user_defined_field10 @user_defined_field10 end |
#user_defined_field2 ⇒ Object
Returns the value of attribute user_defined_field2.
47 48 49 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 47 def user_defined_field2 @user_defined_field2 end |
#user_defined_field3 ⇒ Object
Returns the value of attribute user_defined_field3.
49 50 51 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 49 def user_defined_field3 @user_defined_field3 end |
#user_defined_field4 ⇒ Object
Returns the value of attribute user_defined_field4.
51 52 53 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 51 def user_defined_field4 @user_defined_field4 end |
#user_defined_field5 ⇒ Object
Returns the value of attribute user_defined_field5.
53 54 55 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 53 def user_defined_field5 @user_defined_field5 end |
#user_defined_field6 ⇒ Object
Returns the value of attribute user_defined_field6.
55 56 57 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 55 def user_defined_field6 @user_defined_field6 end |
#user_defined_field7 ⇒ Object
Returns the value of attribute user_defined_field7.
57 58 59 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 57 def user_defined_field7 @user_defined_field7 end |
#user_defined_field8 ⇒ Object
Returns the value of attribute user_defined_field8.
59 60 61 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 59 def user_defined_field8 @user_defined_field8 end |
#user_defined_field9 ⇒ Object
Returns the value of attribute user_defined_field9.
61 62 63 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 61 def user_defined_field9 @user_defined_field9 end |
#website ⇒ Object
Returns the value of attribute website.
25 26 27 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 25 def website @website end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 114 def self.attribute_map { :'to_company_id' => :'toCompanyId', :'name' => :'name', :'identifier' => :'identifier', :'status' => :'status', :'type' => :'type', :'primary_address' => :'primaryAddress', :'primary_contact' => :'primaryContact', :'phone' => :'phone', :'fax' => :'fax', :'website' => :'website', :'market' => :'market', :'territory' => :'territory', :'revenue' => :'revenue', :'revenue_year' => :'revenueYear', :'number_of_employees' => :'numberOfEmployees', :'sic_code' => :'sicCode', :'date_acquired' => :'dateAcquired', :'time_zone' => :'timeZone', :'source_list' => :'sourceList', :'user_defined_field1' => :'userDefinedField1', :'user_defined_field2' => :'userDefinedField2', :'user_defined_field3' => :'userDefinedField3', :'user_defined_field4' => :'userDefinedField4', :'user_defined_field5' => :'userDefinedField5', :'user_defined_field6' => :'userDefinedField6', :'user_defined_field7' => :'userDefinedField7', :'user_defined_field8' => :'userDefinedField8', :'user_defined_field9' => :'userDefinedField9', :'user_defined_field10' => :'userDefinedField10', :'billing_address' => :'billingAddress', :'billing_contact' => :'billingContact', :'tax_code' => :'taxCode', :'account_number' => :'accountNumber', :'billing_terms' => :'billingTerms', :'notes' => :'notes', :'sites' => :'sites', :'activities' => :'activities', :'opportunities' => :'opportunities', :'services' => :'services', :'projects' => :'projects', :'contacts' => :'contacts', :'documents' => :'documents' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 200 201 202 203 204 205 206 207 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 162 def self.swagger_types { :'to_company_id' => :'Integer', :'name' => :'String', :'identifier' => :'String', :'status' => :'String', :'type' => :'String', :'primary_address' => :'String', :'primary_contact' => :'String', :'phone' => :'String', :'fax' => :'String', :'website' => :'String', :'market' => :'String', :'territory' => :'String', :'revenue' => :'String', :'revenue_year' => :'String', :'number_of_employees' => :'String', :'sic_code' => :'String', :'date_acquired' => :'String', :'time_zone' => :'String', :'source_list' => :'String', :'user_defined_field1' => :'String', :'user_defined_field2' => :'String', :'user_defined_field3' => :'String', :'user_defined_field4' => :'String', :'user_defined_field5' => :'String', :'user_defined_field6' => :'String', :'user_defined_field7' => :'String', :'user_defined_field8' => :'String', :'user_defined_field9' => :'String', :'user_defined_field10' => :'String', :'billing_address' => :'String', :'billing_contact' => :'String', :'tax_code' => :'String', :'account_number' => :'String', :'billing_terms' => :'String', :'notes' => :'String', :'sites' => :'String', :'activities' => :'String', :'opportunities' => :'String', :'services' => :'String', :'projects' => :'String', :'contacts' => :'String', :'documents' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 899 def ==(o) return true if self.equal?(o) self.class == o.class && to_company_id == o.to_company_id && name == o.name && identifier == o.identifier && status == o.status && type == o.type && primary_address == o.primary_address && primary_contact == o.primary_contact && phone == o.phone && fax == o.fax && website == o.website && market == o.market && territory == o.territory && revenue == o.revenue && revenue_year == o.revenue_year && number_of_employees == o.number_of_employees && sic_code == o.sic_code && date_acquired == o.date_acquired && time_zone == o.time_zone && source_list == o.source_list && user_defined_field1 == o.user_defined_field1 && user_defined_field2 == o.user_defined_field2 && user_defined_field3 == o.user_defined_field3 && user_defined_field4 == o.user_defined_field4 && user_defined_field5 == o.user_defined_field5 && user_defined_field6 == o.user_defined_field6 && user_defined_field7 == o.user_defined_field7 && user_defined_field8 == o.user_defined_field8 && user_defined_field9 == o.user_defined_field9 && user_defined_field10 == o.user_defined_field10 && billing_address == o.billing_address && billing_contact == o.billing_contact && tax_code == o.tax_code && account_number == o.account_number && billing_terms == o.billing_terms && notes == o.notes && sites == o.sites && activities == o.activities && opportunities == o.opportunities && services == o.services && projects == o.projects && contacts == o.contacts && documents == o.documents end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 982 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 = ConnectWise.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
1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 1048 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
961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 961 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 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
948 949 950 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 948 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
954 955 956 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 954 def hash [to_company_id, name, identifier, status, type, primary_address, primary_contact, phone, fax, website, market, territory, revenue, revenue_year, number_of_employees, sic_code, date_acquired, time_zone, source_list, user_defined_field1, user_defined_field2, user_defined_field3, user_defined_field4, user_defined_field5, user_defined_field6, user_defined_field7, user_defined_field8, user_defined_field9, user_defined_field10, billing_address, billing_contact, tax_code, account_number, billing_terms, notes, sites, activities, opportunities, services, projects, contacts, documents].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
389 390 391 392 393 394 395 396 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 389 def list_invalid_properties invalid_properties = Array.new if @to_company_id.nil? invalid_properties.push("invalid value for 'to_company_id', to_company_id cannot be nil.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
1028 1029 1030 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 1028 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
1034 1035 1036 1037 1038 1039 1040 1041 1042 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 1034 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_s ⇒ String
Returns the string representation of the object
1022 1023 1024 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 1022 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
400 401 402 403 404 405 406 407 408 409 410 411 412 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 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/connectwise-ruby-sdk/models/company_merge.rb', line 400 def valid? return false if @to_company_id.nil? name_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless name_validator.valid?(@name) identifier_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless identifier_validator.valid?(@identifier) status_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless status_validator.valid?(@status) type_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless type_validator.valid?(@type) primary_address_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless primary_address_validator.valid?(@primary_address) primary_contact_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless primary_contact_validator.valid?(@primary_contact) phone_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless phone_validator.valid?(@phone) fax_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless fax_validator.valid?(@fax) website_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless website_validator.valid?(@website) market_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless market_validator.valid?(@market) territory_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless territory_validator.valid?(@territory) revenue_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless revenue_validator.valid?(@revenue) revenue_year_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless revenue_year_validator.valid?(@revenue_year) number_of_employees_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless number_of_employees_validator.valid?(@number_of_employees) sic_code_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless sic_code_validator.valid?(@sic_code) date_acquired_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless date_acquired_validator.valid?(@date_acquired) time_zone_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless time_zone_validator.valid?(@time_zone) source_list_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless source_list_validator.valid?(@source_list) user_defined_field1_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless user_defined_field1_validator.valid?(@user_defined_field1) user_defined_field2_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless user_defined_field2_validator.valid?(@user_defined_field2) user_defined_field3_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless user_defined_field3_validator.valid?(@user_defined_field3) user_defined_field4_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless user_defined_field4_validator.valid?(@user_defined_field4) user_defined_field5_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless user_defined_field5_validator.valid?(@user_defined_field5) user_defined_field6_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless user_defined_field6_validator.valid?(@user_defined_field6) user_defined_field7_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless user_defined_field7_validator.valid?(@user_defined_field7) user_defined_field8_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless user_defined_field8_validator.valid?(@user_defined_field8) user_defined_field9_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless user_defined_field9_validator.valid?(@user_defined_field9) user_defined_field10_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless user_defined_field10_validator.valid?(@user_defined_field10) billing_address_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless billing_address_validator.valid?(@billing_address) billing_contact_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless billing_contact_validator.valid?(@billing_contact) tax_code_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless tax_code_validator.valid?(@tax_code) account_number_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless account_number_validator.valid?(@account_number) billing_terms_validator = EnumAttributeValidator.new('String', ["From", "To"]) return false unless billing_terms_validator.valid?(@billing_terms) notes_validator = EnumAttributeValidator.new('String', ["Discard", "Merge"]) return false unless notes_validator.valid?(@notes) sites_validator = EnumAttributeValidator.new('String', ["Discard", "Merge"]) return false unless sites_validator.valid?(@sites) activities_validator = EnumAttributeValidator.new('String', ["Discard", "Merge"]) return false unless activities_validator.valid?(@activities) opportunities_validator = EnumAttributeValidator.new('String', ["Discard", "Merge"]) return false unless opportunities_validator.valid?(@opportunities) services_validator = EnumAttributeValidator.new('String', ["Discard", "Merge"]) return false unless services_validator.valid?(@services) projects_validator = EnumAttributeValidator.new('String', ["Discard", "Merge"]) return false unless projects_validator.valid?(@projects) contacts_validator = EnumAttributeValidator.new('String', ["Discard", "Merge"]) return false unless contacts_validator.valid?(@contacts) documents_validator = EnumAttributeValidator.new('String', ["Discard", "Merge"]) return false unless documents_validator.valid?(@documents) return true end |