Source of file GetArticleFeeParameter.php

Size: 5,189 Bytes - Last Modified: 2015-04-17T00:11:29+02:00

/www-data/git/ricardo/src/Diglin/Ricardo/Managers/Sell/Parameter/GetArticleFeeParameter.php

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
<?php
/**
 * Diglin GmbH - Switzerland
 *
 * This file is part of a Diglin GmbH module.
 *
 * This Diglin GmbH module is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * This script is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * @author      Sylvain Rayé <support at diglin.com>
 * @category    Diglin
 * @package     Diglin_Ricardo
 * @copyright   Copyright (c) 2011-2015 Diglin (http://www.diglin.com)
 * @license     http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
 */
namespace Diglin\Ricardo\Managers\Sell\Parameter;

use Diglin\Ricardo\Managers\ParameterAbstract;
use Diglin\Ricardo\Enums\Article\PromotionCode;

/**
 * Class GetArticleFeeParameter
 * @package Diglin\Ricardo\Managers\Sell\Parameter
 */
class GetArticleFeeParameter extends ParameterAbstract
{
    /**
     * @var string
     */
    protected $_articleCondition; // required

    /**
     * @var float
     */
    protected $_buyNowPrice; // optional

    /**
     * @var int
     */
    protected $_categoryId; // required

    /**
     * @var bool
     */
    protected $_excludeListingFees; // required

    /**
     * @var int
     */
    protected $_initialQuantity; // required

    /**
     * @var int
     */
    protected $_pictureCount; // required

    /**
     * @var array PromotionCode
     */
    protected $_promotionIds; // required

    /**
     * @var string
     */
    protected $_startDate; // required

    /**
     * @var float
     */
    protected $_startPrice; // optional

    protected $_requiredProperties = array(
        'articleCondition',
        'categoryId',
        'excludeListingFees',
        'initialQuantity',
        'pictureCount',
        'promotionIds',
        'startDate',
    );

    protected $_optionalProperties = array(
        'buyNowPrice',
        'startPrice'
    );

    /**
     * @return string
     */
    public function getArticleCondition()
    {
        return $this->_articleCondition;
    }

    /**
     * @param string $articleCondition
     * @return $this
     */
    public function setArticleCondition($articleCondition)
    {
        $this->_articleCondition = $articleCondition;
        return $this;
    }

    /**
     * @return float
     */
    public function getBuyNowPrice()
    {
        return $this->_buyNowPrice;
    }

    /**
     * @param float $buyNowPrice
     * @return $this
     */
    public function setBuyNowPrice($buyNowPrice)
    {
        $this->_buyNowPrice = (float) $buyNowPrice;
        return $this;
    }

    /**
     * @return int
     */
    public function getCategoryId()
    {
        return $this->_categoryId;
    }

    /**
     * @param int $categoryId
     * @return $this
     */
    public function setCategoryId($categoryId)
    {
        $this->_categoryId = (int) $categoryId;
        return $this;
    }

    /**
     * @return boolean
     */
    public function getExcludeListingFees()
    {
        return ($this->_excludeListingFees) ? 1 : 0;
    }

    /**
     * @param boolean $excludeListingFees
     * @return $this
     */
    public function setExcludeListingFees($excludeListingFees)
    {
        $this->_excludeListingFees = (bool) $excludeListingFees;
        return $this;
    }

    /**
     * @return int
     */
    public function getInitialQuantity()
    {
        return $this->_initialQuantity;
    }

    /**
     * @param int $initialQuantity
     * @return $this
     */
    public function setInitialQuantity($initialQuantity)
    {
        $this->_initialQuantity = (int) $initialQuantity;
        return $this;
    }

    /**
     * @return int
     */
    public function getPictureCount()
    {
        return (int) $this->_pictureCount;
    }

    /**
     * @param int $pictureCount
     * @return $this
     */
    public function setPictureCount($pictureCount)
    {
        $this->_pictureCount = $pictureCount;
        return $this;
    }

    /**
     * @return array
     */
    public function getPromotionIds()
    {
        return $this->_promotionIds;
    }

    /**
     * @param array $promotionIds
     * @return $this
     */
    public function setPromotionIds($promotionIds)
    {
        $this->_promotionIds = (array) $promotionIds;
        return $this;
    }

    /**
     * @return string
     */
    public function getStartDate()
    {
        return $this->_startDate;
    }

    /**
     * @param string $startDate
     * @return $this
     */
    public function setStartDate($startDate)
    {
        $this->_startDate = $startDate;
        return $this;
    }

    /**
     * @return float
     */
    public function getStartPrice()
    {
        return $this->_startPrice;
    }

    /**
     * @param float $startPrice
     * @return $this
     */
    public function setStartPrice($startPrice)
    {
        $this->_startPrice = (float) $startPrice;
        return $this;
    }
}