Class: Castle::Commands::ApproveDevice

Inherits:
Object
  • Object
show all
Defined in:
lib/castle/commands/approve_device.rb

Overview

Generates the payload for the PUT devices/#device_token/approve request

Class Method Summary collapse

Class Method Details

.build(options = {}) ⇒ Castle::Command

Parameters:

  • options (Hash) (defaults to: {})

Returns:



10
11
12
13
# File 'lib/castle/commands/approve_device.rb', line 10

def build(options = {})
  Castle::Validators::Present.call(options, %i[device_token])
  Castle::Command.new("devices/#{options[:device_token]}/approve", nil, :put)
end