module Alula module Video class Device < Alula::Video::BaseResource extend Alula::ApiOperations::Request extend Alula::ApiOperations::Save extend Alula::ApiOperations::Delete field :account_id, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :active, type: :boolean, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :brand, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :hardware_id, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :manufacturer, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :name, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :serial_number, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :verification_code, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :timezone, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :timezone_id, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :daylight_saving, type: :number, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :time_format, type: :number, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :sd_card_status, type: :object, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :customer_id, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :online, type: :object, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :settings, type: :object, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] field :model, type: :string, patchable_by: %i[system station dealer user], creatable_by: %i[system station dealer user] def jsw? manufacturer == 'jsw' end def hik? manufacturer == 'hikvision' end end end end