Class: ConnectWise::GLExportPurchaseTransactionDetail

Inherits:
Object
  • Object
show all
Defined in:
lib/connect_wise/models/gl_export_purchase_transaction_detail.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ GLExportPurchaseTransactionDetail

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Raises:

  • (ArgumentError)


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/gl_export_purchase_transaction_detail.rb', line 140

def initialize(attributes = {})
  raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::GLExportPurchaseTransactionDetail` 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::GLExportPurchaseTransactionDetail`. 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.document_date = attributes[:document_date] if attributes.key?(:document_date)

  self.gl_class = attributes[:gl_class] if attributes.key?(:gl_class)

  self.gl_type_id = attributes[:gl_type_id] if attributes.key?(:gl_type_id)

  self.gl_item_id = attributes[:gl_item_id] if attributes.key?(:gl_item_id)

  self.sales_code = attributes[:sales_code] if attributes.key?(:sales_code)

  self.description = attributes[:description] if attributes.key?(:description)

  self.cost = attributes[:cost] if attributes.key?(:cost)

  self.memo = attributes[:memo] if attributes.key?(:memo)

  self.tax_note = attributes[:tax_note] if attributes.key?(:tax_note)

  self.vendor_number = attributes[:vendor_number] if attributes.key?(:vendor_number)

  self. = attributes[:account_number] if attributes.key?(:account_number)

  self. = attributes[:cost_account_number] if attributes.key?(:cost_account_number)

  self. = attributes[:inventory_account_number] if attributes.key?(:inventory_account_number)

  self. = attributes[:vendor_account_number] if attributes.key?(:vendor_account_number)

  self.item = attributes[:item] if attributes.key?(:item)

  self.item_description = attributes[:item_description] if attributes.key?(:item_description)

  self.sales_description = attributes[:sales_description] if attributes.key?(:sales_description)

  self.taxable = attributes[:taxable] if attributes.key?(:taxable)

  self.item_price = attributes[:item_price] if attributes.key?(:item_price)

  self.item_cost = attributes[:item_cost] if attributes.key?(:item_cost)

  self.unit_of_measure = attributes[:unit_of_measure] if attributes.key?(:unit_of_measure)

  self.quantity = attributes[:quantity] if attributes.key?(:quantity)

  self.total = attributes[:total] if attributes.key?(:total)

  self.currency = attributes[:currency] if attributes.key?(:currency)

  self.serialized_flag = attributes[:serialized_flag] if attributes.key?(:serialized_flag)

  self.serial_numbers = attributes[:serial_numbers] if attributes.key?(:serial_numbers)

  self.drop_shipped_flag = attributes[:drop_shipped_flag] if attributes.key?(:drop_shipped_flag)

  self.line_number = attributes[:line_number] if attributes.key?(:line_number)

  self.warehouse_bin = attributes[:warehouse_bin] if attributes.key?(:warehouse_bin)

  self.warehouse_site = attributes[:warehouse_site] if attributes.key?(:warehouse_site)

  self.sub_category = attributes[:sub_category] if attributes.key?(:sub_category)

  self.shipment_method = attributes[:shipment_method] if attributes.key?(:shipment_method)

  self.item_type_xref = attributes[:item_type_xref] if attributes.key?(:item_type_xref)

  self.inventory_xref = attributes[:inventory_xref] if attributes.key?(:inventory_xref)

  self.cogs_xref = attributes[:cogs_xref] if attributes.key?(:cogs_xref)

  self.uom_schedule_xref = attributes[:uom_schedule_xref] if attributes.key?(:uom_schedule_xref)

  self.price_level_xref = attributes[:price_level_xref] if attributes.key?(:price_level_xref)

  self.location_xref = attributes[:location_xref] if attributes.key?(:location_xref)

  self.tax_code = attributes[:tax_code] if attributes.key?(:tax_code)

  self.purchase_header_tax_group = attributes[:purchase_header_tax_group] if attributes.key?(:purchase_header_tax_group)

  self.tax_code_xref = attributes[:tax_code_xref] if attributes.key?(:tax_code_xref)

  self.tax_rate = attributes[:tax_rate] if attributes.key?(:tax_rate)

  return unless attributes.key?(:tax_agency_xref)

  self.tax_agency_xref = attributes[:tax_agency_xref]
end

Instance Attribute Details

#account_numberObject

Returns the value of attribute account_number.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def 
  @account_number
end

#cogs_xrefObject

Returns the value of attribute cogs_xref.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def cogs_xref
  @cogs_xref
end

#costObject

Returns the value of attribute cost.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def cost
  @cost
end

#cost_account_numberObject

Returns the value of attribute cost_account_number.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def 
  @cost_account_number
end

#currencyObject

Returns the value of attribute currency.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def currency
  @currency
end

#descriptionObject

Returns the value of attribute description.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def description
  @description
end

#document_dateObject

Returns the value of attribute document_date.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def document_date
  @document_date
end

#drop_shipped_flagObject

Returns the value of attribute drop_shipped_flag.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def drop_shipped_flag
  @drop_shipped_flag
end

#gl_classObject

Returns the value of attribute gl_class.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def gl_class
  @gl_class
end

#gl_item_idObject

Returns the value of attribute gl_item_id.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def gl_item_id
  @gl_item_id
end

#gl_type_idObject

Returns the value of attribute gl_type_id.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def gl_type_id
  @gl_type_id
end

#idObject

Returns the value of attribute id.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def id
  @id
end

#inventory_account_numberObject

Returns the value of attribute inventory_account_number.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def 
  @inventory_account_number
end

#inventory_xrefObject

Returns the value of attribute inventory_xref.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def inventory_xref
  @inventory_xref
end

#itemObject

Returns the value of attribute item.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def item
  @item
end

#item_costObject

Returns the value of attribute item_cost.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def item_cost
  @item_cost
end

#item_descriptionObject

Returns the value of attribute item_description.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def item_description
  @item_description
end

#item_priceObject

Returns the value of attribute item_price.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def item_price
  @item_price
end

#item_type_xrefObject

Returns the value of attribute item_type_xref.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def item_type_xref
  @item_type_xref
end

#line_numberObject

Returns the value of attribute line_number.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def line_number
  @line_number
end

#location_xrefObject

Returns the value of attribute location_xref.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def location_xref
  @location_xref
end

#memoObject

Returns the value of attribute memo.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def memo
  @memo
end

#price_level_xrefObject

Returns the value of attribute price_level_xref.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def price_level_xref
  @price_level_xref
end

#purchase_header_tax_groupObject

Returns the value of attribute purchase_header_tax_group.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def purchase_header_tax_group
  @purchase_header_tax_group
end

#quantityObject

Returns the value of attribute quantity.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def quantity
  @quantity
end

#sales_codeObject

Returns the value of attribute sales_code.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def sales_code
  @sales_code
end

#sales_descriptionObject

Returns the value of attribute sales_description.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def sales_description
  @sales_description
end

#serial_numbersObject

Returns the value of attribute serial_numbers.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def serial_numbers
  @serial_numbers
end

#serialized_flagObject

Returns the value of attribute serialized_flag.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def serialized_flag
  @serialized_flag
end

#shipment_methodObject

Returns the value of attribute shipment_method.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def shipment_method
  @shipment_method
end

#sub_categoryObject

Returns the value of attribute sub_category.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def sub_category
  @sub_category
end

#tax_agency_xrefObject

Returns the value of attribute tax_agency_xref.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def tax_agency_xref
  @tax_agency_xref
end

#tax_codeObject

Returns the value of attribute tax_code.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def tax_code
  @tax_code
end

#tax_code_xrefObject

Returns the value of attribute tax_code_xref.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def tax_code_xref
  @tax_code_xref
end

#tax_noteObject

Returns the value of attribute tax_note.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def tax_note
  @tax_note
end

#tax_rateObject

Returns the value of attribute tax_rate.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def tax_rate
  @tax_rate
end

#taxableObject

Returns the value of attribute taxable.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def taxable
  @taxable
end

#totalObject

Returns the value of attribute total.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def total
  @total
end

#unit_of_measureObject

Returns the value of attribute unit_of_measure.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def unit_of_measure
  @unit_of_measure
end

#uom_schedule_xrefObject

Returns the value of attribute uom_schedule_xref.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def uom_schedule_xref
  @uom_schedule_xref
end

#vendor_account_numberObject

Returns the value of attribute vendor_account_number.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def 
  @vendor_account_number
end

#vendor_numberObject

Returns the value of attribute vendor_number.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def vendor_number
  @vendor_number
end

#warehouse_binObject

Returns the value of attribute warehouse_bin.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def warehouse_bin
  @warehouse_bin
end

#warehouse_siteObject

Returns the value of attribute warehouse_site.



16
17
18
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 16

def warehouse_site
  @warehouse_site
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



69
70
71
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 69

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



19
20
21
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/gl_export_purchase_transaction_detail.rb', line 19

def self.attribute_map
  {
    id: :id,
    document_date: :documentDate,
    gl_class: :glClass,
    gl_type_id: :glTypeId,
    gl_item_id: :glItemId,
    sales_code: :salesCode,
    description: :description,
    cost: :cost,
    memo: :memo,
    tax_note: :taxNote,
    vendor_number: :vendorNumber,
    account_number: :accountNumber,
    cost_account_number: :costAccountNumber,
    inventory_account_number: :inventoryAccountNumber,
    vendor_account_number: :vendorAccountNumber,
    item: :item,
    item_description: :itemDescription,
    sales_description: :salesDescription,
    taxable: :taxable,
    item_price: :itemPrice,
    item_cost: :itemCost,
    unit_of_measure: :unitOfMeasure,
    quantity: :quantity,
    total: :total,
    currency: :currency,
    serialized_flag: :serializedFlag,
    serial_numbers: :serialNumbers,
    drop_shipped_flag: :dropShippedFlag,
    line_number: :lineNumber,
    warehouse_bin: :warehouseBin,
    warehouse_site: :warehouseSite,
    sub_category: :subCategory,
    shipment_method: :shipmentMethod,
    item_type_xref: :itemTypeXref,
    inventory_xref: :inventoryXref,
    cogs_xref: :cogsXref,
    uom_schedule_xref: :uomScheduleXref,
    price_level_xref: :priceLevelXref,
    location_xref: :locationXref,
    tax_code: :taxCode,
    purchase_header_tax_group: :purchaseHeaderTaxGroup,
    tax_code_xref: :taxCodeXref,
    tax_rate: :taxRate,
    tax_agency_xref: :taxAgencyXref
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



320
321
322
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 320

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 124

def self.openapi_nullable
  Set.new(%i[
            id
            cost
            taxable
            item_price
            item_cost
            quantity
            total
            serialized_flag
            drop_shipped_flag
          ])
end

.openapi_typesObject

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
119
120
121
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 74

def self.openapi_types
  {
    id: :Integer,
    document_date: :String,
    gl_class: :String,
    gl_type_id: :String,
    gl_item_id: :String,
    sales_code: :String,
    description: :String,
    cost: :Float,
    memo: :String,
    tax_note: :String,
    vendor_number: :String,
    account_number: :String,
    cost_account_number: :String,
    inventory_account_number: :String,
    vendor_account_number: :String,
    item: :IvItemReference,
    item_description: :String,
    sales_description: :String,
    taxable: :Boolean,
    item_price: :Float,
    item_cost: :Float,
    unit_of_measure: :UnitOfMeasureReference,
    quantity: :Float,
    total: :Float,
    currency: :CurrencyReference,
    serialized_flag: :Boolean,
    serial_numbers: :String,
    drop_shipped_flag: :Boolean,
    line_number: :Integer,
    warehouse_bin: :WarehouseBinReference,
    warehouse_site: :SiteReference,
    sub_category: :ProductSubCategoryReference,
    shipment_method: :ShipmentMethodReference,
    item_type_xref: :String,
    inventory_xref: :String,
    cogs_xref: :String,
    uom_schedule_xref: :String,
    price_level_xref: :String,
    location_xref: :String,
    tax_code: :TaxCodeReference,
    purchase_header_tax_group: :String,
    tax_code_xref: :String,
    tax_rate: :Float,
    tax_agency_xref: :String
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 255

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    document_date == other.document_date &&
    gl_class == other.gl_class &&
    gl_type_id == other.gl_type_id &&
    gl_item_id == other.gl_item_id &&
    sales_code == other.sales_code &&
    description == other.description &&
    cost == other.cost &&
    memo == other.memo &&
    tax_note == other.tax_note &&
    vendor_number == other.vendor_number &&
     == other. &&
     == other. &&
     == other. &&
     == other. &&
    item == other.item &&
    item_description == other.item_description &&
    sales_description == other.sales_description &&
    taxable == other.taxable &&
    item_price == other.item_price &&
    item_cost == other.item_cost &&
    unit_of_measure == other.unit_of_measure &&
    quantity == other.quantity &&
    total == other.total &&
    currency == other.currency &&
    serialized_flag == other.serialized_flag &&
    serial_numbers == other.serial_numbers &&
    drop_shipped_flag == other.drop_shipped_flag &&
    line_number == other.line_number &&
    warehouse_bin == other.warehouse_bin &&
    warehouse_site == other.warehouse_site &&
    sub_category == other.sub_category &&
    shipment_method == other.shipment_method &&
    item_type_xref == other.item_type_xref &&
    inventory_xref == other.inventory_xref &&
    cogs_xref == other.cogs_xref &&
    uom_schedule_xref == other.uom_schedule_xref &&
    price_level_xref == other.price_level_xref &&
    location_xref == other.location_xref &&
    tax_code == other.tax_code &&
    purchase_header_tax_group == other.purchase_header_tax_group &&
    tax_code_xref == other.tax_code_xref &&
    tax_rate == other.tax_rate &&
    tax_agency_xref == other.tax_agency_xref
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 350

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



421
422
423
424
425
426
427
428
429
430
431
432
433
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 421

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 327

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


307
308
309
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 307

def eql?(other)
  self == other
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



313
314
315
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 313

def hash
  [id, document_date, gl_class, gl_type_id, gl_item_id, sales_code, description, cost, memo, tax_note, vendor_number, , , , , item, item_description, sales_description, taxable, item_price, item_cost, unit_of_measure, quantity, total, currency, serialized_flag, serial_numbers, drop_shipped_flag, line_number, warehouse_bin, warehouse_site, sub_category, shipment_method, item_type_xref, inventory_xref, cogs_xref, uom_schedule_xref, price_level_xref, location_xref, tax_code, purchase_header_tax_group, tax_code_xref, tax_rate, tax_agency_xref].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



243
244
245
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 243

def list_invalid_properties
  []
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



397
398
399
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 397

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



403
404
405
406
407
408
409
410
411
412
413
414
415
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 403

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



391
392
393
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 391

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



249
250
251
# File 'lib/connect_wise/models/gl_export_purchase_transaction_detail.rb', line 249

def valid?
  true
end