SpecialPriceInterface.php 2.88 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace Magento\Catalog\Api\Data;

/**
 * Product Special Price Interface is used to encapsulate data that can be processed by efficient price API.
 * @api
 * @since 102.0.0
 */
interface SpecialPriceInterface extends \Magento\Framework\Api\ExtensibleDataInterface
{
    /**#@+
     * Constants
     */
    const PRICE = 'price';
    const STORE_ID = 'store_id';
    const SKU = 'sku';
    const PRICE_FROM = 'price_from';
    const PRICE_TO = 'price_to';
    /**#@-*/

    /**
     * Set product special price value.
     *
     * @param float $price
     * @return $this
     * @since 102.0.0
     */
    public function setPrice($price);

    /**
     * Get product special price value.
     *
     * @return float
     * @since 102.0.0
     */
    public function getPrice();

    /**
     * Set ID of store, that contains special price value.
     *
     * @param int $storeId
     * @return $this
     * @since 102.0.0
     */
    public function setStoreId($storeId);

    /**
     * Get ID of store, that contains special price value.
     *
     * @return int
     * @since 102.0.0
     */
    public function getStoreId();

    /**
     * Set SKU of product, that contains special price value.
     *
     * @param string $sku
     * @return $this
     * @since 102.0.0
     */
    public function setSku($sku);

    /**
     * Get SKU of product, that contains special price value.
     *
     * @return string
     * @since 102.0.0
     */
    public function getSku();

    /**
     * Set start date for special price in Y-m-d H:i:s format.
     *
     * @param string $datetime
     * @return $this
     * @since 102.0.0
     */
    public function setPriceFrom($datetime);

    /**
     * Get start date for special price in Y-m-d H:i:s format.
     *
     * @return string
     * @since 102.0.0
     */
    public function getPriceFrom();

    /**
     * Set end date for special price in Y-m-d H:i:s format.
     *
     * @param string $datetime
     * @return $this
     * @since 102.0.0
     */
    public function setPriceTo($datetime);

    /**
     * Get end date for special price in Y-m-d H:i:s format.
     *
     * @return string
     * @since 102.0.0
     */
    public function getPriceTo();

    /**
     * Retrieve existing extension attributes object.
     * If extension attributes do not exist return null.
     *
     * @return \Magento\Catalog\Api\Data\SpecialPriceExtensionInterface|null
     * @since 102.0.0
     */
    public function getExtensionAttributes();

    /**
     * Set an extension attributes object.
     *
     * @param \Magento\Catalog\Api\Data\SpecialPriceExtensionInterface $extensionAttributes
     * @return $this
     * @since 102.0.0
     */
    public function setExtensionAttributes(
        \Magento\Catalog\Api\Data\SpecialPriceExtensionInterface $extensionAttributes
    );
}