Class: Castle::Commands::GetDevicesForUser

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

Overview

Generates the payload for the GET users/#user_id/devices 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/get_devices_for_user.rb', line 10

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