<?php
/**
 * Supplier App Interface
 *
 * @category   WordPress_Plugin
 * @package    Common
 * @subpackage Interfaces
 * @author     miniOrange <info@miniorange.com>
 * @license    MIT/Expat
 * @link       https://plugins.miniorange.com/woocommerce-api-product-sync-with-woocommerce-rest-apis
 */

namespace MOWCPS\Common\Interfaces;

use WP_Error;

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

/**
 * Interface Supplier_App_Interface
 *
 * Defines the contract for supplier app classes
 */
interface Supplier_App_Interface {
	/**
	 * Test connection for the supplier
	 *
	 * @param string $app_type App type.
	 * @param array  $details Connection data to test.
	 * @return array|WP_Error Test result or error.
	 */
	public function test_connection( $app_type, $details );

	/**
	 * Create supplier with all related configurations
	 *
	 * @param array $data Supplier data from API request.
	 * @return array|WP_Error Created supplier with configurations or error.
	 */
	public function create_supplier( $data );
}
