Method: Verizon::V3LicenseDevice.from_hash
- Defined in:
- lib/verizon/models/v3_license_device.rb
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/verizon/models/v3_license_device.rb', line 47 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. device_id = hash.key?('deviceId') ? hash['deviceId'] : nil assignment_time = hash.key?('assignmentTime') ? hash['assignmentTime'] : SKIP # Create object from extracted values. V3LicenseDevice.new(device_id, assignment_time) end |