<?php

namespace Drupal\user_provisioning\ProviderSpecific\APIHandler;

/**
 * Defines provider API handler operations for user provisioning.
 */
interface moAPIHandlerInterface {

  /**
   * Sends a GET request to the configured provider.
   *
   * @param string $query
   *   The provider-specific query string or resource identifier.
   *
   * @return mixed
   *   The provider response object or payload.
   */
  public function get(string $query);

  /**
   * Sends a POST request to the configured provider.
   *
   * @param array $body
   *   The request body payload.
   *
   * @return mixed
   *   The provider response object or payload.
   */
  public function post(array $body);

  /**
   * Sends a PUT request to the configured provider.
   *
   * @param array $body
   *   The request body payload.
   *
   * @return mixed
   *   The provider response object or payload.
   */
  public function put(array $body);

  /**
   * Sends a PATCH request to the configured provider.
   *
   * @param array $patch
   *   The patch payload.
   *
   * @return mixed
   *   The provider response object or payload.
   */
  public function patch(array $patch);

  /**
   * Sends a DELETE request to the configured provider.
   *
   * @param string $resource_id
   *   The unique resource identifier.
   *
   * @return mixed
   *   The provider response object or payload.
   */
  public function delete($resource_id);

  /**
   * Sends a deactivation request to the configured provider.
   *
   * @param array $body
   *   The deactivation request payload.
   *
   * @return mixed
   *   The provider response object or payload.
   */
  public function deactivate(array $body);

}
