public function rest_api_init() {
		$args = [];
		foreach ( [ 'GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS', 'HEAD' ] as $http_method ) {
			$method_name = 'handle_' . strtolower( $http_method );
			if ( method_exists( $this, $method_name ) ) {
				$arg = [
					'methods' => $http_method,
					'callback' => [ $this, 'callback' ],
					'args' => $this->get_args( $http_method ),
				];
				$permission_callback = method_exists( $this, 'permission_callback' ) ? [ $this, 'permission_callback' ] : null;
				if ( $permission_callback ) {
					$arg['permission_callback'] = $permission_callback;
				}
				$args[] = $arg;
			}
		}
		if ( $args ) {
			register_rest_route( "{$this->namespace}/v{$this->version}", $this->route, $args );
		}
	}