<?php
/**
 * Class file for WCPay\Core\Server\Request\Get_Account.
 *
 * @package WooCommerce Payments
 */

namespace WCPay\Core\Server\Request;

use WCPay\Core\Server\Request;
use WC_Payments_API_Client;

/**
 * Request class for getting account data.
 */
class Get_Account extends Request {
	use Use_Test_Mode_Only_When_Test_Mode_Onboarding;

	/**
	 * Specifies the WordPress hook name that will be triggered upon calling the send() method.
	 *
	 * @var string
	 */
	protected $hook = 'wcpay_get_account';

	/**
	 * Returns the request's API.
	 *
	 * @return string
	 */
	public function get_api(): string {
		return WC_Payments_API_Client::ACCOUNTS_API;
	}

	/**
	 * Returns the request's HTTP method.
	 */
	public function get_method(): string {
		return 'GET';
	}

	/**
	 * Set the WooCommerce store ID to send with the account request.
	 *
	 * @param string $woocommerce_store_id The WooCommerce store ID (UUID).
	 */
	public function set_woocommerce_store_id( string $woocommerce_store_id ): void {
		$this->set_param( 'woocommerce_store_id', $woocommerce_store_id );
	}
}
