Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/Ecombricks/InventoryInventorySales/Model/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/Ecombricks/InventoryInventorySales/Model/SourceItem.php
<?php
/**
 * Copyright © eComBricks. All rights reserved.
 * See LICENSE.txt for license details.
 */
declare(strict_types=1);

namespace Ecombricks\InventoryInventorySales\Model;

/**
 * Source item
 */
class SourceItem implements \Ecombricks\InventoryInventorySales\Model\SourceItemInterface
{
    
    /**
     * SKU
     * 
     * @var string
     */
    protected $sku;
    
    /**
     * Source code
     * 
     * @var string
     */
    protected $sourceCode;
    
    /**
     * Quantity
     * 
     * @var float
     */
    protected $quantity;
    
    /**
     * Is salable
     * 
     * @var bool
     */
    protected $isSalable;
    
    /**
     * Get SKU
     * 
     * @return string
     */
    public function getSku(): string
    {
        return $this->sku;
    }
    
    /**
     * Set SKU
     * 
     * @param string $sku
     * @return $this
     */
    public function setSku(string $sku): \Ecombricks\InventoryInventorySales\Model\SourceItemInterface
    {
        $this->sku = $sku;
        return $this;
    }
    
    /**
     * Get source code
     * 
     * @return string
     */
    public function getSourceCode(): string
    {
        return $this->sourceCode;
    }
    
    /**
     * Set source code
     * 
     * @param string $sourceCode
     * @return $this
     */
    public function setSourceCode(string $sourceCode): \Ecombricks\InventoryInventorySales\Model\SourceItemInterface
    {
        $this->sourceCode = $sourceCode;
        return $this;
    }
    
    /**
     * Get quantity
     * 
     * @return float
     */
    public function getQuantity(): float
    {
        return $this->quantity;
    }

    /**
     * Set quantity
     * 
     * @param float $quantity
     * @return $this
     */
    public function setQuantity(float $quantity): \Ecombricks\InventoryInventorySales\Model\SourceItemInterface
    {
        $this->quantity = $quantity;
        return $this;
    }
    
    /**
     * Get is salable
     * 
     * @return float
     */
    public function getIsSalable(): bool
    {
        return $this->isSalable;
    }

    /**
     * Set is salable
     * 
     * @param bool $isSalable
     * @return $this
     */
    public function setIsSalable(bool $isSalable): \Ecombricks\InventoryInventorySales\Model\SourceItemInterface
    {
        $this->isSalable = $isSalable;
        return $this;
    }
    
    /**
     * Check if is salable
     * 
     * @return float
     */
    public function isSalable(): bool
    {
        return $this->getIsSalable();
    }
    
    /**
     * To array
     * 
     * @return array
     */
    public function toArray(): array
    {
        return [
            'sku' => $this->getSku(),
            'source_code' => $this->getSourceCode(),
            'quantity' => $this->getQuantity(),
            'is_salable' => $this->getIsSalable(),
        ];
    }
    
}

Spamworldpro Mini