<?php
namespace App\Amadeus\StructureParser\Types;

/**
 * Individual tax component
 * @author Lucian Sirbu
 */
class PriceComponent extends \Engine\Serializer\MagicMethods\CustomAbstract
{
	public $category = 	null;	// supplier, tax, commission, etc.
	public $source = 	null;	// remark, K, TFD, etc.
	public $amount = 	null;
	public $VAT = 		null;
	public $currency = 	null;
	public $code = 		null;

	public function __construct($category=null, $source=null, $amount=null, $VAT=null, $currency=null, $code='default')
	{
		$this->category = 	$category;
		$this->source = 	$source;
		$this->code = 		$code;

		$this->VAT = 		($VAT===null?null:\App\Amadeus\StructureParser\Helpers::round($VAT));
		$this->amount = 	($amount===null?null:\App\Amadeus\StructureParser\Helpers::round($amount));
		$this->currency = 	$currency;
	}
}
