<?php

namespace App\ViewModels\PagSeguro\PagSeguroResponseViewModel;

use App\Utils\Builder;

class PagSeguroAddressViewModelBuilder implements Builder {
	protected $street;
	protected $number;
	protected $locality;
	protected $city;
	protected $region_code;
	protected $country;
	protected $postal_code;

	public function build(): PagSeguroAddressViewModel {

		$obj = new PagSeguroAddressViewModel();

		$obj->setStreet( $this->street );
		$obj->setNumber( $this->number );
		$obj->setLocality( $this->locality );
		$obj->setCity( $this->city );
		$obj->setRegionCode( $this->region_code );
		$obj->setCountry( $this->country );
		$obj->setPostalCode( $this->postal_code );

		return $obj;

	}

	/**
	 *
	 * @param mixed $street
	 */
	public function setStreet($street): PagSeguroAddressViewModelBuilder {

		$this->street = $street;
		return $this;

	}

	/**
	 *
	 * @param mixed $number
	 */
	public function setNumber($number): PagSeguroAddressViewModelBuilder {

		$this->number = $number;
		return $this;

	}

	/**
	 *
	 * @param mixed $locality
	 */
	public function setLocality($locality): PagSeguroAddressViewModelBuilder {

		$this->locality = $locality;
		return $this;

	}

	/**
	 *
	 * @param mixed $city
	 */
	public function setCity($city): PagSeguroAddressViewModelBuilder {

		$this->city = $city;
		return $this;

	}

	/**
	 *
	 * @param mixed $region_code
	 */
	public function setRegionCode($region_code): PagSeguroAddressViewModelBuilder {

		$this->region_code = $region_code;
		return $this;

	}

	/**
	 *
	 * @param mixed $country
	 */
	public function setCountry($country): PagSeguroAddressViewModelBuilder {

		$this->country = $country;
		return $this;

	}

	/**
	 *
	 * @param mixed $postal_code
	 */
	public function setPostalCode($postal_code): PagSeguroAddressViewModelBuilder {

		$this->postal_code = $postal_code;
		return $this;

	}

}

