Class: Castle::Commands::ListItems::Archive
- Inherits:
-
Object
- Object
- Castle::Commands::ListItems::Archive
- Defined in:
- lib/castle/commands/list_items/archive.rb
Overview
Generates the payload for the DELETE /lists/:list_id/items/:item_id/archive request
Class Method Summary collapse
Class Method Details
.build(options = {}) ⇒ Castle::Command
12 13 14 15 16 17 18 19 |
# File 'lib/castle/commands/list_items/archive.rb', line 12 def build( = {}) Castle::Validators::Present.call(, %i[list_id list_item_id]) list_id = .delete(:list_id) list_item_id = .delete(:list_item_id) Castle::Command.new("lists/#{list_id}/items/#{list_item_id}/archive", nil, :delete) end |