Sha256: e1ef32aa5ad97c1cb385b5fc6b92622ec99418de2da1d0116a2555dce62359ae

Contents?: true

Size: 782 Bytes

Versions: 14

Compression:

Stored size: 782 Bytes

Contents

# frozen_string_literal: true

#
# dealerId   string  GUID of the dealer to operate on
#

module Alula
  class CameraGetSdStatusProc < Alula::RpcResource
    class Response < Alula::RpcResponse
      attr_accessor :result, :sd_card_status

      def initialize(response)
        super(response)
        @result = response.data['result']
        @sd_card_status = {
          'format' => @result['format'],
          'datetime' => @result['datetime'],
          'progress' => @result['progress']
        }
      end
    end

    def self.call(device_id:)
      payload = {
        "deviceId": device_id
      }

      request(
        http_method: :post,
        path: '/video/v1/rpc/devices/get-sd-card-status',
        payload:,
        handler: Response
      )
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
alula-ruby-2.6.3 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.6.2 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.6.1 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.6.0 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.5.0 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.4.0 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.3.0 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.2.0 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.1.2 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.1.1 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.1.0 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-2.0.0 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-1.10.5 lib/alula/procedures/camera_get_sd_status_proc.rb
alula-ruby-1.10.4 lib/alula/procedures/camera_get_sd_status_proc.rb