Class: Castle::Commands::Privacy::DeleteData

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

Overview

Builds the command for DELETE /v1/privacy/users — GDPR Article 17 (right to be forgotten).

Class Method Summary collapse

Class Method Details

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

Parameters:

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

    must include :identifier and :identifier_type ($id or $email)

Returns:



11
12
13
14
15
# File 'lib/castle/commands/privacy/delete_data.rb', line 11

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

  Castle::Command.new('privacy/users', options, :delete)
end