<?php

namespace App\ViewModels\PagSeguro\PagSeguroNotificationCreditCard;

use App\Utils\Builder;

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

	public function build(): PagSeguroItemViewModel {

		$obj = new PagSeguroItemViewModel();

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

		return $obj;

	}

	/**
	 *
	 * @param mixed $reference_id
	 */
	public function setReferenceId($reference_id): PagSeguroItemViewModelBuilder {

		$this->reference_id = $reference_id;
		return $this;

	}

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

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

	}

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

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

	}

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

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

	}

}

