Class: Fixably::Device

Inherits:
ApplicationResource show all
Defined in:
lib/fixably/resources/device.rb

Instance Attribute Summary

Attributes inherited from ApplicationResource

#parent_association

Instance Method Summary collapse

Methods inherited from ApplicationResource

#initialize, site

Methods included from Authorization

#headers

Methods included from LoadFromResponse

#load

Methods included from Encoding

#encode

Methods included from Actions

#destroy, included, #save, #save!

Constructor Details

This class inherits a constructor from Fixably::ApplicationResource

Instance Method Details

#either_serial_number_or_imei_setObject



21
22
23
24
25
# File 'lib/fixably/resources/device.rb', line 21

def either_serial_number_or_imei_set
  return if serial_number.present? || imei_number1.present?

  errors.add(:base, "Either serial number or IMEI must be present")
end