<?php

/**
 * API specific to admin sync settings page.
 *
 * @package northmill-online-shared
 */
declare (strict_types=1);
namespace Northmill_Online_Shared_Checkout\Northmill_Online_Shared\Abstracts\Hub_API;

defined('ABSPATH') || exit;
/**
 * Class Settings_Sync_API
 */
class Settings_Sync_API extends Abstract_API_Base
{
    /**
     * Settings_Sync_API constructor.
     *
     * @param Main_API $main_api Main API instance.
     * @param string   $log_channel Log channel.
     */
    public function __construct(Main_API $main_api, string $log_channel = 'settings_sync')
    {
        parent::__construct($main_api->url, $main_api->user, $main_api->pass, $log_channel);
    }
    /**
     * Get Express settings.
     *
     * @return object|null
     */
    public function get_express_settings(): ?object
    {
        return $this->request_object('GET', 'online/expressorder/settings', '', 'v2');
    }
}
