Class: ConnectWise::GLExportInventoryTransfer

Inherits:
Object
  • Object
show all
Defined in:
lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ GLExportInventoryTransfer

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 190

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?(:'documentType')
    self.document_type = attributes[:'documentType']
  end

  if attributes.has_key?(:'documentDate')
    self.document_date = attributes[:'documentDate']
  end

  if attributes.has_key?(:'accountNumber')
    self. = attributes[:'accountNumber']
  end

  if attributes.has_key?(:'glClass')
    self.gl_class = attributes[:'glClass']
  end

  if attributes.has_key?(:'glTypeId')
    self.gl_type_id = attributes[:'glTypeId']
  end

  if attributes.has_key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.has_key?(:'salesCode')
    self.sales_code = attributes[:'salesCode']
  end

  if attributes.has_key?(:'memo')
    self.memo = attributes[:'memo']
  end

  if attributes.has_key?(:'costAcccountNumber')
    self.cost_acccount_number = attributes[:'costAcccountNumber']
  end

  if attributes.has_key?(:'inventoryAccountNumber')
    self. = attributes[:'inventoryAccountNumber']
  end

  if attributes.has_key?(:'transferId')
    self.transfer_id = attributes[:'transferId']
  end

  if attributes.has_key?(:'item')
    self.item = attributes[:'item']
  end

  if attributes.has_key?(:'glItemId')
    self.gl_item_id = attributes[:'glItemId']
  end

  if attributes.has_key?(:'salesDescription')
    self.sales_description = attributes[:'salesDescription']
  end

  if attributes.has_key?(:'itemDescription')
    self.item_description = attributes[:'itemDescription']
  end

  if attributes.has_key?(:'currency')
    self.currency = attributes[:'currency']
  end

  if attributes.has_key?(:'itemPrice')
    self.item_price = attributes[:'itemPrice']
  end

  if attributes.has_key?(:'taxable')
    self.taxable = attributes[:'taxable']
  end

  if attributes.has_key?(:'unitOfMeasure')
    self.unit_of_measure = attributes[:'unitOfMeasure']
  end

  if attributes.has_key?(:'quantity')
    self.quantity = attributes[:'quantity']
  end

  if attributes.has_key?(:'cost')
    self.cost = attributes[:'cost']
  end

  if attributes.has_key?(:'total')
    self.total = attributes[:'total']
  end

  if attributes.has_key?(:'subCategory')
    self.sub_category = attributes[:'subCategory']
  end

  if attributes.has_key?(:'serializedFlag')
    self.serialized_flag = attributes[:'serializedFlag']
  end

  if attributes.has_key?(:'serialNumbers')
    self.serial_numbers = attributes[:'serialNumbers']
  end

  if attributes.has_key?(:'shipmentMethod')
    self.shipment_method = attributes[:'shipmentMethod']
  end

  if attributes.has_key?(:'bin')
    self.bin = attributes[:'bin']
  end

  if attributes.has_key?(:'warehouse')
    self.warehouse = attributes[:'warehouse']
  end

  if attributes.has_key?(:'transferFromBin')
    self.transfer_from_bin = attributes[:'transferFromBin']
  end

  if attributes.has_key?(:'transferFromLocationXref')
    self.transfer_from_location_xref = attributes[:'transferFromLocationXref']
  end

  if attributes.has_key?(:'transferToBin')
    self.transfer_to_bin = attributes[:'transferToBin']
  end

  if attributes.has_key?(:'transferToLocationXref')
    self.transfer_to_location_xref = attributes[:'transferToLocationXref']
  end

  if attributes.has_key?(:'locationXref')
    self.location_xref = attributes[:'locationXref']
  end

  if attributes.has_key?(:'priceLevelXref')
    self.price_level_xref = attributes[:'priceLevelXref']
  end

  if attributes.has_key?(:'uomScheduleXref')
    self.uom_schedule_xref = attributes[:'uomScheduleXref']
  end

  if attributes.has_key?(:'itemTypeXref')
    self.item_type_xref = attributes[:'itemTypeXref']
  end

  if attributes.has_key?(:'inventoryXref')
    self.inventory_xref = attributes[:'inventoryXref']
  end

  if attributes.has_key?(:'cogsXref')
    self.cogs_xref = attributes[:'cogsXref']
  end

  if attributes.has_key?(:'taxNote')
    self.tax_note = attributes[:'taxNote']
  end

  if attributes.has_key?(:'taxCode')
    self.tax_code = attributes[:'taxCode']
  end

  if attributes.has_key?(:'offset')
    self.offset = attributes[:'offset']
  end

end

Instance Attribute Details

#account_numberObject

Returns the value of attribute account_number.



13
14
15
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 13

def 
  @account_number
end

#binObject

Returns the value of attribute bin.



61
62
63
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 61

def bin
  @bin
end

#cogs_xrefObject

Returns the value of attribute cogs_xref.



83
84
85
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 83

def cogs_xref
  @cogs_xref
end

#costObject

Returns the value of attribute cost.



49
50
51
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 49

def cost
  @cost
end

#cost_acccount_numberObject

Returns the value of attribute cost_acccount_number.



25
26
27
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 25

def cost_acccount_number
  @cost_acccount_number
end

#currencyObject

Returns the value of attribute currency.



39
40
41
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 39

def currency
  @currency
end

#descriptionObject

Returns the value of attribute description.



19
20
21
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 19

def description
  @description
end

#document_dateObject

Returns the value of attribute document_date.



11
12
13
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 11

def document_date
  @document_date
end

#document_typeObject

Returns the value of attribute document_type.



9
10
11
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 9

def document_type
  @document_type
end

#gl_classObject

Returns the value of attribute gl_class.



15
16
17
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 15

def gl_class
  @gl_class
end

#gl_item_idObject

Returns the value of attribute gl_item_id.



33
34
35
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 33

def gl_item_id
  @gl_item_id
end

#gl_type_idObject

Returns the value of attribute gl_type_id.



17
18
19
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 17

def gl_type_id
  @gl_type_id
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 7

def id
  @id
end

#inventory_account_numberObject

Returns the value of attribute inventory_account_number.



27
28
29
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 27

def 
  @inventory_account_number
end

#inventory_xrefObject

Returns the value of attribute inventory_xref.



81
82
83
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 81

def inventory_xref
  @inventory_xref
end

#itemObject

Returns the value of attribute item.



31
32
33
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 31

def item
  @item
end

#item_descriptionObject

Returns the value of attribute item_description.



37
38
39
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 37

def item_description
  @item_description
end

#item_priceObject

Returns the value of attribute item_price.



41
42
43
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 41

def item_price
  @item_price
end

#item_type_xrefObject

Returns the value of attribute item_type_xref.



79
80
81
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 79

def item_type_xref
  @item_type_xref
end

#location_xrefObject

Returns the value of attribute location_xref.



73
74
75
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 73

def location_xref
  @location_xref
end

#memoObject

Returns the value of attribute memo.



23
24
25
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 23

def memo
  @memo
end

#offsetObject

Returns the value of attribute offset.



89
90
91
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 89

def offset
  @offset
end

#price_level_xrefObject

Returns the value of attribute price_level_xref.



75
76
77
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 75

def price_level_xref
  @price_level_xref
end

#quantityObject

Returns the value of attribute quantity.



47
48
49
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 47

def quantity
  @quantity
end

#sales_codeObject

Returns the value of attribute sales_code.



21
22
23
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 21

def sales_code
  @sales_code
end

#sales_descriptionObject

Returns the value of attribute sales_description.



35
36
37
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 35

def sales_description
  @sales_description
end

#serial_numbersObject

Returns the value of attribute serial_numbers.



57
58
59
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 57

def serial_numbers
  @serial_numbers
end

#serialized_flagObject

Returns the value of attribute serialized_flag.



55
56
57
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 55

def serialized_flag
  @serialized_flag
end

#shipment_methodObject

Returns the value of attribute shipment_method.



59
60
61
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 59

def shipment_method
  @shipment_method
end

#sub_categoryObject

Returns the value of attribute sub_category.



53
54
55
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 53

def sub_category
  @sub_category
end

#tax_codeObject

Returns the value of attribute tax_code.



87
88
89
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 87

def tax_code
  @tax_code
end

#tax_noteObject

Returns the value of attribute tax_note.



85
86
87
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 85

def tax_note
  @tax_note
end

#taxableObject

Returns the value of attribute taxable.



43
44
45
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 43

def taxable
  @taxable
end

#totalObject

Returns the value of attribute total.



51
52
53
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 51

def total
  @total
end

#transfer_from_binObject

Returns the value of attribute transfer_from_bin.



65
66
67
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 65

def transfer_from_bin
  @transfer_from_bin
end

#transfer_from_location_xrefObject

Returns the value of attribute transfer_from_location_xref.



67
68
69
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 67

def transfer_from_location_xref
  @transfer_from_location_xref
end

#transfer_idObject

Returns the value of attribute transfer_id.



29
30
31
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 29

def transfer_id
  @transfer_id
end

#transfer_to_binObject

Returns the value of attribute transfer_to_bin.



69
70
71
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 69

def transfer_to_bin
  @transfer_to_bin
end

#transfer_to_location_xrefObject

Returns the value of attribute transfer_to_location_xref.



71
72
73
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 71

def transfer_to_location_xref
  @transfer_to_location_xref
end

#unit_of_measureObject

Returns the value of attribute unit_of_measure.



45
46
47
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 45

def unit_of_measure
  @unit_of_measure
end

#uom_schedule_xrefObject

Returns the value of attribute uom_schedule_xref.



77
78
79
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 77

def uom_schedule_xref
  @uom_schedule_xref
end

#warehouseObject

Returns the value of attribute warehouse.



63
64
65
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 63

def warehouse
  @warehouse
end

Class Method Details

.attribute_mapObject

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



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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 93

def self.attribute_map
  {
    :'id' => :'id',
    :'document_type' => :'documentType',
    :'document_date' => :'documentDate',
    :'account_number' => :'accountNumber',
    :'gl_class' => :'glClass',
    :'gl_type_id' => :'glTypeId',
    :'description' => :'description',
    :'sales_code' => :'salesCode',
    :'memo' => :'memo',
    :'cost_acccount_number' => :'costAcccountNumber',
    :'inventory_account_number' => :'inventoryAccountNumber',
    :'transfer_id' => :'transferId',
    :'item' => :'item',
    :'gl_item_id' => :'glItemId',
    :'sales_description' => :'salesDescription',
    :'item_description' => :'itemDescription',
    :'currency' => :'currency',
    :'item_price' => :'itemPrice',
    :'taxable' => :'taxable',
    :'unit_of_measure' => :'unitOfMeasure',
    :'quantity' => :'quantity',
    :'cost' => :'cost',
    :'total' => :'total',
    :'sub_category' => :'subCategory',
    :'serialized_flag' => :'serializedFlag',
    :'serial_numbers' => :'serialNumbers',
    :'shipment_method' => :'shipmentMethod',
    :'bin' => :'bin',
    :'warehouse' => :'warehouse',
    :'transfer_from_bin' => :'transferFromBin',
    :'transfer_from_location_xref' => :'transferFromLocationXref',
    :'transfer_to_bin' => :'transferToBin',
    :'transfer_to_location_xref' => :'transferToLocationXref',
    :'location_xref' => :'locationXref',
    :'price_level_xref' => :'priceLevelXref',
    :'uom_schedule_xref' => :'uomScheduleXref',
    :'item_type_xref' => :'itemTypeXref',
    :'inventory_xref' => :'inventoryXref',
    :'cogs_xref' => :'cogsXref',
    :'tax_note' => :'taxNote',
    :'tax_code' => :'taxCode',
    :'offset' => :'offset'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 141

def self.swagger_types
  {
    :'id' => :'String',
    :'document_type' => :'String',
    :'document_date' => :'DateTime',
    :'account_number' => :'String',
    :'gl_class' => :'String',
    :'gl_type_id' => :'String',
    :'description' => :'String',
    :'sales_code' => :'String',
    :'memo' => :'String',
    :'cost_acccount_number' => :'String',
    :'inventory_account_number' => :'String',
    :'transfer_id' => :'Integer',
    :'item' => :'IvItemReference',
    :'gl_item_id' => :'String',
    :'sales_description' => :'String',
    :'item_description' => :'String',
    :'currency' => :'CurrencyReference',
    :'item_price' => :'Float',
    :'taxable' => :'BOOLEAN',
    :'unit_of_measure' => :'UnitOfMeasureReference',
    :'quantity' => :'Float',
    :'cost' => :'Float',
    :'total' => :'Float',
    :'sub_category' => :'ProductSubCategoryReference',
    :'serialized_flag' => :'BOOLEAN',
    :'serial_numbers' => :'String',
    :'shipment_method' => :'ShipmentMethodReference',
    :'bin' => :'WarehouseBinReference',
    :'warehouse' => :'WarehouseReference',
    :'transfer_from_bin' => :'WarehouseBinReference',
    :'transfer_from_location_xref' => :'String',
    :'transfer_to_bin' => :'WarehouseBinReference',
    :'transfer_to_location_xref' => :'String',
    :'location_xref' => :'String',
    :'price_level_xref' => :'String',
    :'uom_schedule_xref' => :'String',
    :'item_type_xref' => :'String',
    :'inventory_xref' => :'String',
    :'cogs_xref' => :'String',
    :'tax_note' => :'String',
    :'tax_code' => :'TaxCodeReference',
    :'offset' => :'GLExportInventoryTransferOffset'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 381

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      document_type == o.document_type &&
      document_date == o.document_date &&
       == o. &&
      gl_class == o.gl_class &&
      gl_type_id == o.gl_type_id &&
      description == o.description &&
      sales_code == o.sales_code &&
      memo == o.memo &&
      cost_acccount_number == o.cost_acccount_number &&
       == o. &&
      transfer_id == o.transfer_id &&
      item == o.item &&
      gl_item_id == o.gl_item_id &&
      sales_description == o.sales_description &&
      item_description == o.item_description &&
      currency == o.currency &&
      item_price == o.item_price &&
      taxable == o.taxable &&
      unit_of_measure == o.unit_of_measure &&
      quantity == o.quantity &&
      cost == o.cost &&
      total == o.total &&
      sub_category == o.sub_category &&
      serialized_flag == o.serialized_flag &&
      serial_numbers == o.serial_numbers &&
      shipment_method == o.shipment_method &&
      bin == o.bin &&
      warehouse == o.warehouse &&
      transfer_from_bin == o.transfer_from_bin &&
      transfer_from_location_xref == o.transfer_from_location_xref &&
      transfer_to_bin == o.transfer_to_bin &&
      transfer_to_location_xref == o.transfer_to_location_xref &&
      location_xref == o.location_xref &&
      price_level_xref == o.price_level_xref &&
      uom_schedule_xref == o.uom_schedule_xref &&
      item_type_xref == o.item_type_xref &&
      inventory_xref == o.inventory_xref &&
      cogs_xref == o.cogs_xref &&
      tax_note == o.tax_note &&
      tax_code == o.tax_code &&
      offset == o.offset
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



464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 464

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



530
531
532
533
534
535
536
537
538
539
540
541
542
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 530

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



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 443

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


430
431
432
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 430

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



436
437
438
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 436

def hash
  [id, document_type, document_date, , gl_class, gl_type_id, description, sales_code, memo, cost_acccount_number, , transfer_id, item, gl_item_id, sales_description, item_description, currency, item_price, taxable, unit_of_measure, quantity, cost, total, sub_category, serialized_flag, serial_numbers, shipment_method, bin, warehouse, transfer_from_bin, transfer_from_location_xref, transfer_to_bin, transfer_to_location_xref, location_xref, price_level_xref, uom_schedule_xref, item_type_xref, inventory_xref, cogs_xref, tax_note, tax_code, offset].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properies with the reasons



368
369
370
371
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 368

def list_invalid_properties
  invalid_properties = Array.new
  return 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



510
511
512
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 510

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



516
517
518
519
520
521
522
523
524
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 516

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



504
505
506
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 504

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



375
376
377
# File 'lib/connectwise-ruby-sdk/models/gl_export_inventory_transfer.rb', line 375

def valid?
  return true
end