<?php
/**
 * REST API: CRUD for Checkout Order Bump campaigns.
 *
 * @package PRECO
 */

namespace PRECO\Includes\Admin\Rest;

defined( 'ABSPATH' ) || exit;

/**
 * Checkout Order Bump REST controller.
 *
 * All CRUD behavior lives in CampaignRest; this subclass only names the
 * option, routes and payload keys.
 */
class OrderBumpRest extends CampaignRest {
	/**
	 * Option name where order bumps are stored.
	 */
	const OPTION_NAME = 'preco_order_bumps';

	/**
	 * {@inheritDoc}
	 */
	protected function option_name() {
		return self::OPTION_NAME;
	}

	/**
	 * {@inheritDoc}
	 */
	protected function rest_base() {
		return 'order-bumps';
	}

	/**
	 * {@inheritDoc}
	 */
	protected function item_key() {
		return 'bump';
	}

	/**
	 * {@inheritDoc}
	 */
	protected function collection_key() {
		return 'bumps';
	}

	/**
	 * {@inheritDoc}
	 */
	protected function saved_action() {
		return 'preco_order_bump_saved';
	}

	/**
	 * {@inheritDoc}
	 */
	protected function item_label() {
		return 'Order bump';
	}
}
