Class: ConnectWise::GLExportPurchaseTransaction
- Inherits:
-
Object
- Object
- ConnectWise::GLExportPurchaseTransaction
- Defined in:
- lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb
Instance Attribute Summary collapse
-
#ap_account_number ⇒ Object
Returns the value of attribute ap_account_number.
-
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
-
#billing_terms_xref ⇒ Object
Returns the value of attribute billing_terms_xref.
-
#city_tax_xref ⇒ Object
Returns the value of attribute city_tax_xref.
-
#company ⇒ Object
Returns the value of attribute company.
-
#company_type ⇒ Object
Returns the value of attribute company_type.
-
#contact ⇒ Object
Returns the value of attribute contact.
-
#county_tax_xref ⇒ Object
Returns the value of attribute county_tax_xref.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#description ⇒ Object
Returns the value of attribute description.
-
#document_date ⇒ Object
Returns the value of attribute document_date.
-
#document_number ⇒ Object
Returns the value of attribute document_number.
-
#dropship_flag ⇒ Object
Returns the value of attribute dropship_flag.
-
#due_days ⇒ Object
Returns the value of attribute due_days.
-
#freight_amount ⇒ Object
Returns the value of attribute freight_amount.
-
#freight_packing_slip ⇒ Object
Returns the value of attribute freight_packing_slip.
-
#id ⇒ Object
Returns the value of attribute id.
-
#memo ⇒ Object
Returns the value of attribute memo.
-
#packing_slip ⇒ Object
Returns the value of attribute packing_slip.
-
#purchase_class ⇒ Object
Returns the value of attribute purchase_class.
-
#purchase_date ⇒ Object
Returns the value of attribute purchase_date.
-
#purchase_detail ⇒ Object
Returns the value of attribute purchase_detail.
-
#purchase_detail_tax ⇒ Object
Returns the value of attribute purchase_detail_tax.
-
#purchase_header_freight_taxable_flag ⇒ Object
Returns the value of attribute purchase_header_freight_taxable_flag.
-
#purchase_header_tax_group ⇒ Object
Returns the value of attribute purchase_header_tax_group.
-
#purchase_header_taxable_flag ⇒ Object
Returns the value of attribute purchase_header_taxable_flag.
-
#ship_to_company ⇒ Object
Returns the value of attribute ship_to_company.
-
#ship_to_company_account_number ⇒ Object
Returns the value of attribute ship_to_company_account_number.
-
#ship_to_company_type ⇒ Object
Returns the value of attribute ship_to_company_type.
-
#ship_to_contact ⇒ Object
Returns the value of attribute ship_to_contact.
-
#ship_to_site ⇒ Object
Returns the value of attribute ship_to_site.
-
#ship_to_tax_group ⇒ Object
Returns the value of attribute ship_to_tax_group.
-
#site ⇒ Object
Returns the value of attribute site.
-
#state_tax_xref ⇒ Object
Returns the value of attribute state_tax_xref.
-
#tax_agency_xref ⇒ Object
Returns the value of attribute tax_agency_xref.
-
#tax_code ⇒ Object
Returns the value of attribute tax_code.
-
#tax_group_rate ⇒ Object
Returns the value of attribute tax_group_rate.
-
#total ⇒ Object
Returns the value of attribute total.
-
#use_avalara_tax_flag ⇒ Object
Returns the value of attribute use_avalara_tax_flag.
-
#vendor_account_number ⇒ Object
Returns the value of attribute vendor_account_number.
-
#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_number ⇒ Object
Returns the value of attribute vendor_number.
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 = {}) ⇒ GLExportPurchaseTransaction
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 = {}) ⇒ GLExportPurchaseTransaction
Initializes the object
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 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 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 194 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?(:'documentDate') self.document_date = attributes[:'documentDate'] end if attributes.has_key?(:'documentNumber') self.document_number = attributes[:'documentNumber'] end if attributes.has_key?(:'description') self.description = attributes[:'description'] end if attributes.has_key?(:'memo') self.memo = attributes[:'memo'] end if attributes.has_key?(:'apAccountNumber') self.ap_account_number = attributes[:'apAccountNumber'] end if attributes.has_key?(:'purchaseDate') self.purchase_date = attributes[:'purchaseDate'] end if attributes.has_key?(:'company') self.company = attributes[:'company'] end if attributes.has_key?(:'companyType') self.company_type = attributes[:'companyType'] end if attributes.has_key?(:'contact') self.contact = attributes[:'contact'] end if attributes.has_key?(:'site') self.site = attributes[:'site'] end if attributes.has_key?(:'purchaseClass') self.purchase_class = attributes[:'purchaseClass'] end if attributes.has_key?(:'freightAmount') self.freight_amount = attributes[:'freightAmount'] end if attributes.has_key?(:'freightPackingSlip') self.freight_packing_slip = attributes[:'freightPackingSlip'] end if attributes.has_key?(:'packingSlip') self.packing_slip = attributes[:'packingSlip'] end if attributes.has_key?(:'dropshipFlag') self.dropship_flag = attributes[:'dropshipFlag'] end if attributes.has_key?(:'currency') self.currency = attributes[:'currency'] end if attributes.has_key?(:'total') self.total = attributes[:'total'] end if attributes.has_key?(:'billingTerms') self.billing_terms = attributes[:'billingTerms'] end if attributes.has_key?(:'billingTermsXref') self.billing_terms_xref = attributes[:'billingTermsXref'] end if attributes.has_key?(:'dueDays') self.due_days = attributes[:'dueDays'] end if attributes.has_key?(:'vendorNumber') self.vendor_number = attributes[:'vendorNumber'] end if attributes.has_key?(:'vendorAccountNumber') self.vendor_account_number = attributes[:'vendorAccountNumber'] 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?(:'taxAgencyXref') self.tax_agency_xref = attributes[:'taxAgencyXref'] end if attributes.has_key?(:'stateTaxXref') self.state_tax_xref = attributes[:'stateTaxXref'] end if attributes.has_key?(:'countyTaxXref') self.county_tax_xref = attributes[:'countyTaxXref'] end if attributes.has_key?(:'cityTaxXref') self.city_tax_xref = attributes[:'cityTaxXref'] end if attributes.has_key?(:'shipToCompany') self.ship_to_company = attributes[:'shipToCompany'] end if attributes.has_key?(:'shipToCompanyAccountNumber') self.ship_to_company_account_number = attributes[:'shipToCompanyAccountNumber'] end if attributes.has_key?(:'shipToCompanyType') self.ship_to_company_type = attributes[:'shipToCompanyType'] 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?(:'shipToTaxGroup') self.ship_to_tax_group = attributes[:'shipToTaxGroup'] end if attributes.has_key?(:'taxCode') self.tax_code = attributes[:'taxCode'] end if attributes.has_key?(:'taxGroupRate') self.tax_group_rate = attributes[:'taxGroupRate'] end if attributes.has_key?(:'useAvalaraTaxFlag') self.use_avalara_tax_flag = attributes[:'useAvalaraTaxFlag'] end if attributes.has_key?(:'purchaseHeaderTaxGroup') self.purchase_header_tax_group = attributes[:'purchaseHeaderTaxGroup'] end if attributes.has_key?(:'purchaseHeaderTaxableFlag') self.purchase_header_taxable_flag = attributes[:'purchaseHeaderTaxableFlag'] end if attributes.has_key?(:'purchaseHeaderFreightTaxableFlag') self.purchase_header_freight_taxable_flag = attributes[:'purchaseHeaderFreightTaxableFlag'] end if attributes.has_key?(:'purchaseDetail') if (value = attributes[:'purchaseDetail']).is_a?(Array) self.purchase_detail = value end end if attributes.has_key?(:'purchaseDetailTax') if (value = attributes[:'purchaseDetailTax']).is_a?(Array) self.purchase_detail_tax = value end end end |
Instance Attribute Details
#ap_account_number ⇒ Object
Returns the value of attribute ap_account_number.
17 18 19 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 17 def ap_account_number @ap_account_number end |
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
43 44 45 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 43 def billing_terms @billing_terms end |
#billing_terms_xref ⇒ Object
Returns the value of attribute billing_terms_xref.
45 46 47 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 45 def billing_terms_xref @billing_terms_xref end |
#city_tax_xref ⇒ Object
Returns the value of attribute city_tax_xref.
63 64 65 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 63 def city_tax_xref @city_tax_xref end |
#company ⇒ Object
Returns the value of attribute company.
21 22 23 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 21 def company @company end |
#company_type ⇒ Object
Returns the value of attribute company_type.
23 24 25 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 23 def company_type @company_type end |
#contact ⇒ Object
Returns the value of attribute contact.
25 26 27 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 25 def contact @contact end |
#county_tax_xref ⇒ Object
Returns the value of attribute county_tax_xref.
61 62 63 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 61 def county_tax_xref @county_tax_xref end |
#currency ⇒ Object
Returns the value of attribute currency.
39 40 41 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 39 def currency @currency end |
#description ⇒ Object
Returns the value of attribute description.
13 14 15 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 13 def description @description end |
#document_date ⇒ Object
Returns the value of attribute document_date.
9 10 11 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 9 def document_date @document_date end |
#document_number ⇒ Object
Returns the value of attribute document_number.
11 12 13 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 11 def document_number @document_number end |
#dropship_flag ⇒ Object
Returns the value of attribute dropship_flag.
37 38 39 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 37 def dropship_flag @dropship_flag end |
#due_days ⇒ Object
Returns the value of attribute due_days.
47 48 49 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 47 def due_days @due_days end |
#freight_amount ⇒ Object
Returns the value of attribute freight_amount.
31 32 33 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 31 def freight_amount @freight_amount end |
#freight_packing_slip ⇒ Object
Returns the value of attribute freight_packing_slip.
33 34 35 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 33 def freight_packing_slip @freight_packing_slip end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 7 def id @id end |
#memo ⇒ Object
Returns the value of attribute memo.
15 16 17 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 15 def memo @memo end |
#packing_slip ⇒ Object
Returns the value of attribute packing_slip.
35 36 37 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 35 def packing_slip @packing_slip end |
#purchase_class ⇒ Object
Returns the value of attribute purchase_class.
29 30 31 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 29 def purchase_class @purchase_class end |
#purchase_date ⇒ Object
Returns the value of attribute purchase_date.
19 20 21 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 19 def purchase_date @purchase_date end |
#purchase_detail ⇒ Object
Returns the value of attribute purchase_detail.
89 90 91 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 89 def purchase_detail @purchase_detail end |
#purchase_detail_tax ⇒ Object
Returns the value of attribute purchase_detail_tax.
91 92 93 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 91 def purchase_detail_tax @purchase_detail_tax end |
#purchase_header_freight_taxable_flag ⇒ Object
Returns the value of attribute purchase_header_freight_taxable_flag.
87 88 89 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 87 def purchase_header_freight_taxable_flag @purchase_header_freight_taxable_flag end |
#purchase_header_tax_group ⇒ Object
Returns the value of attribute purchase_header_tax_group.
83 84 85 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 83 def purchase_header_tax_group @purchase_header_tax_group end |
#purchase_header_taxable_flag ⇒ Object
Returns the value of attribute purchase_header_taxable_flag.
85 86 87 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 85 def purchase_header_taxable_flag @purchase_header_taxable_flag end |
#ship_to_company ⇒ Object
Returns the value of attribute ship_to_company.
65 66 67 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 65 def ship_to_company @ship_to_company end |
#ship_to_company_account_number ⇒ Object
Returns the value of attribute ship_to_company_account_number.
67 68 69 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 67 def ship_to_company_account_number @ship_to_company_account_number end |
#ship_to_company_type ⇒ Object
Returns the value of attribute ship_to_company_type.
69 70 71 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 69 def ship_to_company_type @ship_to_company_type end |
#ship_to_contact ⇒ Object
Returns the value of attribute ship_to_contact.
71 72 73 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 71 def ship_to_contact @ship_to_contact end |
#ship_to_site ⇒ Object
Returns the value of attribute ship_to_site.
73 74 75 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 73 def ship_to_site @ship_to_site end |
#ship_to_tax_group ⇒ Object
Returns the value of attribute ship_to_tax_group.
75 76 77 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 75 def ship_to_tax_group @ship_to_tax_group end |
#site ⇒ Object
Returns the value of attribute site.
27 28 29 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 27 def site @site end |
#state_tax_xref ⇒ Object
Returns the value of attribute state_tax_xref.
59 60 61 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 59 def state_tax_xref @state_tax_xref end |
#tax_agency_xref ⇒ Object
Returns the value of attribute tax_agency_xref.
57 58 59 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 57 def tax_agency_xref @tax_agency_xref end |
#tax_code ⇒ Object
Returns the value of attribute tax_code.
77 78 79 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 77 def tax_code @tax_code end |
#tax_group_rate ⇒ Object
Returns the value of attribute tax_group_rate.
79 80 81 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 79 def tax_group_rate @tax_group_rate end |
#total ⇒ Object
Returns the value of attribute total.
41 42 43 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 41 def total @total end |
#use_avalara_tax_flag ⇒ Object
Returns the value of attribute use_avalara_tax_flag.
81 82 83 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 81 def use_avalara_tax_flag @use_avalara_tax_flag end |
#vendor_account_number ⇒ Object
Returns the value of attribute vendor_account_number.
51 52 53 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 51 def vendor_account_number @vendor_account_number end |
#vendor_invoice_date ⇒ Object
Returns the value of attribute vendor_invoice_date.
53 54 55 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 53 def vendor_invoice_date @vendor_invoice_date end |
#vendor_invoice_number ⇒ Object
Returns the value of attribute vendor_invoice_number.
55 56 57 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 55 def vendor_invoice_number @vendor_invoice_number end |
#vendor_number ⇒ Object
Returns the value of attribute vendor_number.
49 50 51 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 49 def vendor_number @vendor_number end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 95 def self.attribute_map { :'id' => :'id', :'document_date' => :'documentDate', :'document_number' => :'documentNumber', :'description' => :'description', :'memo' => :'memo', :'ap_account_number' => :'apAccountNumber', :'purchase_date' => :'purchaseDate', :'company' => :'company', :'company_type' => :'companyType', :'contact' => :'contact', :'site' => :'site', :'purchase_class' => :'purchaseClass', :'freight_amount' => :'freightAmount', :'freight_packing_slip' => :'freightPackingSlip', :'packing_slip' => :'packingSlip', :'dropship_flag' => :'dropshipFlag', :'currency' => :'currency', :'total' => :'total', :'billing_terms' => :'billingTerms', :'billing_terms_xref' => :'billingTermsXref', :'due_days' => :'dueDays', :'vendor_number' => :'vendorNumber', :'vendor_account_number' => :'vendorAccountNumber', :'vendor_invoice_date' => :'vendorInvoiceDate', :'vendor_invoice_number' => :'vendorInvoiceNumber', :'tax_agency_xref' => :'taxAgencyXref', :'state_tax_xref' => :'stateTaxXref', :'county_tax_xref' => :'countyTaxXref', :'city_tax_xref' => :'cityTaxXref', :'ship_to_company' => :'shipToCompany', :'ship_to_company_account_number' => :'shipToCompanyAccountNumber', :'ship_to_company_type' => :'shipToCompanyType', :'ship_to_contact' => :'shipToContact', :'ship_to_site' => :'shipToSite', :'ship_to_tax_group' => :'shipToTaxGroup', :'tax_code' => :'taxCode', :'tax_group_rate' => :'taxGroupRate', :'use_avalara_tax_flag' => :'useAvalaraTaxFlag', :'purchase_header_tax_group' => :'purchaseHeaderTaxGroup', :'purchase_header_taxable_flag' => :'purchaseHeaderTaxableFlag', :'purchase_header_freight_taxable_flag' => :'purchaseHeaderFreightTaxableFlag', :'purchase_detail' => :'purchaseDetail', :'purchase_detail_tax' => :'purchaseDetailTax' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 144 def self.swagger_types { :'id' => :'String', :'document_date' => :'DateTime', :'document_number' => :'String', :'description' => :'String', :'memo' => :'String', :'ap_account_number' => :'String', :'purchase_date' => :'DateTime', :'company' => :'CompanyReference', :'company_type' => :'CompanyTypeReference', :'contact' => :'ContactReference', :'site' => :'SiteReference', :'purchase_class' => :'String', :'freight_amount' => :'Float', :'freight_packing_slip' => :'String', :'packing_slip' => :'String', :'dropship_flag' => :'BOOLEAN', :'currency' => :'CurrencyReference', :'total' => :'Float', :'billing_terms' => :'BillingTermsReference', :'billing_terms_xref' => :'String', :'due_days' => :'Integer', :'vendor_number' => :'String', :'vendor_account_number' => :'String', :'vendor_invoice_date' => :'DateTime', :'vendor_invoice_number' => :'String', :'tax_agency_xref' => :'String', :'state_tax_xref' => :'String', :'county_tax_xref' => :'String', :'city_tax_xref' => :'String', :'ship_to_company' => :'CompanyReference', :'ship_to_company_account_number' => :'String', :'ship_to_company_type' => :'CompanyTypeReference', :'ship_to_contact' => :'ContactReference', :'ship_to_site' => :'SiteReference', :'ship_to_tax_group' => :'String', :'tax_code' => :'TaxCodeReference', :'tax_group_rate' => :'Float', :'use_avalara_tax_flag' => :'BOOLEAN', :'purchase_header_tax_group' => :'String', :'purchase_header_taxable_flag' => :'BOOLEAN', :'purchase_header_freight_taxable_flag' => :'BOOLEAN', :'purchase_detail' => :'Array<GLExportPurchaseTransactionDetail>', :'purchase_detail_tax' => :'Array<GLExportPurchaseTransactionDetailTax>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 432 433 434 435 436 437 438 439 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 393 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && document_date == o.document_date && document_number == o.document_number && description == o.description && memo == o.memo && ap_account_number == o.ap_account_number && purchase_date == o.purchase_date && company == o.company && company_type == o.company_type && contact == o.contact && site == o.site && purchase_class == o.purchase_class && freight_amount == o.freight_amount && freight_packing_slip == o.freight_packing_slip && packing_slip == o.packing_slip && dropship_flag == o.dropship_flag && currency == o.currency && total == o.total && billing_terms == o.billing_terms && billing_terms_xref == o.billing_terms_xref && due_days == o.due_days && vendor_number == o.vendor_number && vendor_account_number == o.vendor_account_number && vendor_invoice_date == o.vendor_invoice_date && vendor_invoice_number == o.vendor_invoice_number && tax_agency_xref == o.tax_agency_xref && state_tax_xref == o.state_tax_xref && county_tax_xref == o.county_tax_xref && city_tax_xref == o.city_tax_xref && ship_to_company == o.ship_to_company && ship_to_company_account_number == o.ship_to_company_account_number && ship_to_company_type == o.ship_to_company_type && ship_to_contact == o.ship_to_contact && ship_to_site == o.ship_to_site && ship_to_tax_group == o.ship_to_tax_group && tax_code == o.tax_code && tax_group_rate == o.tax_group_rate && use_avalara_tax_flag == o.use_avalara_tax_flag && purchase_header_tax_group == o.purchase_header_tax_group && purchase_header_taxable_flag == o.purchase_header_taxable_flag && purchase_header_freight_taxable_flag == o.purchase_header_freight_taxable_flag && purchase_detail == o.purchase_detail && purchase_detail_tax == o.purchase_detail_tax end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 510 511 512 513 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 477 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
543 544 545 546 547 548 549 550 551 552 553 554 555 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 543 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
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 456 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
443 444 445 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 443 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
449 450 451 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 449 def hash [id, document_date, document_number, description, memo, ap_account_number, purchase_date, company, company_type, contact, site, purchase_class, freight_amount, freight_packing_slip, packing_slip, dropship_flag, currency, total, billing_terms, billing_terms_xref, due_days, vendor_number, vendor_account_number, vendor_invoice_date, vendor_invoice_number, tax_agency_xref, state_tax_xref, county_tax_xref, city_tax_xref, ship_to_company, ship_to_company_account_number, ship_to_company_type, ship_to_contact, ship_to_site, ship_to_tax_group, tax_code, tax_group_rate, use_avalara_tax_flag, purchase_header_tax_group, purchase_header_taxable_flag, purchase_header_freight_taxable_flag, purchase_detail, purchase_detail_tax].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
380 381 382 383 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 380 def list_invalid_properties invalid_properties = Array.new return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
523 524 525 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 523 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
529 530 531 532 533 534 535 536 537 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 529 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
517 518 519 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 517 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
387 388 389 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_purchase_transaction.rb', line 387 def valid? return true end |