<?php
/**
 * Product Sync Audit Request DTO
 *
 * @category   WordPress_Plugin
 * @package    Common
 * @subpackage DTO
 * @author     miniOrange <info@miniorange.com>
 * @license    MIT/Expat
 * @link       https://plugins.miniorange.com/woocommerce-api-product-sync-with-woocommerce-rest-apis
 */

namespace MOWCPS\Common\DTO;

use WP_Error;
use MOWCPS\Common\Abstracts\Base_DTO;

if ( ! defined( 'ABSPATH' ) ) {
	die;
}

/**
 * Class Product_Sync_Audit_Request
 *
 * Handles product sync audit request data transformation and validation
 */
class Product_Sync_Audit_Request extends Base_DTO {

	/**
	 * Create instance from request parameters
	 *
	 * @param array $params Request parameters.
	 * @return self|WP_Error Instance or error if validation fails
	 */
	public static function from_request_parameters( $params ) {
		$instance = new self();

		return $instance->validate();
	}

	/**
	 * Validate the request data
	 *
	 * @return self|WP_Error Instance if valid, WP_Error if invalid
	 */
	protected function validate() {
		return $this;
	}

	/**
	 * Convert to array for query parameters
	 *
	 * @return array Data ready for model query
	 */
	public function to_array() {
		return array();
	}
}
