Class: Castle::Commands::ListItems::Unarchive

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

Overview

Builds the command to unarchive a list item

Class Method Summary collapse

Class Method Details

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

Parameters:

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

Returns:



11
12
13
14
15
16
17
18
# File 'lib/castle/commands/list_items/unarchive.rb', line 11

def build(options = {})
  Castle::Validators::Present.call(options, %i[list_id list_item_id])

  list_id = options.delete(:list_id)
  list_item_id = options.delete(:list_item_id)

  Castle::Command.new("lists/#{list_id}/items/#{list_item_id}/unarchive", nil, :put)
end