<?php

namespace App\Entities\PagSeguro\Order;

use App\Utils\Builder;

class PagSeguroItemsBuilder implements Builder {
	protected $reference_id;
	protected $name;
	protected $quantity;
	protected $unit_amount;

	public function build(): PagSeguroItems {

		$obj = new PagSeguroItems();

		$obj->setReferenceId($this->reference_id);
		$obj->setName( $this->name );
		$obj->setQuantity( $this->quantity );
		$obj->setUnitAmount( $this->unit_amount );

		return $obj;

	}
	
	/**
	 *
	 * @param mixed $name
	 */
	public function setReferenceId($reference_id): PagSeguroItemsBuilder {
		
		$this->reference_id = $reference_id;
		return $this;
	}
	

	/**
	 *
	 * @param mixed $name
	 */
	public function setName($name): PagSeguroItemsBuilder {

		$this->name = $name;
		return $this;

	}

	/**
	 *
	 * @param mixed $quantity
	 */
	public function setQuantity($quantity): PagSeguroItemsBuilder {

		$this->quantity = $quantity;
		return $this;

	}

	/**
	 *
	 * @param mixed $unit_amount
	 */
	public function setUnitAmount($unit_amount): PagSeguroItemsBuilder {

		$this->unit_amount = $unit_amount;
		return $this;

	}

}

