Class: SafetyKit::Resources::DeletionRequests

Inherits:
Object
  • Object
show all
Defined in:
lib/safety_kit/resources/deletion_requests.rb

Overview

Submit end-user deletion requests for integration testing before deletion processing is enabled.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ DeletionRequests

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of DeletionRequests.

Parameters:



41
42
43
# File 'lib/safety_kit/resources/deletion_requests.rb', line 41

def initialize(client:)
  @client = client
end

Instance Method Details

#create(subject_user_id:, external_request_id: nil, requested_at: nil, request_options: {}) ⇒ SafetyKit::Models::DeletionRequestCreateResponse

Some parameter documentations has been truncated, see Models::DeletionRequestCreateParams for more details.

Submit an end-user data deletion request for integration testing. SafetyKit validates and logs the request, but does not delete stored data yet.

Parameters:

  • subject_user_id (String)

    Your stable canonical identifier for the user or account whose data should be de

  • external_request_id (String)

    Optional caller-provided request identifier for correlating the deletion request

  • requested_at (Time)

    The time the deletion request was received in your system, as an ISO 8601 dateti

  • request_options (SafetyKit::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



27
28
29
30
31
32
33
34
35
36
# File 'lib/safety_kit/resources/deletion_requests.rb', line 27

def create(params)
  parsed, options = SafetyKit::DeletionRequestCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/deletion_requests",
    body: parsed,
    model: SafetyKit::Models::DeletionRequestCreateResponse,
    options: options
  )
end