Class: ConnectWise::GLExportCustomer
- Inherits:
-
Object
- Object
- ConnectWise::GLExportCustomer
- Defined in:
- lib/connectwise-ruby-sdk/models/gl_export_customer.rb
Instance Attribute Summary collapse
-
#account_number ⇒ Object
Returns the value of attribute 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_agency_xref ⇒ Object
Returns the value of attribute city_tax_agency_xref.
-
#city_tax_rate ⇒ Object
Returns the value of attribute city_tax_rate.
-
#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.
-
#composite_tax_agency_xref ⇒ Object
Returns the value of attribute composite_tax_agency_xref.
-
#composite_tax_rate ⇒ Object
Returns the value of attribute composite_tax_rate.
-
#composite_tax_xref ⇒ Object
Returns the value of attribute composite_tax_xref.
-
#contact ⇒ Object
Returns the value of attribute contact.
-
#country_tax_agency_xref ⇒ Object
Returns the value of attribute country_tax_agency_xref.
-
#country_tax_rate ⇒ Object
Returns the value of attribute country_tax_rate.
-
#country_tax_xref ⇒ Object
Returns the value of attribute country_tax_xref.
-
#county_tax_agency_xref ⇒ Object
Returns the value of attribute county_tax_agency_xref.
-
#county_tax_rate ⇒ Object
Returns the value of attribute county_tax_rate.
-
#county_tax_xref ⇒ Object
Returns the value of attribute county_tax_xref.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#due_days ⇒ Object
Returns the value of attribute due_days.
-
#site ⇒ Object
Returns the value of attribute site.
-
#state_tax_agency_xref ⇒ Object
Returns the value of attribute state_tax_agency_xref.
-
#state_tax_rate ⇒ Object
Returns the value of attribute state_tax_rate.
-
#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.
-
#taxable ⇒ Object
Returns the value of attribute taxable.
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 = {}) ⇒ GLExportCustomer
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 = {}) ⇒ GLExportCustomer
Initializes the object
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 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 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 134 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?(:'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?(:'accountNumber') self.account_number = attributes[:'accountNumber'] 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?(:'taxable') self.taxable = attributes[:'taxable'] end if attributes.has_key?(:'taxCode') self.tax_code = attributes[:'taxCode'] end if attributes.has_key?(:'currency') self.currency = attributes[:'currency'] 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?(:'countryTaxXref') self.country_tax_xref = attributes[:'countryTaxXref'] end if attributes.has_key?(:'compositeTaxXref') self.composite_tax_xref = attributes[:'compositeTaxXref'] end if attributes.has_key?(:'stateTaxRate') self.state_tax_rate = attributes[:'stateTaxRate'] end if attributes.has_key?(:'countyTaxRate') self.county_tax_rate = attributes[:'countyTaxRate'] end if attributes.has_key?(:'cityTaxRate') self.city_tax_rate = attributes[:'cityTaxRate'] end if attributes.has_key?(:'countryTaxRate') self.country_tax_rate = attributes[:'countryTaxRate'] end if attributes.has_key?(:'compositeTaxRate') self.composite_tax_rate = attributes[:'compositeTaxRate'] end if attributes.has_key?(:'taxGroupRate') self.tax_group_rate = attributes[:'taxGroupRate'] end if attributes.has_key?(:'taxAgencyXref') self.tax_agency_xref = attributes[:'taxAgencyXref'] end if attributes.has_key?(:'stateTaxAgencyXref') self.state_tax_agency_xref = attributes[:'stateTaxAgencyXref'] end if attributes.has_key?(:'countyTaxAgencyXref') self.county_tax_agency_xref = attributes[:'countyTaxAgencyXref'] end if attributes.has_key?(:'cityTaxAgencyXref') self.city_tax_agency_xref = attributes[:'cityTaxAgencyXref'] end if attributes.has_key?(:'countryTaxAgencyXref') self.country_tax_agency_xref = attributes[:'countryTaxAgencyXref'] end if attributes.has_key?(:'compositeTaxAgencyXref') self.composite_tax_agency_xref = attributes[:'compositeTaxAgencyXref'] end end |
Instance Attribute Details
#account_number ⇒ Object
Returns the value of attribute account_number.
15 16 17 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 15 def account_number @account_number end |
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
17 18 19 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 17 def billing_terms @billing_terms end |
#billing_terms_xref ⇒ Object
Returns the value of attribute billing_terms_xref.
19 20 21 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 19 def billing_terms_xref @billing_terms_xref end |
#city_tax_agency_xref ⇒ Object
Returns the value of attribute city_tax_agency_xref.
57 58 59 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 57 def city_tax_agency_xref @city_tax_agency_xref end |
#city_tax_rate ⇒ Object
Returns the value of attribute city_tax_rate.
43 44 45 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 43 def city_tax_rate @city_tax_rate end |
#city_tax_xref ⇒ Object
Returns the value of attribute city_tax_xref.
33 34 35 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 33 def city_tax_xref @city_tax_xref end |
#company ⇒ Object
Returns the value of attribute company.
7 8 9 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 7 def company @company end |
#company_type ⇒ Object
Returns the value of attribute company_type.
9 10 11 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 9 def company_type @company_type end |
#composite_tax_agency_xref ⇒ Object
Returns the value of attribute composite_tax_agency_xref.
61 62 63 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 61 def composite_tax_agency_xref @composite_tax_agency_xref end |
#composite_tax_rate ⇒ Object
Returns the value of attribute composite_tax_rate.
47 48 49 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 47 def composite_tax_rate @composite_tax_rate end |
#composite_tax_xref ⇒ Object
Returns the value of attribute composite_tax_xref.
37 38 39 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 37 def composite_tax_xref @composite_tax_xref end |
#contact ⇒ Object
Returns the value of attribute contact.
11 12 13 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 11 def contact @contact end |
#country_tax_agency_xref ⇒ Object
Returns the value of attribute country_tax_agency_xref.
59 60 61 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 59 def country_tax_agency_xref @country_tax_agency_xref end |
#country_tax_rate ⇒ Object
Returns the value of attribute country_tax_rate.
45 46 47 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 45 def country_tax_rate @country_tax_rate end |
#country_tax_xref ⇒ Object
Returns the value of attribute country_tax_xref.
35 36 37 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 35 def country_tax_xref @country_tax_xref end |
#county_tax_agency_xref ⇒ Object
Returns the value of attribute county_tax_agency_xref.
55 56 57 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 55 def county_tax_agency_xref @county_tax_agency_xref end |
#county_tax_rate ⇒ Object
Returns the value of attribute county_tax_rate.
41 42 43 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 41 def county_tax_rate @county_tax_rate end |
#county_tax_xref ⇒ Object
Returns the value of attribute county_tax_xref.
31 32 33 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 31 def county_tax_xref @county_tax_xref end |
#currency ⇒ Object
Returns the value of attribute currency.
27 28 29 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 27 def currency @currency end |
#due_days ⇒ Object
Returns the value of attribute due_days.
21 22 23 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 21 def due_days @due_days end |
#site ⇒ Object
Returns the value of attribute site.
13 14 15 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 13 def site @site end |
#state_tax_agency_xref ⇒ Object
Returns the value of attribute state_tax_agency_xref.
53 54 55 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 53 def state_tax_agency_xref @state_tax_agency_xref end |
#state_tax_rate ⇒ Object
Returns the value of attribute state_tax_rate.
39 40 41 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 39 def state_tax_rate @state_tax_rate end |
#state_tax_xref ⇒ Object
Returns the value of attribute state_tax_xref.
29 30 31 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 29 def state_tax_xref @state_tax_xref end |
#tax_agency_xref ⇒ Object
Returns the value of attribute tax_agency_xref.
51 52 53 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 51 def tax_agency_xref @tax_agency_xref end |
#tax_code ⇒ Object
Returns the value of attribute tax_code.
25 26 27 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 25 def tax_code @tax_code end |
#tax_group_rate ⇒ Object
Returns the value of attribute tax_group_rate.
49 50 51 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 49 def tax_group_rate @tax_group_rate end |
#taxable ⇒ Object
Returns the value of attribute taxable.
23 24 25 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 23 def taxable @taxable end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 65 def self.attribute_map { :'company' => :'company', :'company_type' => :'companyType', :'contact' => :'contact', :'site' => :'site', :'account_number' => :'accountNumber', :'billing_terms' => :'billingTerms', :'billing_terms_xref' => :'billingTermsXref', :'due_days' => :'dueDays', :'taxable' => :'taxable', :'tax_code' => :'taxCode', :'currency' => :'currency', :'state_tax_xref' => :'stateTaxXref', :'county_tax_xref' => :'countyTaxXref', :'city_tax_xref' => :'cityTaxXref', :'country_tax_xref' => :'countryTaxXref', :'composite_tax_xref' => :'compositeTaxXref', :'state_tax_rate' => :'stateTaxRate', :'county_tax_rate' => :'countyTaxRate', :'city_tax_rate' => :'cityTaxRate', :'country_tax_rate' => :'countryTaxRate', :'composite_tax_rate' => :'compositeTaxRate', :'tax_group_rate' => :'taxGroupRate', :'tax_agency_xref' => :'taxAgencyXref', :'state_tax_agency_xref' => :'stateTaxAgencyXref', :'county_tax_agency_xref' => :'countyTaxAgencyXref', :'city_tax_agency_xref' => :'cityTaxAgencyXref', :'country_tax_agency_xref' => :'countryTaxAgencyXref', :'composite_tax_agency_xref' => :'compositeTaxAgencyXref' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 99 def self.swagger_types { :'company' => :'CompanyReference', :'company_type' => :'CompanyTypeReference', :'contact' => :'ContactReference', :'site' => :'SiteReference', :'account_number' => :'String', :'billing_terms' => :'BillingTermsReference', :'billing_terms_xref' => :'String', :'due_days' => :'Integer', :'taxable' => :'BOOLEAN', :'tax_code' => :'TaxCodeReference', :'currency' => :'CurrencyReference', :'state_tax_xref' => :'String', :'county_tax_xref' => :'String', :'city_tax_xref' => :'String', :'country_tax_xref' => :'String', :'composite_tax_xref' => :'String', :'state_tax_rate' => :'Float', :'county_tax_rate' => :'Float', :'city_tax_rate' => :'Float', :'country_tax_rate' => :'Float', :'composite_tax_rate' => :'Float', :'tax_group_rate' => :'Float', :'tax_agency_xref' => :'String', :'state_tax_agency_xref' => :'String', :'county_tax_agency_xref' => :'String', :'city_tax_agency_xref' => :'String', :'country_tax_agency_xref' => :'String', :'composite_tax_agency_xref' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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/connectwise-ruby-sdk/models/gl_export_customer.rb', line 269 def ==(o) return true if self.equal?(o) self.class == o.class && company == o.company && company_type == o.company_type && contact == o.contact && site == o.site && account_number == o.account_number && billing_terms == o.billing_terms && billing_terms_xref == o.billing_terms_xref && due_days == o.due_days && taxable == o.taxable && tax_code == o.tax_code && currency == o.currency && state_tax_xref == o.state_tax_xref && county_tax_xref == o.county_tax_xref && city_tax_xref == o.city_tax_xref && country_tax_xref == o.country_tax_xref && composite_tax_xref == o.composite_tax_xref && state_tax_rate == o.state_tax_rate && county_tax_rate == o.county_tax_rate && city_tax_rate == o.city_tax_rate && country_tax_rate == o.country_tax_rate && composite_tax_rate == o.composite_tax_rate && tax_group_rate == o.tax_group_rate && tax_agency_xref == o.tax_agency_xref && state_tax_agency_xref == o.state_tax_agency_xref && county_tax_agency_xref == o.county_tax_agency_xref && city_tax_agency_xref == o.city_tax_agency_xref && country_tax_agency_xref == o.country_tax_agency_xref && composite_tax_agency_xref == o.composite_tax_agency_xref end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 338 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
404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 404 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
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 317 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
304 305 306 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 304 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
310 311 312 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 310 def hash [company, company_type, contact, site, account_number, billing_terms, billing_terms_xref, due_days, taxable, tax_code, currency, state_tax_xref, county_tax_xref, city_tax_xref, country_tax_xref, composite_tax_xref, state_tax_rate, county_tax_rate, city_tax_rate, country_tax_rate, composite_tax_rate, tax_group_rate, tax_agency_xref, state_tax_agency_xref, county_tax_agency_xref, city_tax_agency_xref, country_tax_agency_xref, composite_tax_agency_xref].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
256 257 258 259 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 256 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)
384 385 386 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 384 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
390 391 392 393 394 395 396 397 398 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 390 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
378 379 380 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 378 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
263 264 265 |
# File 'lib/connectwise-ruby-sdk/models/gl_export_customer.rb', line 263 def valid? return true end |