<?php

namespace PortalPeople\netsuite\models;

/**
 * NetSuite Item Record
 * 
 * @package PortalPeople\netsuite\models
 */
class Item extends NetSuiteRecord
{
    /**
     * @inheritdoc
     */
    public static function getRecordType()
    {
        return 'inventoryitem';
    }
    
    /**
     * Get item name
     * 
     * @return string|null
     */
    public function getItemId()
    {
        return $this->getField('itemId');
    }
    
    /**
     * Set item name
     * 
     * @param string $itemId
     */
    public function setItemId($itemId)
    {
        $this->setField('itemId', $itemId);
    }
    
    /**
     * Get display name
     * 
     * @return string|null
     */
    public function getDisplayName()
    {
        return $this->getField('displayName');
    }
    
    /**
     * Set display name
     * 
     * @param string $displayName
     */
    public function setDisplayName($displayName)
    {
        $this->setField('displayName', $displayName);
    }
    
    /**
     * Get item description
     * 
     * @return string|null
     */
    public function getDescription()
    {
        return $this->getField('description');
    }
    
    /**
     * Set item description
     * 
     * @param string $description
     */
    public function setDescription($description)
    {
        $this->setField('description', $description);
    }
    
    /**
     * Get base price
     * 
     * @return float|null
     */
    public function getBasePrice()
    {
        return $this->getField('basePrice');
    }
    
    /**
     * Set base price
     * 
     * @param float $basePrice
     */
    public function setBasePrice($basePrice)
    {
        $this->setField('basePrice', $basePrice);
    }
    
    /**
     * Get cost estimate
     * 
     * @return float|null
     */
    public function getCostEstimate()
    {
        return $this->getField('costEstimate');
    }
    
    /**
     * Set cost estimate
     * 
     * @param float $costEstimate
     */
    public function setCostEstimate($costEstimate)
    {
        $this->setField('costEstimate', $costEstimate);
    }
    
    /**
     * Get item subsidiary
     * 
     * @return array|null
     */
    public function getSubsidiary()
    {
        return $this->getField('subsidiary');
    }
    
    /**
     * Set item subsidiary
     * 
     * @param int $subsidiaryId
     */
    public function setSubsidiary($subsidiaryId)
    {
        $this->setField('subsidiary', ['internalId' => $subsidiaryId]);
    }
    
    /**
     * Get income account
     * 
     * @return array|null
     */
    public function getIncomeAccount()
    {
        return $this->getField('incomeAccount');
    }
    
    /**
     * Set income account
     * 
     * @param int $accountId
     */
    public function setIncomeAccount($accountId)
    {
        $this->setField('incomeAccount', ['internalId' => $accountId]);
    }
    
    /**
     * Get asset account
     * 
     * @return array|null
     */
    public function getAssetAccount()
    {
        return $this->getField('assetAccount');
    }
    
    /**
     * Set asset account
     * 
     * @param int $accountId
     */
    public function setAssetAccount($accountId)
    {
        $this->setField('assetAccount', ['internalId' => $accountId]);
    }
    
    /**
     * Check if item is inactive
     * 
     * @return bool
     */
    public function isInactive()
    {
        return (bool) $this->getField('isInactive');
    }
    
    /**
     * Set item active/inactive status
     * 
     * @param bool $isInactive
     */
    public function setInactive($isInactive)
    {
        $this->setField('isInactive', $isInactive);
    }
}