# frozen_string_literal: true module Alula class CameraGetRecordingConfigProc < Alula::RpcResource class Response < Alula::RpcResponse attr_accessor :cmd, :result def initialize(response) super(response) @result = response.data.dig('data', 'data') end def ok? super && @cmd == 'getRecordConfig' end end def self.call(serial_number:) request( http_method: :get, path: "/video/v1/device/#{serial_number}/recordConfig", handler: Response, payload: {} ) end end end