Sha256: 48abdfc77237c4698f4b5cb125533fdca03f0c160e31915ff263e172cc964ca2
Contents?: true
Size: 860 Bytes
Versions: 4
Compression:
Stored size: 860 Bytes
Contents
module Zaptec class Charger attr_reader :id, :name, :device_id, :device_type, :installation_name, :installation_id def initialize( id:, name:, device_id:, device_type:, installation_name:, installation_id: ) @id = id @name = name @device_id = device_id @device_type = device_type @installation_name = installation_name @installation_id = installation_id end def self.parse(data) new( id: data.fetch("Id"), name: data.fetch("Name"), device_id: data.fetch("DeviceId"), device_type: data.fetch("DeviceType"), installation_name: data.fetch("InstallationName"), installation_id: data.fetch("InstallationId") ) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
stekker_zaptec-1.1.1 | lib/zaptec/charger.rb |
stekker_zaptec-1.1.0 | lib/zaptec/charger.rb |
stekker_zaptec-1.0.1 | lib/zaptec/charger.rb |
stekker_zaptec-1.0.0 | lib/zaptec/charger.rb |