Class: ConnectWise::Order
- Inherits:
-
Object
- Object
- ConnectWise::Order
- Defined in:
- lib/connectwise-ruby-sdk/models/order.rb
Instance Attribute Summary collapse
-
#_info ⇒ Object
Metadata of the entity.
-
#bill_closed_flag ⇒ Object
Returns the value of attribute bill_closed_flag.
-
#bill_shipped_flag ⇒ Object
Returns the value of attribute bill_shipped_flag.
-
#bill_to_company ⇒ Object
Returns the value of attribute bill_to_company.
-
#bill_to_contact ⇒ Object
Returns the value of attribute bill_to_contact.
-
#bill_to_site ⇒ Object
Returns the value of attribute bill_to_site.
-
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
-
#bottom_comment_flag ⇒ Object
Returns the value of attribute bottom_comment_flag.
-
#business_unit_id ⇒ Object
Returns the value of attribute business_unit_id.
-
#company ⇒ Object
Returns the value of attribute company.
-
#config_ids ⇒ Object
Returns the value of attribute config_ids.
-
#contact ⇒ Object
Returns the value of attribute contact.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#description ⇒ Object
Returns the value of attribute description.
-
#document_ids ⇒ Object
Returns the value of attribute document_ids.
-
#due_date ⇒ Object
Returns the value of attribute due_date.
-
#email ⇒ Object
Returns the value of attribute email.
-
#id ⇒ Object
Returns the value of attribute id.
-
#invoice_ids ⇒ Object
Returns the value of attribute invoice_ids.
-
#location_id ⇒ Object
Returns the value of attribute location_id.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#opportunity ⇒ Object
Returns the value of attribute opportunity.
-
#order_date ⇒ Object
Returns the value of attribute order_date.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#phone_ext ⇒ Object
Returns the value of attribute phone_ext.
-
#po_number ⇒ Object
Returns the value of attribute po_number.
-
#product_ids ⇒ Object
Returns the value of attribute product_ids.
-
#restrict_downpayment_flag ⇒ Object
Returns the value of attribute restrict_downpayment_flag.
-
#sales_rep ⇒ Object
Returns the value of attribute sales_rep.
-
#ship_to_company ⇒ Object
Returns the value of attribute ship_to_company.
-
#ship_to_contact ⇒ Object
Returns the value of attribute ship_to_contact.
-
#ship_to_site ⇒ Object
Returns the value of attribute ship_to_site.
-
#site ⇒ Object
Returns the value of attribute site.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tax_code ⇒ Object
Returns the value of attribute tax_code.
-
#tax_total ⇒ Object
Returns the value of attribute tax_total.
-
#top_comment_flag ⇒ Object
Returns the value of attribute top_comment_flag.
-
#total ⇒ Object
Returns the value of attribute total.
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 = {}) ⇒ Order
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 = {}) ⇒ Order
Initializes the object
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 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 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 175 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?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'company') self.company = attributes[:'company'] end if attributes.has_key?(:'contact') self.contact = attributes[:'contact'] end if attributes.has_key?(:'phone') self.phone = attributes[:'phone'] end if attributes.has_key?(:'phoneExt') self.phone_ext = attributes[:'phoneExt'] end if attributes.has_key?(:'email') self.email = attributes[:'email'] end if attributes.has_key?(:'site') self.site = attributes[:'site'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'opportunity') self.opportunity = attributes[:'opportunity'] end if attributes.has_key?(:'orderDate') self.order_date = attributes[:'orderDate'] end if attributes.has_key?(:'dueDate') self.due_date = attributes[:'dueDate'] end if attributes.has_key?(:'billingTerms') self.billing_terms = attributes[:'billingTerms'] end if attributes.has_key?(:'taxCode') self.tax_code = attributes[:'taxCode'] end if attributes.has_key?(:'poNumber') self.po_number = attributes[:'poNumber'] end if attributes.has_key?(:'locationId') self.location_id = attributes[:'locationId'] end if attributes.has_key?(:'businessUnitId') self.business_unit_id = attributes[:'businessUnitId'] end if attributes.has_key?(:'salesRep') self.sales_rep = attributes[:'salesRep'] end if attributes.has_key?(:'notes') self.notes = attributes[:'notes'] end if attributes.has_key?(:'billClosedFlag') self.bill_closed_flag = attributes[:'billClosedFlag'] end if attributes.has_key?(:'billShippedFlag') self.bill_shipped_flag = attributes[:'billShippedFlag'] end if attributes.has_key?(:'restrictDownpaymentFlag') self.restrict_downpayment_flag = attributes[:'restrictDownpaymentFlag'] end if attributes.has_key?(:'description') self.description = attributes[:'description'] end if attributes.has_key?(:'topCommentFlag') self.top_comment_flag = attributes[:'topCommentFlag'] end if attributes.has_key?(:'bottomCommentFlag') self.bottom_comment_flag = attributes[:'bottomCommentFlag'] end if attributes.has_key?(:'shipToCompany') self.ship_to_company = attributes[:'shipToCompany'] end if attributes.has_key?(:'shipToContact') self.ship_to_contact = attributes[:'shipToContact'] end if attributes.has_key?(:'shipToSite') self.ship_to_site = attributes[:'shipToSite'] end if attributes.has_key?(:'billToCompany') self.bill_to_company = attributes[:'billToCompany'] end if attributes.has_key?(:'billToContact') self.bill_to_contact = attributes[:'billToContact'] end if attributes.has_key?(:'billToSite') self.bill_to_site = attributes[:'billToSite'] end if attributes.has_key?(:'productIds') if (value = attributes[:'productIds']).is_a?(Array) self.product_ids = value end end if attributes.has_key?(:'documentIds') if (value = attributes[:'documentIds']).is_a?(Array) self.document_ids = value end end if attributes.has_key?(:'invoiceIds') if (value = attributes[:'invoiceIds']).is_a?(Array) self.invoice_ids = value end end if attributes.has_key?(:'configIds') if (value = attributes[:'configIds']).is_a?(Array) self.config_ids = value end end if attributes.has_key?(:'total') self.total = attributes[:'total'] end if attributes.has_key?(:'taxTotal') self.tax_total = attributes[:'taxTotal'] end if attributes.has_key?(:'currency') self.currency = attributes[:'currency'] end if attributes.has_key?(:'_info') self._info = attributes[:'_info'] end end |
Instance Attribute Details
#_info ⇒ Object
Metadata of the entity
82 83 84 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 82 def _info @_info end |
#bill_closed_flag ⇒ Object
Returns the value of attribute bill_closed_flag.
43 44 45 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 43 def bill_closed_flag @bill_closed_flag end |
#bill_shipped_flag ⇒ Object
Returns the value of attribute bill_shipped_flag.
45 46 47 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 45 def bill_shipped_flag @bill_shipped_flag end |
#bill_to_company ⇒ Object
Returns the value of attribute bill_to_company.
61 62 63 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 61 def bill_to_company @bill_to_company end |
#bill_to_contact ⇒ Object
Returns the value of attribute bill_to_contact.
63 64 65 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 63 def bill_to_contact @bill_to_contact end |
#bill_to_site ⇒ Object
Returns the value of attribute bill_to_site.
65 66 67 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 65 def bill_to_site @bill_to_site end |
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
29 30 31 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 29 def billing_terms @billing_terms end |
#bottom_comment_flag ⇒ Object
Returns the value of attribute bottom_comment_flag.
53 54 55 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 53 def bottom_comment_flag @bottom_comment_flag end |
#business_unit_id ⇒ Object
Returns the value of attribute business_unit_id.
37 38 39 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 37 def business_unit_id @business_unit_id end |
#company ⇒ Object
Returns the value of attribute company.
9 10 11 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 9 def company @company end |
#config_ids ⇒ Object
Returns the value of attribute config_ids.
73 74 75 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 73 def config_ids @config_ids end |
#contact ⇒ Object
Returns the value of attribute contact.
11 12 13 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 11 def contact @contact end |
#currency ⇒ Object
Returns the value of attribute currency.
79 80 81 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 79 def currency @currency end |
#description ⇒ Object
Returns the value of attribute description.
49 50 51 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 49 def description @description end |
#document_ids ⇒ Object
Returns the value of attribute document_ids.
69 70 71 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 69 def document_ids @document_ids end |
#due_date ⇒ Object
Returns the value of attribute due_date.
27 28 29 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 27 def due_date @due_date end |
#email ⇒ Object
Returns the value of attribute email.
17 18 19 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 17 def email @email end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 7 def id @id end |
#invoice_ids ⇒ Object
Returns the value of attribute invoice_ids.
71 72 73 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 71 def invoice_ids @invoice_ids end |
#location_id ⇒ Object
Returns the value of attribute location_id.
35 36 37 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 35 def location_id @location_id end |
#notes ⇒ Object
Returns the value of attribute notes.
41 42 43 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 41 def notes @notes end |
#opportunity ⇒ Object
Returns the value of attribute opportunity.
23 24 25 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 23 def opportunity @opportunity end |
#order_date ⇒ Object
Returns the value of attribute order_date.
25 26 27 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 25 def order_date @order_date end |
#phone ⇒ Object
Returns the value of attribute phone.
13 14 15 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 13 def phone @phone end |
#phone_ext ⇒ Object
Returns the value of attribute phone_ext.
15 16 17 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 15 def phone_ext @phone_ext end |
#po_number ⇒ Object
Returns the value of attribute po_number.
33 34 35 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 33 def po_number @po_number end |
#product_ids ⇒ Object
Returns the value of attribute product_ids.
67 68 69 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 67 def product_ids @product_ids end |
#restrict_downpayment_flag ⇒ Object
Returns the value of attribute restrict_downpayment_flag.
47 48 49 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 47 def restrict_downpayment_flag @restrict_downpayment_flag end |
#sales_rep ⇒ Object
Returns the value of attribute sales_rep.
39 40 41 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 39 def sales_rep @sales_rep end |
#ship_to_company ⇒ Object
Returns the value of attribute ship_to_company.
55 56 57 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 55 def ship_to_company @ship_to_company end |
#ship_to_contact ⇒ Object
Returns the value of attribute ship_to_contact.
57 58 59 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 57 def ship_to_contact @ship_to_contact end |
#ship_to_site ⇒ Object
Returns the value of attribute ship_to_site.
59 60 61 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 59 def ship_to_site @ship_to_site end |
#site ⇒ Object
Returns the value of attribute site.
19 20 21 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 19 def site @site end |
#status ⇒ Object
Returns the value of attribute status.
21 22 23 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 21 def status @status end |
#tax_code ⇒ Object
Returns the value of attribute tax_code.
31 32 33 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 31 def tax_code @tax_code end |
#tax_total ⇒ Object
Returns the value of attribute tax_total.
77 78 79 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 77 def tax_total @tax_total end |
#top_comment_flag ⇒ Object
Returns the value of attribute top_comment_flag.
51 52 53 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 51 def top_comment_flag @top_comment_flag end |
#total ⇒ Object
Returns the value of attribute total.
75 76 77 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 75 def total @total end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 86 def self.attribute_map { :'id' => :'id', :'company' => :'company', :'contact' => :'contact', :'phone' => :'phone', :'phone_ext' => :'phoneExt', :'email' => :'email', :'site' => :'site', :'status' => :'status', :'opportunity' => :'opportunity', :'order_date' => :'orderDate', :'due_date' => :'dueDate', :'billing_terms' => :'billingTerms', :'tax_code' => :'taxCode', :'po_number' => :'poNumber', :'location_id' => :'locationId', :'business_unit_id' => :'businessUnitId', :'sales_rep' => :'salesRep', :'notes' => :'notes', :'bill_closed_flag' => :'billClosedFlag', :'bill_shipped_flag' => :'billShippedFlag', :'restrict_downpayment_flag' => :'restrictDownpaymentFlag', :'description' => :'description', :'top_comment_flag' => :'topCommentFlag', :'bottom_comment_flag' => :'bottomCommentFlag', :'ship_to_company' => :'shipToCompany', :'ship_to_contact' => :'shipToContact', :'ship_to_site' => :'shipToSite', :'bill_to_company' => :'billToCompany', :'bill_to_contact' => :'billToContact', :'bill_to_site' => :'billToSite', :'product_ids' => :'productIds', :'document_ids' => :'documentIds', :'invoice_ids' => :'invoiceIds', :'config_ids' => :'configIds', :'total' => :'total', :'tax_total' => :'taxTotal', :'currency' => :'currency', :'_info' => :'_info' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 130 def self.swagger_types { :'id' => :'Integer', :'company' => :'CompanyReference', :'contact' => :'ContactReference', :'phone' => :'String', :'phone_ext' => :'String', :'email' => :'String', :'site' => :'SiteReference', :'status' => :'OrderStatusReference', :'opportunity' => :'OpportunityReference', :'order_date' => :'DateTime', :'due_date' => :'DateTime', :'billing_terms' => :'BillingTermsReference', :'tax_code' => :'TaxCodeReference', :'po_number' => :'String', :'location_id' => :'Integer', :'business_unit_id' => :'Integer', :'sales_rep' => :'MemberReference', :'notes' => :'String', :'bill_closed_flag' => :'BOOLEAN', :'bill_shipped_flag' => :'BOOLEAN', :'restrict_downpayment_flag' => :'BOOLEAN', :'description' => :'String', :'top_comment_flag' => :'BOOLEAN', :'bottom_comment_flag' => :'BOOLEAN', :'ship_to_company' => :'CompanyReference', :'ship_to_contact' => :'ContactReference', :'ship_to_site' => :'SiteReference', :'bill_to_company' => :'CompanyReference', :'bill_to_contact' => :'ContactReference', :'bill_to_site' => :'SiteReference', :'product_ids' => :'Array<Integer>', :'document_ids' => :'Array<Integer>', :'invoice_ids' => :'Array<Integer>', :'config_ids' => :'Array<Integer>', :'total' => :'Float', :'tax_total' => :'Float', :'currency' => :'CurrencyReference', :'_info' => :'Metadata' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
389 390 391 392 393 394 395 396 397 398 399 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 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 389 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && company == o.company && contact == o.contact && phone == o.phone && phone_ext == o.phone_ext && email == o.email && site == o.site && status == o.status && opportunity == o.opportunity && order_date == o.order_date && due_date == o.due_date && billing_terms == o.billing_terms && tax_code == o.tax_code && po_number == o.po_number && location_id == o.location_id && business_unit_id == o.business_unit_id && sales_rep == o.sales_rep && notes == o.notes && bill_closed_flag == o.bill_closed_flag && bill_shipped_flag == o.bill_shipped_flag && restrict_downpayment_flag == o.restrict_downpayment_flag && description == o.description && top_comment_flag == o.top_comment_flag && bottom_comment_flag == o.bottom_comment_flag && ship_to_company == o.ship_to_company && ship_to_contact == o.ship_to_contact && ship_to_site == o.ship_to_site && bill_to_company == o.bill_to_company && bill_to_contact == o.bill_to_contact && bill_to_site == o.bill_to_site && product_ids == o.product_ids && document_ids == o.document_ids && invoice_ids == o.invoice_ids && config_ids == o.config_ids && total == o.total && tax_total == o.tax_total && currency == o.currency && _info == o._info end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 468 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
534 535 536 537 538 539 540 541 542 543 544 545 546 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 534 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
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 447 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
434 435 436 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 434 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
440 441 442 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 440 def hash [id, company, contact, phone, phone_ext, email, site, status, opportunity, order_date, due_date, billing_terms, tax_code, po_number, location_id, business_unit_id, sales_rep, notes, bill_closed_flag, bill_shipped_flag, restrict_downpayment_flag, description, top_comment_flag, bottom_comment_flag, ship_to_company, ship_to_contact, ship_to_site, bill_to_company, bill_to_contact, bill_to_site, product_ids, document_ids, invoice_ids, config_ids, total, tax_total, currency, _info].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 345 def list_invalid_properties invalid_properties = Array.new if @company.nil? invalid_properties.push("invalid value for 'company', company cannot be nil.") end if @status.nil? invalid_properties.push("invalid value for 'status', status cannot be nil.") end if !@po_number.nil? && @po_number.to_s.length > 50 invalid_properties.push("invalid value for 'po_number', the character length must be smaller than or equal to 50.") end if @sales_rep.nil? invalid_properties.push("invalid value for 'sales_rep', sales_rep cannot be nil.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
514 515 516 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 514 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
520 521 522 523 524 525 526 527 528 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 520 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
508 509 510 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 508 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
368 369 370 371 372 373 374 |
# File 'lib/connectwise-ruby-sdk/models/order.rb', line 368 def valid? return false if @company.nil? return false if @status.nil? return false if !@po_number.nil? && @po_number.to_s.length > 50 return false if @sales_rep.nil? return true end |