Class: ConnectWise::Order
- Inherits:
-
Object
- Object
- ConnectWise::Order
- Defined in:
- lib/connect_wise/models/order.rb
Instance Attribute Summary collapse
-
#_info ⇒ Object
Returns the value of attribute _info.
-
#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.
-
#company ⇒ Object
Returns the value of attribute company.
-
#company_location ⇒ Object
Returns the value of attribute company_location.
-
#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.
-
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
-
#department ⇒ Object
Returns the value of attribute department.
-
#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 ⇒ Object
Returns the value of attribute location.
-
#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
Max length: 50;.
-
#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.
-
#sub_total ⇒ Object
Returns the value of attribute sub_total.
-
#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
-
.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 = {}) ⇒ 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
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 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 238 239 |
# File 'lib/connect_wise/models/order.rb', line 135 def initialize(attributes = {}) raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::Order` 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::Order`. 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.id = attributes[:id] if attributes.key?(:id) self.company = attributes[:company] if attributes.key?(:company) self.contact = attributes[:contact] if attributes.key?(:contact) self.phone = attributes[:phone] if attributes.key?(:phone) self.phone_ext = attributes[:phone_ext] if attributes.key?(:phone_ext) self.email = attributes[:email] if attributes.key?(:email) self.site = attributes[:site] if attributes.key?(:site) self.status = attributes[:status] if attributes.key?(:status) self.opportunity = attributes[:opportunity] if attributes.key?(:opportunity) self.order_date = attributes[:order_date] if attributes.key?(:order_date) self.due_date = attributes[:due_date] if attributes.key?(:due_date) self.billing_terms = attributes[:billing_terms] if attributes.key?(:billing_terms) self.tax_code = attributes[:tax_code] if attributes.key?(:tax_code) self.po_number = attributes[:po_number] if attributes.key?(:po_number) self.location = attributes[:location] if attributes.key?(:location) self.department = attributes[:department] if attributes.key?(:department) self.sales_rep = attributes[:sales_rep] if attributes.key?(:sales_rep) self.notes = attributes[:notes] if attributes.key?(:notes) self.bill_closed_flag = attributes[:bill_closed_flag] if attributes.key?(:bill_closed_flag) self.bill_shipped_flag = attributes[:bill_shipped_flag] if attributes.key?(:bill_shipped_flag) self.restrict_downpayment_flag = attributes[:restrict_downpayment_flag] if attributes.key?(:restrict_downpayment_flag) self.description = attributes[:description] if attributes.key?(:description) self.top_comment_flag = attributes[:top_comment_flag] if attributes.key?(:top_comment_flag) self.bottom_comment_flag = attributes[:bottom_comment_flag] if attributes.key?(:bottom_comment_flag) self.ship_to_company = attributes[:ship_to_company] if attributes.key?(:ship_to_company) self.ship_to_contact = attributes[:ship_to_contact] if attributes.key?(:ship_to_contact) self.ship_to_site = attributes[:ship_to_site] if attributes.key?(:ship_to_site) self.bill_to_company = attributes[:bill_to_company] if attributes.key?(:bill_to_company) self.bill_to_contact = attributes[:bill_to_contact] if attributes.key?(:bill_to_contact) self.bill_to_site = attributes[:bill_to_site] if attributes.key?(:bill_to_site) if attributes.key?(:product_ids) && (value = attributes[:product_ids]).is_a?(Array) self.product_ids = value end if attributes.key?(:document_ids) && (value = attributes[:document_ids]).is_a?(Array) self.document_ids = value end if attributes.key?(:invoice_ids) && (value = attributes[:invoice_ids]).is_a?(Array) self.invoice_ids = value end if attributes.key?(:config_ids) && (value = attributes[:config_ids]).is_a?(Array) self.config_ids = value end self.total = attributes[:total] if attributes.key?(:total) self.tax_total = attributes[:tax_total] if attributes.key?(:tax_total) self.currency = attributes[:currency] if attributes.key?(:currency) self.company_location = attributes[:company_location] if attributes.key?(:company_location) self.sub_total = attributes[:sub_total] if attributes.key?(:sub_total) 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.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def _info @_info end |
#bill_closed_flag ⇒ Object
Returns the value of attribute bill_closed_flag.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def bill_closed_flag @bill_closed_flag end |
#bill_shipped_flag ⇒ Object
Returns the value of attribute bill_shipped_flag.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def bill_shipped_flag @bill_shipped_flag end |
#bill_to_company ⇒ Object
Returns the value of attribute bill_to_company.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def bill_to_company @bill_to_company end |
#bill_to_contact ⇒ Object
Returns the value of attribute bill_to_contact.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def bill_to_contact @bill_to_contact end |
#bill_to_site ⇒ Object
Returns the value of attribute bill_to_site.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def bill_to_site @bill_to_site end |
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def billing_terms @billing_terms end |
#bottom_comment_flag ⇒ Object
Returns the value of attribute bottom_comment_flag.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def bottom_comment_flag @bottom_comment_flag end |
#company ⇒ Object
Returns the value of attribute company.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def company @company end |
#company_location ⇒ Object
Returns the value of attribute company_location.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def company_location @company_location end |
#config_ids ⇒ Object
Returns the value of attribute config_ids.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def config_ids @config_ids end |
#contact ⇒ Object
Returns the value of attribute contact.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def contact @contact end |
#currency ⇒ Object
Returns the value of attribute currency.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def currency @currency end |
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def custom_fields @custom_fields end |
#department ⇒ Object
Returns the value of attribute department.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def department @department end |
#description ⇒ Object
Returns the value of attribute description.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def description @description end |
#document_ids ⇒ Object
Returns the value of attribute document_ids.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def document_ids @document_ids end |
#due_date ⇒ Object
Returns the value of attribute due_date.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def due_date @due_date end |
#email ⇒ Object
Returns the value of attribute email.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def email @email end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def id @id end |
#invoice_ids ⇒ Object
Returns the value of attribute invoice_ids.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def invoice_ids @invoice_ids end |
#location ⇒ Object
Returns the value of attribute location.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def location @location end |
#notes ⇒ Object
Returns the value of attribute notes.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def notes @notes end |
#opportunity ⇒ Object
Returns the value of attribute opportunity.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def opportunity @opportunity end |
#order_date ⇒ Object
Returns the value of attribute order_date.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def order_date @order_date end |
#phone ⇒ Object
Returns the value of attribute phone.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def phone @phone end |
#phone_ext ⇒ Object
Returns the value of attribute phone_ext.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def phone_ext @phone_ext end |
#po_number ⇒ Object
Max length: 50;
19 20 21 |
# File 'lib/connect_wise/models/order.rb', line 19 def po_number @po_number end |
#product_ids ⇒ Object
Returns the value of attribute product_ids.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def product_ids @product_ids end |
#restrict_downpayment_flag ⇒ Object
Returns the value of attribute restrict_downpayment_flag.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def restrict_downpayment_flag @restrict_downpayment_flag end |
#sales_rep ⇒ Object
Returns the value of attribute sales_rep.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def sales_rep @sales_rep end |
#ship_to_company ⇒ Object
Returns the value of attribute ship_to_company.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def ship_to_company @ship_to_company end |
#ship_to_contact ⇒ Object
Returns the value of attribute ship_to_contact.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def ship_to_contact @ship_to_contact end |
#ship_to_site ⇒ Object
Returns the value of attribute ship_to_site.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def ship_to_site @ship_to_site end |
#site ⇒ Object
Returns the value of attribute site.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def site @site end |
#status ⇒ Object
Returns the value of attribute status.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def status @status end |
#sub_total ⇒ Object
Returns the value of attribute sub_total.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def sub_total @sub_total end |
#tax_code ⇒ Object
Returns the value of attribute tax_code.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def tax_code @tax_code end |
#tax_total ⇒ Object
Returns the value of attribute tax_total.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def tax_total @tax_total end |
#top_comment_flag ⇒ Object
Returns the value of attribute top_comment_flag.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def top_comment_flag @top_comment_flag end |
#total ⇒ Object
Returns the value of attribute total.
16 17 18 |
# File 'lib/connect_wise/models/order.rb', line 16 def total @total end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
69 70 71 |
# File 'lib/connect_wise/models/order.rb', line 69 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/connect_wise/models/order.rb', line 22 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: :location, department: :department, 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, company_location: :companyLocation, sub_total: :subTotal, _info: :_info, custom_fields: :customFields } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
317 318 319 |
# File 'lib/connect_wise/models/order.rb', line 317 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/connect_wise/models/order.rb', line 121 def self.openapi_nullable Set.new(i[ bill_closed_flag bill_shipped_flag restrict_downpayment_flag top_comment_flag bottom_comment_flag total tax_total ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
74 75 76 77 78 79 80 81 82 83 84 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 |
# File 'lib/connect_wise/models/order.rb', line 74 def self.openapi_types { id: :Integer, company: :CompanyReference, contact: :ContactReference, phone: :String, phone_ext: :String, email: :String, site: :SiteReference, status: :OrderStatusReference, opportunity: :OpportunityReference, order_date: :Time, due_date: :Time, billing_terms: :BillingTermsReference, tax_code: :TaxCodeReference, po_number: :String, location: :SystemLocationReference, department: :SystemDepartmentReference, 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, company_location: :SystemLocationReference, sub_total: :Float, _info: :'Hash<String, String>', custom_fields: :'Array<CustomFieldValue>' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/connect_wise/models/order.rb', line 255 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && company == other.company && contact == other.contact && phone == other.phone && phone_ext == other.phone_ext && email == other.email && site == other.site && status == other.status && opportunity == other.opportunity && order_date == other.order_date && due_date == other.due_date && billing_terms == other.billing_terms && tax_code == other.tax_code && po_number == other.po_number && location == other.location && department == other.department && sales_rep == other.sales_rep && notes == other.notes && bill_closed_flag == other.bill_closed_flag && bill_shipped_flag == other.bill_shipped_flag && restrict_downpayment_flag == other.restrict_downpayment_flag && description == other.description && top_comment_flag == other.top_comment_flag && bottom_comment_flag == other.bottom_comment_flag && ship_to_company == other.ship_to_company && ship_to_contact == other.ship_to_contact && ship_to_site == other.ship_to_site && bill_to_company == other.bill_to_company && bill_to_contact == other.bill_to_contact && bill_to_site == other.bill_to_site && product_ids == other.product_ids && document_ids == other.document_ids && invoice_ids == other.invoice_ids && config_ids == other.config_ids && total == other.total && tax_total == other.tax_total && currency == other.currency && company_location == other.company_location && sub_total == other.sub_total && _info == other._info && custom_fields == other.custom_fields end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/connect_wise/models/order.rb', line 347 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
418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/connect_wise/models/order.rb', line 418 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
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/connect_wise/models/order.rb', line 324 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
304 305 306 |
# File 'lib/connect_wise/models/order.rb', line 304 def eql?(other) self == other end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
310 311 312 |
# File 'lib/connect_wise/models/order.rb', line 310 def hash [id, company, contact, phone, phone_ext, email, site, status, opportunity, order_date, due_date, billing_terms, tax_code, po_number, location, department, 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, company_location, sub_total, _info, custom_fields].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
243 244 245 |
# File 'lib/connect_wise/models/order.rb', line 243 def list_invalid_properties [] end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
394 395 396 |
# File 'lib/connect_wise/models/order.rb', line 394 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/connect_wise/models/order.rb', line 400 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
388 389 390 |
# File 'lib/connect_wise/models/order.rb', line 388 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
249 250 251 |
# File 'lib/connect_wise/models/order.rb', line 249 def valid? true end |