Class: ConnectWise::PurchaseOrder
- Inherits:
-
Object
- Object
- ConnectWise::PurchaseOrder
- Defined in:
- lib/connectwise-ruby-sdk/models/purchase_order.rb
Instance Attribute Summary collapse
-
#_info ⇒ Object
Metadata of the entity.
-
#business_unit_id ⇒ Object
Returns the value of attribute business_unit_id.
-
#cancel_reason ⇒ Object
Returns the value of attribute cancel_reason.
-
#closed_flag ⇒ Object
Returns the value of attribute closed_flag.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#customer_city ⇒ Object
Returns the value of attribute customer_city.
-
#customer_company ⇒ Object
Returns the value of attribute customer_company.
-
#customer_contact ⇒ Object
Returns the value of attribute customer_contact.
-
#customer_country ⇒ Object
Returns the value of attribute customer_country.
-
#customer_extension ⇒ Object
Returns the value of attribute customer_extension.
-
#customer_name ⇒ Object
Returns the value of attribute customer_name.
-
#customer_phone ⇒ Object
Returns the value of attribute customer_phone.
-
#customer_site ⇒ Object
Returns the value of attribute customer_site.
-
#customer_site_name ⇒ Object
Returns the value of attribute customer_site_name.
-
#customer_state ⇒ Object
Returns the value of attribute customer_state.
-
#customer_street_line1 ⇒ Object
Returns the value of attribute customer_street_line1.
-
#customer_street_line2 ⇒ Object
Returns the value of attribute customer_street_line2.
-
#customer_zip ⇒ Object
Returns the value of attribute customer_zip.
-
#date_closed ⇒ Object
Returns the value of attribute date_closed.
-
#drop_ship_customer_flag ⇒ Object
Returns the value of attribute drop_ship_customer_flag.
-
#entered_by ⇒ Object
Returns the value of attribute entered_by.
-
#freight_cost ⇒ Object
Returns the value of attribute freight_cost.
-
#freight_packing_slip ⇒ Object
Returns the value of attribute freight_packing_slip.
-
#freight_tax_total ⇒ Object
Returns the value of attribute freight_tax_total.
-
#id ⇒ Object
Returns the value of attribute id.
-
#internal_notes ⇒ Object
Returns the value of attribute internal_notes.
-
#location_id ⇒ Object
Returns the value of attribute location_id.
-
#po_date ⇒ Object
Returns the value of attribute po_date.
-
#po_number ⇒ Object
Returns the value of attribute po_number.
-
#sales_tax ⇒ Object
Returns the value of attribute sales_tax.
-
#shipment_date ⇒ Object
Returns the value of attribute shipment_date.
-
#shipment_method ⇒ Object
Returns the value of attribute shipment_method.
-
#shipping_instructions ⇒ Object
Returns the value of attribute shipping_instructions.
-
#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_freight_flag ⇒ Object
Returns the value of attribute tax_freight_flag.
-
#tax_po_flag ⇒ Object
Returns the value of attribute tax_po_flag.
-
#terms ⇒ Object
Returns the value of attribute terms.
-
#total ⇒ Object
Returns the value of attribute total.
-
#tracking_number ⇒ Object
Returns the value of attribute tracking_number.
-
#update_shipment_info ⇒ Object
Determines whether or not to update all of the shipment info for each associated line item when new shipment info is passed in.
-
#update_vendor_order_number ⇒ Object
Determines whether or not to update vendor order number for each associated line item when new vendor order number is passed in.
-
#vendor_company ⇒ Object
Returns the value of attribute vendor_company.
-
#vendor_contact ⇒ Object
Returns the value of attribute vendor_contact.
-
#vendor_invoice_date ⇒ Object
Returns the value of attribute vendor_invoice_date.
-
#vendor_invoice_number ⇒ Object
Returns the value of attribute vendor_invoice_number.
-
#vendor_order_number ⇒ Object
Returns the value of attribute vendor_order_number.
-
#vendor_site ⇒ Object
Returns the value of attribute vendor_site.
-
#warehouse ⇒ Object
Returns the value of attribute warehouse.
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 = {}) ⇒ PurchaseOrder
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 = {}) ⇒ PurchaseOrder
Initializes the object
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 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 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 225 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?(:'_info') self._info = attributes[:'_info'] end if attributes.has_key?(:'businessUnitId') self.business_unit_id = attributes[:'businessUnitId'] end if attributes.has_key?(:'cancelReason') self.cancel_reason = attributes[:'cancelReason'] end if attributes.has_key?(:'closedFlag') self.closed_flag = attributes[:'closedFlag'] end if attributes.has_key?(:'customerCity') self.customer_city = attributes[:'customerCity'] end if attributes.has_key?(:'customerCompany') self.customer_company = attributes[:'customerCompany'] end if attributes.has_key?(:'customerContact') self.customer_contact = attributes[:'customerContact'] end if attributes.has_key?(:'customerCountry') self.customer_country = attributes[:'customerCountry'] end if attributes.has_key?(:'customerExtension') self.customer_extension = attributes[:'customerExtension'] end if attributes.has_key?(:'customerName') self.customer_name = attributes[:'customerName'] end if attributes.has_key?(:'customerPhone') self.customer_phone = attributes[:'customerPhone'] end if attributes.has_key?(:'customerSite') self.customer_site = attributes[:'customerSite'] end if attributes.has_key?(:'customerSiteName') self.customer_site_name = attributes[:'customerSiteName'] end if attributes.has_key?(:'customerState') self.customer_state = attributes[:'customerState'] end if attributes.has_key?(:'customerStreetLine1') self.customer_street_line1 = attributes[:'customerStreetLine1'] end if attributes.has_key?(:'customerStreetLine2') self.customer_street_line2 = attributes[:'customerStreetLine2'] end if attributes.has_key?(:'customerZip') self.customer_zip = attributes[:'customerZip'] end if attributes.has_key?(:'dateClosed') self.date_closed = attributes[:'dateClosed'] end if attributes.has_key?(:'dropShipCustomerFlag') self.drop_ship_customer_flag = attributes[:'dropShipCustomerFlag'] end if attributes.has_key?(:'enteredBy') self.entered_by = attributes[:'enteredBy'] end if attributes.has_key?(:'freightCost') self.freight_cost = attributes[:'freightCost'] end if attributes.has_key?(:'freightPackingSlip') self.freight_packing_slip = attributes[:'freightPackingSlip'] end if attributes.has_key?(:'freightTaxTotal') self.freight_tax_total = attributes[:'freightTaxTotal'] end if attributes.has_key?(:'internalNotes') self.internal_notes = attributes[:'internalNotes'] end if attributes.has_key?(:'locationId') self.location_id = attributes[:'locationId'] end if attributes.has_key?(:'poDate') self.po_date = attributes[:'poDate'] end if attributes.has_key?(:'poNumber') self.po_number = attributes[:'poNumber'] end if attributes.has_key?(:'salesTax') self.sales_tax = attributes[:'salesTax'] end if attributes.has_key?(:'shipmentDate') self.shipment_date = attributes[:'shipmentDate'] end if attributes.has_key?(:'shipmentMethod') self.shipment_method = attributes[:'shipmentMethod'] end if attributes.has_key?(:'shippingInstructions') self.shipping_instructions = attributes[:'shippingInstructions'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'subTotal') self.sub_total = attributes[:'subTotal'] end if attributes.has_key?(:'taxCode') self.tax_code = attributes[:'taxCode'] end if attributes.has_key?(:'taxFreightFlag') self.tax_freight_flag = attributes[:'taxFreightFlag'] end if attributes.has_key?(:'taxPoFlag') self.tax_po_flag = attributes[:'taxPoFlag'] end if attributes.has_key?(:'terms') self.terms = attributes[:'terms'] end if attributes.has_key?(:'total') self.total = attributes[:'total'] end if attributes.has_key?(:'trackingNumber') self.tracking_number = attributes[:'trackingNumber'] end if attributes.has_key?(:'updateShipmentInfo') self.update_shipment_info = attributes[:'updateShipmentInfo'] end if attributes.has_key?(:'updateVendorOrderNumber') self.update_vendor_order_number = attributes[:'updateVendorOrderNumber'] end if attributes.has_key?(:'vendorCompany') self.vendor_company = attributes[:'vendorCompany'] end if attributes.has_key?(:'vendorContact') self.vendor_contact = attributes[:'vendorContact'] end if attributes.has_key?(:'vendorInvoiceDate') self.vendor_invoice_date = attributes[:'vendorInvoiceDate'] end if attributes.has_key?(:'vendorInvoiceNumber') self.vendor_invoice_number = attributes[:'vendorInvoiceNumber'] end if attributes.has_key?(:'vendorOrderNumber') self.vendor_order_number = attributes[:'vendorOrderNumber'] end if attributes.has_key?(:'vendorSite') self.vendor_site = attributes[:'vendorSite'] end if attributes.has_key?(:'warehouse') self.warehouse = attributes[:'warehouse'] end if attributes.has_key?(:'currency') self.currency = attributes[:'currency'] end end |
Instance Attribute Details
#_info ⇒ Object
Metadata of the entity
10 11 12 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 10 def _info @_info end |
#business_unit_id ⇒ Object
Returns the value of attribute business_unit_id.
12 13 14 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 12 def business_unit_id @business_unit_id end |
#cancel_reason ⇒ Object
Returns the value of attribute cancel_reason.
14 15 16 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 14 def cancel_reason @cancel_reason end |
#closed_flag ⇒ Object
Returns the value of attribute closed_flag.
16 17 18 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 16 def closed_flag @closed_flag end |
#currency ⇒ Object
Returns the value of attribute currency.
108 109 110 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 108 def currency @currency end |
#customer_city ⇒ Object
Returns the value of attribute customer_city.
18 19 20 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 18 def customer_city @customer_city end |
#customer_company ⇒ Object
Returns the value of attribute customer_company.
20 21 22 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 20 def customer_company @customer_company end |
#customer_contact ⇒ Object
Returns the value of attribute customer_contact.
22 23 24 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 22 def customer_contact @customer_contact end |
#customer_country ⇒ Object
Returns the value of attribute customer_country.
24 25 26 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 24 def customer_country @customer_country end |
#customer_extension ⇒ Object
Returns the value of attribute customer_extension.
26 27 28 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 26 def customer_extension @customer_extension end |
#customer_name ⇒ Object
Returns the value of attribute customer_name.
28 29 30 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 28 def customer_name @customer_name end |
#customer_phone ⇒ Object
Returns the value of attribute customer_phone.
30 31 32 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 30 def customer_phone @customer_phone end |
#customer_site ⇒ Object
Returns the value of attribute customer_site.
32 33 34 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 32 def customer_site @customer_site end |
#customer_site_name ⇒ Object
Returns the value of attribute customer_site_name.
34 35 36 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 34 def customer_site_name @customer_site_name end |
#customer_state ⇒ Object
Returns the value of attribute customer_state.
36 37 38 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 36 def customer_state @customer_state end |
#customer_street_line1 ⇒ Object
Returns the value of attribute customer_street_line1.
38 39 40 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 38 def customer_street_line1 @customer_street_line1 end |
#customer_street_line2 ⇒ Object
Returns the value of attribute customer_street_line2.
40 41 42 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 40 def customer_street_line2 @customer_street_line2 end |
#customer_zip ⇒ Object
Returns the value of attribute customer_zip.
42 43 44 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 42 def customer_zip @customer_zip end |
#date_closed ⇒ Object
Returns the value of attribute date_closed.
44 45 46 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 44 def date_closed @date_closed end |
#drop_ship_customer_flag ⇒ Object
Returns the value of attribute drop_ship_customer_flag.
46 47 48 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 46 def drop_ship_customer_flag @drop_ship_customer_flag end |
#entered_by ⇒ Object
Returns the value of attribute entered_by.
48 49 50 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 48 def entered_by @entered_by end |
#freight_cost ⇒ Object
Returns the value of attribute freight_cost.
50 51 52 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 50 def freight_cost @freight_cost end |
#freight_packing_slip ⇒ Object
Returns the value of attribute freight_packing_slip.
52 53 54 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 52 def freight_packing_slip @freight_packing_slip end |
#freight_tax_total ⇒ Object
Returns the value of attribute freight_tax_total.
54 55 56 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 54 def freight_tax_total @freight_tax_total end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 7 def id @id end |
#internal_notes ⇒ Object
Returns the value of attribute internal_notes.
56 57 58 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 56 def internal_notes @internal_notes end |
#location_id ⇒ Object
Returns the value of attribute location_id.
58 59 60 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 58 def location_id @location_id end |
#po_date ⇒ Object
Returns the value of attribute po_date.
60 61 62 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 60 def po_date @po_date end |
#po_number ⇒ Object
Returns the value of attribute po_number.
62 63 64 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 62 def po_number @po_number end |
#sales_tax ⇒ Object
Returns the value of attribute sales_tax.
64 65 66 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 64 def sales_tax @sales_tax end |
#shipment_date ⇒ Object
Returns the value of attribute shipment_date.
66 67 68 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 66 def shipment_date @shipment_date end |
#shipment_method ⇒ Object
Returns the value of attribute shipment_method.
68 69 70 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 68 def shipment_method @shipment_method end |
#shipping_instructions ⇒ Object
Returns the value of attribute shipping_instructions.
70 71 72 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 70 def shipping_instructions @shipping_instructions end |
#status ⇒ Object
Returns the value of attribute status.
72 73 74 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 72 def status @status end |
#sub_total ⇒ Object
Returns the value of attribute sub_total.
74 75 76 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 74 def sub_total @sub_total end |
#tax_code ⇒ Object
Returns the value of attribute tax_code.
76 77 78 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 76 def tax_code @tax_code end |
#tax_freight_flag ⇒ Object
Returns the value of attribute tax_freight_flag.
78 79 80 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 78 def tax_freight_flag @tax_freight_flag end |
#tax_po_flag ⇒ Object
Returns the value of attribute tax_po_flag.
80 81 82 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 80 def tax_po_flag @tax_po_flag end |
#terms ⇒ Object
Returns the value of attribute terms.
82 83 84 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 82 def terms @terms end |
#total ⇒ Object
Returns the value of attribute total.
84 85 86 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 84 def total @total end |
#tracking_number ⇒ Object
Returns the value of attribute tracking_number.
86 87 88 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 86 def tracking_number @tracking_number end |
#update_shipment_info ⇒ Object
Determines whether or not to update all of the shipment info for each associated line item when new shipment info is passed in
89 90 91 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 89 def update_shipment_info @update_shipment_info end |
#update_vendor_order_number ⇒ Object
Determines whether or not to update vendor order number for each associated line item when new vendor order number is passed in
92 93 94 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 92 def update_vendor_order_number @update_vendor_order_number end |
#vendor_company ⇒ Object
Returns the value of attribute vendor_company.
94 95 96 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 94 def vendor_company @vendor_company end |
#vendor_contact ⇒ Object
Returns the value of attribute vendor_contact.
96 97 98 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 96 def vendor_contact @vendor_contact end |
#vendor_invoice_date ⇒ Object
Returns the value of attribute vendor_invoice_date.
98 99 100 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 98 def vendor_invoice_date @vendor_invoice_date end |
#vendor_invoice_number ⇒ Object
Returns the value of attribute vendor_invoice_number.
100 101 102 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 100 def vendor_invoice_number @vendor_invoice_number end |
#vendor_order_number ⇒ Object
Returns the value of attribute vendor_order_number.
102 103 104 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 102 def vendor_order_number @vendor_order_number end |
#vendor_site ⇒ Object
Returns the value of attribute vendor_site.
104 105 106 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 104 def vendor_site @vendor_site end |
#warehouse ⇒ Object
Returns the value of attribute warehouse.
106 107 108 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 106 def warehouse @warehouse end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 158 159 160 161 162 163 164 165 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 112 def self.attribute_map { :'id' => :'id', :'_info' => :'_info', :'business_unit_id' => :'businessUnitId', :'cancel_reason' => :'cancelReason', :'closed_flag' => :'closedFlag', :'customer_city' => :'customerCity', :'customer_company' => :'customerCompany', :'customer_contact' => :'customerContact', :'customer_country' => :'customerCountry', :'customer_extension' => :'customerExtension', :'customer_name' => :'customerName', :'customer_phone' => :'customerPhone', :'customer_site' => :'customerSite', :'customer_site_name' => :'customerSiteName', :'customer_state' => :'customerState', :'customer_street_line1' => :'customerStreetLine1', :'customer_street_line2' => :'customerStreetLine2', :'customer_zip' => :'customerZip', :'date_closed' => :'dateClosed', :'drop_ship_customer_flag' => :'dropShipCustomerFlag', :'entered_by' => :'enteredBy', :'freight_cost' => :'freightCost', :'freight_packing_slip' => :'freightPackingSlip', :'freight_tax_total' => :'freightTaxTotal', :'internal_notes' => :'internalNotes', :'location_id' => :'locationId', :'po_date' => :'poDate', :'po_number' => :'poNumber', :'sales_tax' => :'salesTax', :'shipment_date' => :'shipmentDate', :'shipment_method' => :'shipmentMethod', :'shipping_instructions' => :'shippingInstructions', :'status' => :'status', :'sub_total' => :'subTotal', :'tax_code' => :'taxCode', :'tax_freight_flag' => :'taxFreightFlag', :'tax_po_flag' => :'taxPoFlag', :'terms' => :'terms', :'total' => :'total', :'tracking_number' => :'trackingNumber', :'update_shipment_info' => :'updateShipmentInfo', :'update_vendor_order_number' => :'updateVendorOrderNumber', :'vendor_company' => :'vendorCompany', :'vendor_contact' => :'vendorContact', :'vendor_invoice_date' => :'vendorInvoiceDate', :'vendor_invoice_number' => :'vendorInvoiceNumber', :'vendor_order_number' => :'vendorOrderNumber', :'vendor_site' => :'vendorSite', :'warehouse' => :'warehouse', :'currency' => :'currency' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 168 def self.swagger_types { :'id' => :'Integer', :'_info' => :'Metadata', :'business_unit_id' => :'Integer', :'cancel_reason' => :'String', :'closed_flag' => :'BOOLEAN', :'customer_city' => :'String', :'customer_company' => :'CompanyReference', :'customer_contact' => :'ContactReference', :'customer_country' => :'CountryReference', :'customer_extension' => :'String', :'customer_name' => :'String', :'customer_phone' => :'String', :'customer_site' => :'SiteReference', :'customer_site_name' => :'String', :'customer_state' => :'String', :'customer_street_line1' => :'String', :'customer_street_line2' => :'String', :'customer_zip' => :'String', :'date_closed' => :'DateTime', :'drop_ship_customer_flag' => :'BOOLEAN', :'entered_by' => :'String', :'freight_cost' => :'Float', :'freight_packing_slip' => :'String', :'freight_tax_total' => :'Float', :'internal_notes' => :'String', :'location_id' => :'Integer', :'po_date' => :'DateTime', :'po_number' => :'String', :'sales_tax' => :'Float', :'shipment_date' => :'DateTime', :'shipment_method' => :'ShipmentMethodReference', :'shipping_instructions' => :'String', :'status' => :'PurchaseOrderStatusReference', :'sub_total' => :'Float', :'tax_code' => :'TaxCodeReference', :'tax_freight_flag' => :'BOOLEAN', :'tax_po_flag' => :'BOOLEAN', :'terms' => :'BillingTermsReference', :'total' => :'Float', :'tracking_number' => :'String', :'update_shipment_info' => :'BOOLEAN', :'update_vendor_order_number' => :'BOOLEAN', :'vendor_company' => :'CompanyReference', :'vendor_contact' => :'ContactReference', :'vendor_invoice_date' => :'DateTime', :'vendor_invoice_number' => :'String', :'vendor_order_number' => :'String', :'vendor_site' => :'SiteReference', :'warehouse' => :'WarehouseReference', :'currency' => :'CurrencyReference' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 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 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 532 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && _info == o._info && business_unit_id == o.business_unit_id && cancel_reason == o.cancel_reason && closed_flag == o.closed_flag && customer_city == o.customer_city && customer_company == o.customer_company && customer_contact == o.customer_contact && customer_country == o.customer_country && customer_extension == o.customer_extension && customer_name == o.customer_name && customer_phone == o.customer_phone && customer_site == o.customer_site && customer_site_name == o.customer_site_name && customer_state == o.customer_state && customer_street_line1 == o.customer_street_line1 && customer_street_line2 == o.customer_street_line2 && customer_zip == o.customer_zip && date_closed == o.date_closed && drop_ship_customer_flag == o.drop_ship_customer_flag && entered_by == o.entered_by && freight_cost == o.freight_cost && freight_packing_slip == o.freight_packing_slip && freight_tax_total == o.freight_tax_total && internal_notes == o.internal_notes && location_id == o.location_id && po_date == o.po_date && po_number == o.po_number && sales_tax == o.sales_tax && shipment_date == o.shipment_date && shipment_method == o.shipment_method && shipping_instructions == o.shipping_instructions && status == o.status && sub_total == o.sub_total && tax_code == o.tax_code && tax_freight_flag == o.tax_freight_flag && tax_po_flag == o.tax_po_flag && terms == o.terms && total == o.total && tracking_number == o.tracking_number && update_shipment_info == o.update_shipment_info && update_vendor_order_number == o.update_vendor_order_number && vendor_company == o.vendor_company && vendor_contact == o.vendor_contact && vendor_invoice_date == o.vendor_invoice_date && vendor_invoice_number == o.vendor_invoice_number && vendor_order_number == o.vendor_order_number && vendor_site == o.vendor_site && warehouse == o.warehouse && currency == o.currency end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 623 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
689 690 691 692 693 694 695 696 697 698 699 700 701 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 689 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
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 602 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
589 590 591 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 589 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
595 596 597 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 595 def hash [id, _info, business_unit_id, cancel_reason, closed_flag, customer_city, customer_company, customer_contact, customer_country, customer_extension, customer_name, customer_phone, customer_site, customer_site_name, customer_state, customer_street_line1, customer_street_line2, customer_zip, date_closed, drop_ship_customer_flag, entered_by, freight_cost, freight_packing_slip, freight_tax_total, internal_notes, location_id, po_date, po_number, sales_tax, shipment_date, shipment_method, shipping_instructions, status, sub_total, tax_code, tax_freight_flag, tax_po_flag, terms, total, tracking_number, update_shipment_info, update_vendor_order_number, vendor_company, vendor_contact, vendor_invoice_date, vendor_invoice_number, vendor_order_number, vendor_site, warehouse, currency].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 435 def list_invalid_properties invalid_properties = Array.new if @location_id.nil? invalid_properties.push("invalid value for 'location_id', location_id 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 @status.nil? invalid_properties.push("invalid value for 'status', status cannot be nil.") end if @terms.nil? invalid_properties.push("invalid value for 'terms', terms cannot be nil.") end if !@tracking_number.nil? && @tracking_number.to_s.length > 50 invalid_properties.push("invalid value for 'tracking_number', the character length must be smaller than or equal to 50.") end if @vendor_company.nil? invalid_properties.push("invalid value for 'vendor_company', vendor_company cannot be nil.") end if !@vendor_invoice_number.nil? && @vendor_invoice_number.to_s.length > 50 invalid_properties.push("invalid value for 'vendor_invoice_number', the character length must be smaller than or equal to 50.") end if !@vendor_order_number.nil? && @vendor_order_number.to_s.length > 50 invalid_properties.push("invalid value for 'vendor_order_number', the character length must be smaller than or equal to 50.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
669 670 671 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 669 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
675 676 677 678 679 680 681 682 683 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 675 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
663 664 665 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 663 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
474 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/connectwise-ruby-sdk/models/purchase_order.rb', line 474 def valid? return false if @location_id.nil? return false if !@po_number.nil? && @po_number.to_s.length > 50 return false if @status.nil? return false if @terms.nil? return false if !@tracking_number.nil? && @tracking_number.to_s.length > 50 return false if @vendor_company.nil? return false if !@vendor_invoice_number.nil? && @vendor_invoice_number.to_s.length > 50 return false if !@vendor_order_number.nil? && @vendor_order_number.to_s.length > 50 return true end |