Class: ConnectWise::Company
- Inherits:
-
Object
- Object
- ConnectWise::Company
- Defined in:
- lib/connect_wise/models/company.rb
Instance Attribute Summary collapse
-
#_info ⇒ Object
Returns the value of attribute _info.
-
#account_number ⇒ Object
Returns the value of attribute account_number.
-
#address_line1 ⇒ Object
At least one address field is required – addressLine1, addressLine2, city, state, zip and/or country Max length: 50;.
-
#address_line2 ⇒ Object
At least one address field is required – addressLine1, addressLine2, city, state, zip and/or country Max length: 50;.
-
#annual_revenue ⇒ Object
Returns the value of attribute annual_revenue.
-
#bill_to_company ⇒ Object
Returns the value of attribute bill_to_company.
-
#billing_contact ⇒ Object
Returns the value of attribute billing_contact.
-
#billing_site ⇒ Object
Returns the value of attribute billing_site.
-
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
-
#calendar ⇒ Object
Returns the value of attribute calendar.
-
#city ⇒ Object
At least one address field is required – addressLine1, addressLine2, city, state, zip and/or country Max length: 50;.
-
#company_entity_type ⇒ Object
Returns the value of attribute company_entity_type.
-
#country ⇒ Object
Returns the value of attribute country.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
-
#date_acquired ⇒ Object
Returns the value of attribute date_acquired.
-
#date_deleted ⇒ Object
Returns the value of attribute date_deleted.
-
#default_contact ⇒ Object
Returns the value of attribute default_contact.
-
#deleted_by ⇒ Object
Returns the value of attribute deleted_by.
-
#deleted_flag ⇒ Object
Returns the value of attribute deleted_flag.
-
#facebook_url ⇒ Object
Returns the value of attribute facebook_url.
-
#fax_number ⇒ Object
Max length: 30;.
-
#id ⇒ Object
Returns the value of attribute id.
-
#identifier ⇒ Object
Max length: 25;.
-
#integrator_tags ⇒ Object
Returns the value of attribute integrator_tags.
-
#invoice_cc_email_address ⇒ Object
Returns the value of attribute invoice_cc_email_address.
-
#invoice_delivery_method ⇒ Object
Returns the value of attribute invoice_delivery_method.
-
#invoice_template ⇒ Object
Returns the value of attribute invoice_template.
-
#invoice_to_email_address ⇒ Object
Returns the value of attribute invoice_to_email_address.
-
#is_vendor_flag ⇒ Object
Returns the value of attribute is_vendor_flag.
-
#lead_flag ⇒ Object
Returns the value of attribute lead_flag.
-
#lead_source ⇒ Object
Max length: 50;.
-
#linked_in_url ⇒ Object
Returns the value of attribute linked_in_url.
-
#market ⇒ Object
Returns the value of attribute market.
-
#mobile_guid ⇒ Object
Returns the value of attribute mobile_guid.
-
#name ⇒ Object
Max length: 50;.
-
#number_of_employees ⇒ Object
Returns the value of attribute number_of_employees.
-
#ownership_type ⇒ Object
Returns the value of attribute ownership_type.
-
#parent_company ⇒ Object
Returns the value of attribute parent_company.
-
#phone_number ⇒ Object
Max length: 30;.
-
#pricing_schedule ⇒ Object
Returns the value of attribute pricing_schedule.
-
#reseller_identifier ⇒ Object
Returns the value of attribute reseller_identifier.
-
#revenue_year ⇒ Object
Returns the value of attribute revenue_year.
-
#sic_code ⇒ Object
Returns the value of attribute sic_code.
-
#site ⇒ Object
Returns the value of attribute site.
-
#state ⇒ Object
At least one address field is required – addressLine1, addressLine2, city, state, zip and/or country Max length: 50;.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tax_code ⇒ Object
Returns the value of attribute tax_code.
-
#tax_identifier ⇒ Object
Returns the value of attribute tax_identifier.
-
#territory ⇒ Object
Returns the value of attribute territory.
-
#territory_manager ⇒ Object
Returns the value of attribute territory_manager.
-
#time_zone_setup ⇒ Object
Returns the value of attribute time_zone_setup.
-
#twitter_url ⇒ Object
Returns the value of attribute twitter_url.
-
#types ⇒ Object
Integrer array of Company_Type_Recids to be assigned to company that can be passed in only during new company creation (post) To update existing companies type, use the /company/companyTypeAssociations or /company/companies/ID/typeAssociations endpoints.
-
#unsubscribe_flag ⇒ Object
Returns the value of attribute unsubscribe_flag.
-
#user_defined_field1 ⇒ Object
Max length: 50;.
-
#user_defined_field10 ⇒ Object
Max length: 50;.
-
#user_defined_field2 ⇒ Object
Max length: 50;.
-
#user_defined_field3 ⇒ Object
Max length: 50;.
-
#user_defined_field4 ⇒ Object
Max length: 50;.
-
#user_defined_field5 ⇒ Object
Max length: 50;.
-
#user_defined_field6 ⇒ Object
Max length: 50;.
-
#user_defined_field7 ⇒ Object
Max length: 50;.
-
#user_defined_field8 ⇒ Object
Max length: 50;.
-
#user_defined_field9 ⇒ Object
Max length: 50;.
-
#vendor_identifier ⇒ Object
Returns the value of attribute vendor_identifier.
-
#website ⇒ Object
Max length: 255;.
-
#year_established ⇒ Object
Returns the value of attribute year_established.
-
#zip ⇒ Object
At least one address field is required – addressLine1, addressLine2, city, state, zip and/or country Max length: 12;.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ 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?(other) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Company
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 = {}) ⇒ Company
Initializes the object
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 410 411 412 |
# File 'lib/connect_wise/models/company.rb', line 256 def initialize(attributes = {}) raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::Company` initialize method' unless attributes.is_a?(Hash) # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) do |(k, v), h| raise ArgumentError, "`#{k}` is not a valid attribute in `ConnectWise::Company`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym) h[k.to_sym] = v end self.identifier = attributes[:identifier] if attributes.key?(:identifier) self.name = attributes[:name] if attributes.key?(:name) self.id = attributes[:id] if attributes.key?(:id) self.status = attributes[:status] if attributes.key?(:status) self.address_line1 = attributes[:address_line1] if attributes.key?(:address_line1) self.address_line2 = attributes[:address_line2] if attributes.key?(:address_line2) self.city = attributes[:city] if attributes.key?(:city) self.state = attributes[:state] if attributes.key?(:state) self.zip = attributes[:zip] if attributes.key?(:zip) self.country = attributes[:country] if attributes.key?(:country) self.phone_number = attributes[:phone_number] if attributes.key?(:phone_number) self.fax_number = attributes[:fax_number] if attributes.key?(:fax_number) self.website = attributes[:website] if attributes.key?(:website) self.territory = attributes[:territory] if attributes.key?(:territory) self.market = attributes[:market] if attributes.key?(:market) self.account_number = attributes[:account_number] if attributes.key?(:account_number) self.default_contact = attributes[:default_contact] if attributes.key?(:default_contact) self.date_acquired = attributes[:date_acquired] if attributes.key?(:date_acquired) self.sic_code = attributes[:sic_code] if attributes.key?(:sic_code) self.parent_company = attributes[:parent_company] if attributes.key?(:parent_company) self.annual_revenue = attributes[:annual_revenue] if attributes.key?(:annual_revenue) self.number_of_employees = attributes[:number_of_employees] if attributes.key?(:number_of_employees) self.year_established = attributes[:year_established] if attributes.key?(:year_established) self.revenue_year = attributes[:revenue_year] if attributes.key?(:revenue_year) self.ownership_type = attributes[:ownership_type] if attributes.key?(:ownership_type) self.time_zone_setup = attributes[:time_zone_setup] if attributes.key?(:time_zone_setup) self.lead_source = attributes[:lead_source] if attributes.key?(:lead_source) self.lead_flag = attributes[:lead_flag] if attributes.key?(:lead_flag) self.unsubscribe_flag = attributes[:unsubscribe_flag] if attributes.key?(:unsubscribe_flag) self.calendar = attributes[:calendar] if attributes.key?(:calendar) self.user_defined_field1 = attributes[:user_defined_field1] if attributes.key?(:user_defined_field1) self.user_defined_field2 = attributes[:user_defined_field2] if attributes.key?(:user_defined_field2) self.user_defined_field3 = attributes[:user_defined_field3] if attributes.key?(:user_defined_field3) self.user_defined_field4 = attributes[:user_defined_field4] if attributes.key?(:user_defined_field4) self.user_defined_field5 = attributes[:user_defined_field5] if attributes.key?(:user_defined_field5) self.user_defined_field6 = attributes[:user_defined_field6] if attributes.key?(:user_defined_field6) self.user_defined_field7 = attributes[:user_defined_field7] if attributes.key?(:user_defined_field7) self.user_defined_field8 = attributes[:user_defined_field8] if attributes.key?(:user_defined_field8) self.user_defined_field9 = attributes[:user_defined_field9] if attributes.key?(:user_defined_field9) self.user_defined_field10 = attributes[:user_defined_field10] if attributes.key?(:user_defined_field10) self.vendor_identifier = attributes[:vendor_identifier] if attributes.key?(:vendor_identifier) self.tax_identifier = attributes[:tax_identifier] if attributes.key?(:tax_identifier) self.tax_code = attributes[:tax_code] if attributes.key?(:tax_code) self.billing_terms = attributes[:billing_terms] if attributes.key?(:billing_terms) self.invoice_template = attributes[:invoice_template] if attributes.key?(:invoice_template) self.pricing_schedule = attributes[:pricing_schedule] if attributes.key?(:pricing_schedule) self.company_entity_type = attributes[:company_entity_type] if attributes.key?(:company_entity_type) self.bill_to_company = attributes[:bill_to_company] if attributes.key?(:bill_to_company) self.billing_site = attributes[:billing_site] if attributes.key?(:billing_site) self.billing_contact = attributes[:billing_contact] if attributes.key?(:billing_contact) self.invoice_delivery_method = attributes[:invoice_delivery_method] if attributes.key?(:invoice_delivery_method) self.invoice_to_email_address = attributes[:invoice_to_email_address] if attributes.key?(:invoice_to_email_address) self.invoice_cc_email_address = attributes[:invoice_cc_email_address] if attributes.key?(:invoice_cc_email_address) self.deleted_flag = attributes[:deleted_flag] if attributes.key?(:deleted_flag) self.date_deleted = attributes[:date_deleted] if attributes.key?(:date_deleted) self.deleted_by = attributes[:deleted_by] if attributes.key?(:deleted_by) self.mobile_guid = attributes[:mobile_guid] if attributes.key?(:mobile_guid) self.facebook_url = attributes[:facebook_url] if attributes.key?(:facebook_url) self.twitter_url = attributes[:twitter_url] if attributes.key?(:twitter_url) self.linked_in_url = attributes[:linked_in_url] if attributes.key?(:linked_in_url) self.currency = attributes[:currency] if attributes.key?(:currency) self.territory_manager = attributes[:territory_manager] if attributes.key?(:territory_manager) self.reseller_identifier = attributes[:reseller_identifier] if attributes.key?(:reseller_identifier) self.is_vendor_flag = attributes[:is_vendor_flag] if attributes.key?(:is_vendor_flag) if attributes.key?(:types) && (value = attributes[:types]).is_a?(Array) self.types = value end self.site = attributes[:site] if attributes.key?(:site) if attributes.key?(:integrator_tags) && (value = attributes[:integrator_tags]).is_a?(Array) self. = value end if attributes.key?(:_info) && (value = attributes[:_info]).is_a?(Hash) self._info = value end return unless attributes.key?(:custom_fields) return unless (value = attributes[:custom_fields]).is_a?(Array) self.custom_fields = value end |
Instance Attribute Details
#_info ⇒ Object
Returns the value of attribute _info.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def _info @_info end |
#account_number ⇒ Object
Returns the value of attribute account_number.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def account_number @account_number end |
#address_line1 ⇒ Object
At least one address field is required – addressLine1, addressLine2, city, state, zip and/or country Max length: 50;
25 26 27 |
# File 'lib/connect_wise/models/company.rb', line 25 def address_line1 @address_line1 end |
#address_line2 ⇒ Object
At least one address field is required – addressLine1, addressLine2, city, state, zip and/or country Max length: 50;
28 29 30 |
# File 'lib/connect_wise/models/company.rb', line 28 def address_line2 @address_line2 end |
#annual_revenue ⇒ Object
Returns the value of attribute annual_revenue.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def annual_revenue @annual_revenue end |
#bill_to_company ⇒ Object
Returns the value of attribute bill_to_company.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def bill_to_company @bill_to_company end |
#billing_contact ⇒ Object
Returns the value of attribute billing_contact.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def billing_contact @billing_contact end |
#billing_site ⇒ Object
Returns the value of attribute billing_site.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def billing_site @billing_site end |
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def billing_terms @billing_terms end |
#calendar ⇒ Object
Returns the value of attribute calendar.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def calendar @calendar end |
#city ⇒ Object
At least one address field is required – addressLine1, addressLine2, city, state, zip and/or country Max length: 50;
31 32 33 |
# File 'lib/connect_wise/models/company.rb', line 31 def city @city end |
#company_entity_type ⇒ Object
Returns the value of attribute company_entity_type.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def company_entity_type @company_entity_type end |
#country ⇒ Object
Returns the value of attribute country.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def country @country end |
#currency ⇒ Object
Returns the value of attribute currency.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def currency @currency end |
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def custom_fields @custom_fields end |
#date_acquired ⇒ Object
Returns the value of attribute date_acquired.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def date_acquired @date_acquired end |
#date_deleted ⇒ Object
Returns the value of attribute date_deleted.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def date_deleted @date_deleted end |
#default_contact ⇒ Object
Returns the value of attribute default_contact.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def default_contact @default_contact end |
#deleted_by ⇒ Object
Returns the value of attribute deleted_by.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def deleted_by @deleted_by end |
#deleted_flag ⇒ Object
Returns the value of attribute deleted_flag.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def deleted_flag @deleted_flag end |
#facebook_url ⇒ Object
Returns the value of attribute facebook_url.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def facebook_url @facebook_url end |
#fax_number ⇒ Object
Max length: 30;
43 44 45 |
# File 'lib/connect_wise/models/company.rb', line 43 def fax_number @fax_number end |
#id ⇒ Object
Returns the value of attribute id.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def id @id end |
#identifier ⇒ Object
Max length: 25;
17 18 19 |
# File 'lib/connect_wise/models/company.rb', line 17 def identifier @identifier end |
#integrator_tags ⇒ Object
Returns the value of attribute integrator_tags.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def @integrator_tags end |
#invoice_cc_email_address ⇒ Object
Returns the value of attribute invoice_cc_email_address.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def invoice_cc_email_address @invoice_cc_email_address end |
#invoice_delivery_method ⇒ Object
Returns the value of attribute invoice_delivery_method.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def invoice_delivery_method @invoice_delivery_method end |
#invoice_template ⇒ Object
Returns the value of attribute invoice_template.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def invoice_template @invoice_template end |
#invoice_to_email_address ⇒ Object
Returns the value of attribute invoice_to_email_address.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def invoice_to_email_address @invoice_to_email_address end |
#is_vendor_flag ⇒ Object
Returns the value of attribute is_vendor_flag.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def is_vendor_flag @is_vendor_flag end |
#lead_flag ⇒ Object
Returns the value of attribute lead_flag.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def lead_flag @lead_flag end |
#lead_source ⇒ Object
Max length: 50;
49 50 51 |
# File 'lib/connect_wise/models/company.rb', line 49 def lead_source @lead_source end |
#linked_in_url ⇒ Object
Returns the value of attribute linked_in_url.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def linked_in_url @linked_in_url end |
#market ⇒ Object
Returns the value of attribute market.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def market @market end |
#mobile_guid ⇒ Object
Returns the value of attribute mobile_guid.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def mobile_guid @mobile_guid end |
#name ⇒ Object
Max length: 50;
20 21 22 |
# File 'lib/connect_wise/models/company.rb', line 20 def name @name end |
#number_of_employees ⇒ Object
Returns the value of attribute number_of_employees.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def number_of_employees @number_of_employees end |
#ownership_type ⇒ Object
Returns the value of attribute ownership_type.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def ownership_type @ownership_type end |
#parent_company ⇒ Object
Returns the value of attribute parent_company.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def parent_company @parent_company end |
#phone_number ⇒ Object
Max length: 30;
40 41 42 |
# File 'lib/connect_wise/models/company.rb', line 40 def phone_number @phone_number end |
#pricing_schedule ⇒ Object
Returns the value of attribute pricing_schedule.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def pricing_schedule @pricing_schedule end |
#reseller_identifier ⇒ Object
Returns the value of attribute reseller_identifier.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def reseller_identifier @reseller_identifier end |
#revenue_year ⇒ Object
Returns the value of attribute revenue_year.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def revenue_year @revenue_year end |
#sic_code ⇒ Object
Returns the value of attribute sic_code.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def sic_code @sic_code end |
#site ⇒ Object
Returns the value of attribute site.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def site @site end |
#state ⇒ Object
At least one address field is required – addressLine1, addressLine2, city, state, zip and/or country Max length: 50;
34 35 36 |
# File 'lib/connect_wise/models/company.rb', line 34 def state @state end |
#status ⇒ Object
Returns the value of attribute status.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def status @status end |
#tax_code ⇒ Object
Returns the value of attribute tax_code.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def tax_code @tax_code end |
#tax_identifier ⇒ Object
Returns the value of attribute tax_identifier.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def tax_identifier @tax_identifier end |
#territory ⇒ Object
Returns the value of attribute territory.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def territory @territory end |
#territory_manager ⇒ Object
Returns the value of attribute territory_manager.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def territory_manager @territory_manager end |
#time_zone_setup ⇒ Object
Returns the value of attribute time_zone_setup.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def time_zone_setup @time_zone_setup end |
#twitter_url ⇒ Object
Returns the value of attribute twitter_url.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def twitter_url @twitter_url end |
#types ⇒ Object
Integrer array of Company_Type_Recids to be assigned to company that can be passed in only during new company creation (post) To update existing companies type, use the /company/companyTypeAssociations or /company/companies/ID/typeAssociations endpoints
82 83 84 |
# File 'lib/connect_wise/models/company.rb', line 82 def types @types end |
#unsubscribe_flag ⇒ Object
Returns the value of attribute unsubscribe_flag.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def unsubscribe_flag @unsubscribe_flag end |
#user_defined_field1 ⇒ Object
Max length: 50;
52 53 54 |
# File 'lib/connect_wise/models/company.rb', line 52 def user_defined_field1 @user_defined_field1 end |
#user_defined_field10 ⇒ Object
Max length: 50;
79 80 81 |
# File 'lib/connect_wise/models/company.rb', line 79 def user_defined_field10 @user_defined_field10 end |
#user_defined_field2 ⇒ Object
Max length: 50;
55 56 57 |
# File 'lib/connect_wise/models/company.rb', line 55 def user_defined_field2 @user_defined_field2 end |
#user_defined_field3 ⇒ Object
Max length: 50;
58 59 60 |
# File 'lib/connect_wise/models/company.rb', line 58 def user_defined_field3 @user_defined_field3 end |
#user_defined_field4 ⇒ Object
Max length: 50;
61 62 63 |
# File 'lib/connect_wise/models/company.rb', line 61 def user_defined_field4 @user_defined_field4 end |
#user_defined_field5 ⇒ Object
Max length: 50;
64 65 66 |
# File 'lib/connect_wise/models/company.rb', line 64 def user_defined_field5 @user_defined_field5 end |
#user_defined_field6 ⇒ Object
Max length: 50;
67 68 69 |
# File 'lib/connect_wise/models/company.rb', line 67 def user_defined_field6 @user_defined_field6 end |
#user_defined_field7 ⇒ Object
Max length: 50;
70 71 72 |
# File 'lib/connect_wise/models/company.rb', line 70 def user_defined_field7 @user_defined_field7 end |
#user_defined_field8 ⇒ Object
Max length: 50;
73 74 75 |
# File 'lib/connect_wise/models/company.rb', line 73 def user_defined_field8 @user_defined_field8 end |
#user_defined_field9 ⇒ Object
Max length: 50;
76 77 78 |
# File 'lib/connect_wise/models/company.rb', line 76 def user_defined_field9 @user_defined_field9 end |
#vendor_identifier ⇒ Object
Returns the value of attribute vendor_identifier.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def vendor_identifier @vendor_identifier end |
#website ⇒ Object
Max length: 255;
46 47 48 |
# File 'lib/connect_wise/models/company.rb', line 46 def website @website end |
#year_established ⇒ Object
Returns the value of attribute year_established.
22 23 24 |
# File 'lib/connect_wise/models/company.rb', line 22 def year_established @year_established end |
#zip ⇒ Object
At least one address field is required – addressLine1, addressLine2, city, state, zip and/or country Max length: 12;
37 38 39 |
# File 'lib/connect_wise/models/company.rb', line 37 def zip @zip end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
160 161 162 |
# File 'lib/connect_wise/models/company.rb', line 160 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/connect_wise/models/company.rb', line 85 def self.attribute_map { identifier: :identifier, name: :name, id: :id, status: :status, address_line1: :addressLine1, address_line2: :addressLine2, city: :city, state: :state, zip: :zip, country: :country, phone_number: :phoneNumber, fax_number: :faxNumber, website: :website, territory: :territory, market: :market, account_number: :accountNumber, default_contact: :defaultContact, date_acquired: :dateAcquired, sic_code: :sicCode, parent_company: :parentCompany, annual_revenue: :annualRevenue, number_of_employees: :numberOfEmployees, year_established: :yearEstablished, revenue_year: :revenueYear, ownership_type: :ownershipType, time_zone_setup: :timeZoneSetup, lead_source: :leadSource, lead_flag: :leadFlag, unsubscribe_flag: :unsubscribeFlag, calendar: :calendar, 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, vendor_identifier: :vendorIdentifier, tax_identifier: :taxIdentifier, tax_code: :taxCode, billing_terms: :billingTerms, invoice_template: :invoiceTemplate, pricing_schedule: :pricingSchedule, company_entity_type: :companyEntityType, bill_to_company: :billToCompany, billing_site: :billingSite, billing_contact: :billingContact, invoice_delivery_method: :invoiceDeliveryMethod, invoice_to_email_address: :invoiceToEmailAddress, invoice_cc_email_address: :invoiceCCEmailAddress, deleted_flag: :deletedFlag, date_deleted: :dateDeleted, deleted_by: :deletedBy, mobile_guid: :mobileGuid, facebook_url: :facebookUrl, twitter_url: :twitterUrl, linked_in_url: :linkedInUrl, currency: :currency, territory_manager: :territoryManager, reseller_identifier: :resellerIdentifier, is_vendor_flag: :isVendorFlag, types: :types, site: :site, integrator_tags: :integratorTags, _info: :_info, custom_fields: :customFields } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
526 527 528 |
# File 'lib/connect_wise/models/company.rb', line 526 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/connect_wise/models/company.rb', line 240 def self.openapi_nullable Set.new(%i[ annual_revenue number_of_employees year_established revenue_year lead_flag unsubscribe_flag deleted_flag mobile_guid is_vendor_flag ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 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 |
# File 'lib/connect_wise/models/company.rb', line 165 def self.openapi_types { identifier: :String, name: :String, id: :Integer, status: :CompanyStatusReference, address_line1: :String, address_line2: :String, city: :String, state: :String, zip: :String, country: :CountryReference, phone_number: :String, fax_number: :String, website: :String, territory: :SystemLocationReference, market: :MarketDescriptionReference, account_number: :String, default_contact: :ContactReference, date_acquired: :Time, sic_code: :SicCodeReference, parent_company: :CompanyReference, annual_revenue: :Float, number_of_employees: :Integer, year_established: :Integer, revenue_year: :Integer, ownership_type: :OwnershipTypeReference, time_zone_setup: :TimeZoneSetupReference, lead_source: :String, lead_flag: :Boolean, unsubscribe_flag: :Boolean, calendar: :CalendarReference, 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, vendor_identifier: :String, tax_identifier: :String, tax_code: :TaxCodeReference, billing_terms: :BillingTermsReference, invoice_template: :InvoiceTemplateReference, pricing_schedule: :PricingScheduleReference, company_entity_type: :EntityTypeReference, bill_to_company: :CompanyReference, billing_site: :SiteReference, billing_contact: :ContactReference, invoice_delivery_method: :BillingDeliveryReference, invoice_to_email_address: :String, invoice_cc_email_address: :String, deleted_flag: :Boolean, date_deleted: :Time, deleted_by: :String, mobile_guid: :String, facebook_url: :String, twitter_url: :String, linked_in_url: :String, currency: :CurrencyReference, territory_manager: :MemberReference, reseller_identifier: :String, is_vendor_flag: :Boolean, types: :'Array<CompanyTypeReference>', site: :SiteReference, integrator_tags: :'Array<String>', _info: :'Hash<String, String>', custom_fields: :'Array<CustomFieldValue>' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/connect_wise/models/company.rb', line 436 def ==(other) return true if equal?(other) self.class == other.class && identifier == other.identifier && name == other.name && id == other.id && status == other.status && address_line1 == other.address_line1 && address_line2 == other.address_line2 && city == other.city && state == other.state && zip == other.zip && country == other.country && phone_number == other.phone_number && fax_number == other.fax_number && website == other.website && territory == other.territory && market == other.market && account_number == other.account_number && default_contact == other.default_contact && date_acquired == other.date_acquired && sic_code == other.sic_code && parent_company == other.parent_company && annual_revenue == other.annual_revenue && number_of_employees == other.number_of_employees && year_established == other.year_established && revenue_year == other.revenue_year && ownership_type == other.ownership_type && time_zone_setup == other.time_zone_setup && lead_source == other.lead_source && lead_flag == other.lead_flag && unsubscribe_flag == other.unsubscribe_flag && calendar == other.calendar && user_defined_field1 == other.user_defined_field1 && user_defined_field2 == other.user_defined_field2 && user_defined_field3 == other.user_defined_field3 && user_defined_field4 == other.user_defined_field4 && user_defined_field5 == other.user_defined_field5 && user_defined_field6 == other.user_defined_field6 && user_defined_field7 == other.user_defined_field7 && user_defined_field8 == other.user_defined_field8 && user_defined_field9 == other.user_defined_field9 && user_defined_field10 == other.user_defined_field10 && vendor_identifier == other.vendor_identifier && tax_identifier == other.tax_identifier && tax_code == other.tax_code && billing_terms == other.billing_terms && invoice_template == other.invoice_template && pricing_schedule == other.pricing_schedule && company_entity_type == other.company_entity_type && bill_to_company == other.bill_to_company && billing_site == other.billing_site && billing_contact == other.billing_contact && invoice_delivery_method == other.invoice_delivery_method && invoice_to_email_address == other.invoice_to_email_address && invoice_cc_email_address == other.invoice_cc_email_address && deleted_flag == other.deleted_flag && date_deleted == other.date_deleted && deleted_by == other.deleted_by && mobile_guid == other.mobile_guid && facebook_url == other.facebook_url && twitter_url == other.twitter_url && linked_in_url == other.linked_in_url && currency == other.currency && territory_manager == other.territory_manager && reseller_identifier == other.reseller_identifier && is_vendor_flag == other.is_vendor_flag && types == other.types && site == other.site && == other. && _info == other._info && custom_fields == other.custom_fields end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 591 592 593 |
# File 'lib/connect_wise/models/company.rb', line 556 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = ConnectWise.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
627 628 629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/connect_wise/models/company.rb', line 627 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
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/connect_wise/models/company.rb', line 533 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) }) if attributes[self.class.attribute_map[key]].is_a?(Array) elsif !attributes[self.class.attribute_map[key]].nil? send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(other) ⇒ Boolean
513 514 515 |
# File 'lib/connect_wise/models/company.rb', line 513 def eql?(other) self == other end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
519 520 521 |
# File 'lib/connect_wise/models/company.rb', line 519 def hash [identifier, name, id, status, address_line1, address_line2, city, state, zip, country, phone_number, fax_number, website, territory, market, account_number, default_contact, date_acquired, sic_code, parent_company, annual_revenue, number_of_employees, year_established, revenue_year, ownership_type, time_zone_setup, lead_source, lead_flag, unsubscribe_flag, calendar, 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, vendor_identifier, tax_identifier, tax_code, billing_terms, invoice_template, pricing_schedule, company_entity_type, bill_to_company, billing_site, billing_contact, invoice_delivery_method, invoice_to_email_address, invoice_cc_email_address, deleted_flag, date_deleted, deleted_by, mobile_guid, facebook_url, twitter_url, linked_in_url, currency, territory_manager, reseller_identifier, is_vendor_flag, types, site, , _info, custom_fields].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
416 417 418 419 420 421 422 423 |
# File 'lib/connect_wise/models/company.rb', line 416 def list_invalid_properties invalid_properties = [] invalid_properties.push('invalid value for "identifier", identifier cannot be nil.') if @identifier.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') if @name.nil? invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
603 604 605 |
# File 'lib/connect_wise/models/company.rb', line 603 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
609 610 611 612 613 614 615 616 617 618 619 620 621 |
# File 'lib/connect_wise/models/company.rb', line 609 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
597 598 599 |
# File 'lib/connect_wise/models/company.rb', line 597 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
427 428 429 430 431 432 |
# File 'lib/connect_wise/models/company.rb', line 427 def valid? return false if @identifier.nil? return false if @name.nil? true end |