Class: ConnectWise::GLExportInventoryTransfer
- Inherits:
-
Object
- Object
- ConnectWise::GLExportInventoryTransfer
- Defined in:
- lib/connect_wise/models/gl_export_inventory_transfer.rb
Instance Attribute Summary collapse
-
#account_number ⇒ Object
Returns the value of attribute account_number.
-
#bin ⇒ Object
Returns the value of attribute bin.
-
#cogs_xref ⇒ Object
Returns the value of attribute cogs_xref.
-
#cost ⇒ Object
Returns the value of attribute cost.
-
#cost_account_number ⇒ Object
Returns the value of attribute cost_account_number.
-
#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_type ⇒ Object
Returns the value of attribute document_type.
-
#gl_class ⇒ Object
Returns the value of attribute gl_class.
-
#gl_item_id ⇒ Object
Returns the value of attribute gl_item_id.
-
#gl_type_id ⇒ Object
Returns the value of attribute gl_type_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#inventory_account_number ⇒ Object
Returns the value of attribute inventory_account_number.
-
#inventory_xref ⇒ Object
Returns the value of attribute inventory_xref.
-
#item ⇒ Object
Returns the value of attribute item.
-
#item_description ⇒ Object
Returns the value of attribute item_description.
-
#item_price ⇒ Object
Returns the value of attribute item_price.
-
#item_type_xref ⇒ Object
Returns the value of attribute item_type_xref.
-
#location_xref ⇒ Object
Returns the value of attribute location_xref.
-
#memo ⇒ Object
Returns the value of attribute memo.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#price_level_xref ⇒ Object
Returns the value of attribute price_level_xref.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#sales_code ⇒ Object
Returns the value of attribute sales_code.
-
#sales_description ⇒ Object
Returns the value of attribute sales_description.
-
#serial_numbers ⇒ Object
Returns the value of attribute serial_numbers.
-
#serialized_flag ⇒ Object
Returns the value of attribute serialized_flag.
-
#sub_category ⇒ Object
Returns the value of attribute sub_category.
-
#tax_note ⇒ Object
Returns the value of attribute tax_note.
-
#taxable ⇒ Object
Returns the value of attribute taxable.
-
#total ⇒ Object
Returns the value of attribute total.
-
#transfer_from_bin ⇒ Object
Returns the value of attribute transfer_from_bin.
-
#transfer_from_location_xref ⇒ Object
Returns the value of attribute transfer_from_location_xref.
-
#transfer_id ⇒ Object
Returns the value of attribute transfer_id.
-
#transfer_to_bin ⇒ Object
Returns the value of attribute transfer_to_bin.
-
#transfer_to_location_xref ⇒ Object
Returns the value of attribute transfer_to_location_xref.
-
#unit_of_measure ⇒ Object
Returns the value of attribute unit_of_measure.
-
#uom_schedule_xref ⇒ Object
Returns the value of attribute uom_schedule_xref.
-
#warehouse ⇒ Object
Returns the value of attribute warehouse.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ 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?(other) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GLExportInventoryTransfer
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 = {}) ⇒ GLExportInventoryTransfer
Initializes the object
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 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 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 130 def initialize(attributes = {}) raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::GLExportInventoryTransfer` 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::GLExportInventoryTransfer`. 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_type = attributes[:document_type] if attributes.key?(:document_type) self.document_date = attributes[:document_date] if attributes.key?(:document_date) self.account_number = attributes[:account_number] if attributes.key?(:account_number) 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.description = attributes[:description] if attributes.key?(:description) self.sales_code = attributes[:sales_code] if attributes.key?(:sales_code) self.memo = attributes[:memo] if attributes.key?(:memo) self.cost_account_number = attributes[:cost_account_number] if attributes.key?(:cost_account_number) self.inventory_account_number = attributes[:inventory_account_number] if attributes.key?(:inventory_account_number) self.transfer_id = attributes[:transfer_id] if attributes.key?(:transfer_id) self.item = attributes[:item] if attributes.key?(:item) self.gl_item_id = attributes[:gl_item_id] if attributes.key?(:gl_item_id) self.sales_description = attributes[:sales_description] if attributes.key?(:sales_description) self.item_description = attributes[:item_description] if attributes.key?(:item_description) self.currency = attributes[:currency] if attributes.key?(:currency) self.item_price = attributes[:item_price] if attributes.key?(:item_price) self.taxable = attributes[:taxable] if attributes.key?(:taxable) self.unit_of_measure = attributes[:unit_of_measure] if attributes.key?(:unit_of_measure) self.quantity = attributes[:quantity] if attributes.key?(:quantity) self.cost = attributes[:cost] if attributes.key?(:cost) self.total = attributes[:total] if attributes.key?(:total) self.sub_category = attributes[:sub_category] if attributes.key?(:sub_category) self.serialized_flag = attributes[:serialized_flag] if attributes.key?(:serialized_flag) self.serial_numbers = attributes[:serial_numbers] if attributes.key?(:serial_numbers) self.bin = attributes[:bin] if attributes.key?(:bin) self.warehouse = attributes[:warehouse] if attributes.key?(:warehouse) self.transfer_from_bin = attributes[:transfer_from_bin] if attributes.key?(:transfer_from_bin) self.transfer_from_location_xref = attributes[:transfer_from_location_xref] if attributes.key?(:transfer_from_location_xref) self.transfer_to_bin = attributes[:transfer_to_bin] if attributes.key?(:transfer_to_bin) self.transfer_to_location_xref = attributes[:transfer_to_location_xref] if attributes.key?(:transfer_to_location_xref) self.location_xref = attributes[:location_xref] if attributes.key?(:location_xref) self.price_level_xref = attributes[:price_level_xref] if attributes.key?(:price_level_xref) self.uom_schedule_xref = attributes[:uom_schedule_xref] if attributes.key?(:uom_schedule_xref) 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.tax_note = attributes[:tax_note] if attributes.key?(:tax_note) return unless attributes.key?(:offset) self.offset = attributes[:offset] end |
Instance Attribute Details
#account_number ⇒ Object
Returns the value of attribute account_number.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def account_number @account_number end |
#bin ⇒ Object
Returns the value of attribute bin.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def bin @bin end |
#cogs_xref ⇒ Object
Returns the value of attribute cogs_xref.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def cogs_xref @cogs_xref end |
#cost ⇒ Object
Returns the value of attribute cost.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def cost @cost end |
#cost_account_number ⇒ Object
Returns the value of attribute cost_account_number.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def cost_account_number @cost_account_number end |
#currency ⇒ Object
Returns the value of attribute currency.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def currency @currency end |
#description ⇒ Object
Returns the value of attribute description.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def description @description end |
#document_date ⇒ Object
Returns the value of attribute document_date.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def document_date @document_date end |
#document_type ⇒ Object
Returns the value of attribute document_type.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def document_type @document_type end |
#gl_class ⇒ Object
Returns the value of attribute gl_class.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def gl_class @gl_class end |
#gl_item_id ⇒ Object
Returns the value of attribute gl_item_id.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def gl_item_id @gl_item_id end |
#gl_type_id ⇒ Object
Returns the value of attribute gl_type_id.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def gl_type_id @gl_type_id end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def id @id end |
#inventory_account_number ⇒ Object
Returns the value of attribute inventory_account_number.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def inventory_account_number @inventory_account_number end |
#inventory_xref ⇒ Object
Returns the value of attribute inventory_xref.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def inventory_xref @inventory_xref end |
#item ⇒ Object
Returns the value of attribute item.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def item @item end |
#item_description ⇒ Object
Returns the value of attribute item_description.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def item_description @item_description end |
#item_price ⇒ Object
Returns the value of attribute item_price.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def item_price @item_price end |
#item_type_xref ⇒ Object
Returns the value of attribute item_type_xref.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def item_type_xref @item_type_xref end |
#location_xref ⇒ Object
Returns the value of attribute location_xref.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def location_xref @location_xref end |
#memo ⇒ Object
Returns the value of attribute memo.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def memo @memo end |
#offset ⇒ Object
Returns the value of attribute offset.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def offset @offset end |
#price_level_xref ⇒ Object
Returns the value of attribute price_level_xref.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def price_level_xref @price_level_xref end |
#quantity ⇒ Object
Returns the value of attribute quantity.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def quantity @quantity end |
#sales_code ⇒ Object
Returns the value of attribute sales_code.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def sales_code @sales_code end |
#sales_description ⇒ Object
Returns the value of attribute sales_description.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def sales_description @sales_description end |
#serial_numbers ⇒ Object
Returns the value of attribute serial_numbers.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def serial_numbers @serial_numbers end |
#serialized_flag ⇒ Object
Returns the value of attribute serialized_flag.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def serialized_flag @serialized_flag end |
#sub_category ⇒ Object
Returns the value of attribute sub_category.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def sub_category @sub_category end |
#tax_note ⇒ Object
Returns the value of attribute tax_note.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def tax_note @tax_note end |
#taxable ⇒ Object
Returns the value of attribute taxable.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def taxable @taxable end |
#total ⇒ Object
Returns the value of attribute total.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def total @total end |
#transfer_from_bin ⇒ Object
Returns the value of attribute transfer_from_bin.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def transfer_from_bin @transfer_from_bin end |
#transfer_from_location_xref ⇒ Object
Returns the value of attribute transfer_from_location_xref.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def transfer_from_location_xref @transfer_from_location_xref end |
#transfer_id ⇒ Object
Returns the value of attribute transfer_id.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def transfer_id @transfer_id end |
#transfer_to_bin ⇒ Object
Returns the value of attribute transfer_to_bin.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def transfer_to_bin @transfer_to_bin end |
#transfer_to_location_xref ⇒ Object
Returns the value of attribute transfer_to_location_xref.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def transfer_to_location_xref @transfer_to_location_xref end |
#unit_of_measure ⇒ Object
Returns the value of attribute unit_of_measure.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def unit_of_measure @unit_of_measure end |
#uom_schedule_xref ⇒ Object
Returns the value of attribute uom_schedule_xref.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def uom_schedule_xref @uom_schedule_xref end |
#warehouse ⇒ Object
Returns the value of attribute warehouse.
16 17 18 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 16 def warehouse @warehouse end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
65 66 67 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 65 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
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 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 19 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_account_number: :costAccountNumber, 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, 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, offset: :offset } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
298 299 300 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 298 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 116 def self.openapi_nullable Set.new(%i[ transfer_id item_price taxable quantity cost total serialized_flag ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 70 def self.openapi_types { id: :String, document_type: :String, document_date: :String, account_number: :String, gl_class: :String, gl_type_id: :String, description: :String, sales_code: :String, memo: :String, cost_account_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, 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, offset: :GLExportInventoryTransferOffset } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 237 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && document_type == other.document_type && document_date == other.document_date && account_number == other.account_number && gl_class == other.gl_class && gl_type_id == other.gl_type_id && description == other.description && sales_code == other.sales_code && memo == other.memo && cost_account_number == other.cost_account_number && inventory_account_number == other.inventory_account_number && transfer_id == other.transfer_id && item == other.item && gl_item_id == other.gl_item_id && sales_description == other.sales_description && item_description == other.item_description && currency == other.currency && item_price == other.item_price && taxable == other.taxable && unit_of_measure == other.unit_of_measure && quantity == other.quantity && cost == other.cost && total == other.total && sub_category == other.sub_category && serialized_flag == other.serialized_flag && serial_numbers == other.serial_numbers && bin == other.bin && warehouse == other.warehouse && transfer_from_bin == other.transfer_from_bin && transfer_from_location_xref == other.transfer_from_location_xref && transfer_to_bin == other.transfer_to_bin && transfer_to_location_xref == other.transfer_to_location_xref && location_xref == other.location_xref && price_level_xref == other.price_level_xref && uom_schedule_xref == other.uom_schedule_xref && item_type_xref == other.item_type_xref && inventory_xref == other.inventory_xref && cogs_xref == other.cogs_xref && tax_note == other.tax_note && offset == other.offset end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 328 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
399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 399 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
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 305 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
285 286 287 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 285 def eql?(other) self == other end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
291 292 293 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 291 def hash [id, document_type, document_date, account_number, gl_class, gl_type_id, description, sales_code, memo, cost_account_number, inventory_account_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, 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, offset].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
225 226 227 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 225 def list_invalid_properties [] end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
375 376 377 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 375 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
381 382 383 384 385 386 387 388 389 390 391 392 393 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 381 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_s ⇒ String
Returns the string representation of the object
369 370 371 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 369 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
231 232 233 |
# File 'lib/connect_wise/models/gl_export_inventory_transfer.rb', line 231 def valid? true end |