<?php

namespace App\Entities\PagSeguro\Order;

use App\Utils\Builder;

class PagSeguroOrderBuilder implements Builder {
	protected $reference_id;
	protected $customer;
	protected $items;
	protected $shipping;
	protected $charges;
	protected $links;

	public function build(): PagSeguroOrder {

		$obj = new PagSeguroOrder();

		$obj->setReferenceId( $this->reference_id );
		$obj->setCustomer( $this->customer );
		$obj->setItems( $this->items );
		$obj->setShipping( $this->shipping );
		$obj->setCharges( $this->charges );

		return $obj;

	}

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

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

	}

	/**
	 *
	 * @param mixed $customer
	 */
	public function setCustomer(PagSeguroCustomer $customer): PagSeguroOrderBuilder {

		$this->customer = $customer;
		return $this;

	}

	/**
	 *
	 * @param mixed $items
	 */
	public function setItems($items): PagSeguroOrderBuilder {

		$this->items = $items;
		return $this;

	}

	/**
	 *
	 * @param mixed $shipping
	 */
	public function setShipping($shipping): PagSeguroOrderBuilder {

		$this->shipping = $shipping;
		return $this;

	}

	/**
	 *
	 * @param mixed $charges
	 */
	public function setCharges(array $charges): PagSeguroOrderBuilder {

		$this->charges = $charges;
		return $this;

	}

}

