<?php

namespace App\ViewModels\PagSeguro\PagSeguroNotificationCreditCard;

use App\Utils\Builder;

class PagSeguroPaymentMethodViewModelBuilder implements Builder {
	protected $type;
	protected $installments;
	protected $capture;
	protected $card;

	public function build(): PagSeguroPaymentMethodViewModel {

		$obj = new PagSeguroPaymentMethodViewModel();

		$obj->setType( $this->type );
		$obj->setInstallments( $this->installments );
		$obj->setCapture( $this->capture );
		$obj->setCard( $this->card );

		return $obj;

	}

	/**
	 *
	 * @param mixed $type
	 */
	public function setType($type): PagSeguroPaymentMethodViewModelBuilder {

		$this->type = $type;
		return $this;

	}

	/**
	 *
	 * @param mixed $installments
	 */
	public function setInstallments($installments): PagSeguroPaymentMethodViewModelBuilder {

		$this->installments = $installments;
		return $this;

	}

	/**
	 *
	 * @param mixed $capture
	 */
	public function setCapture($capture): PagSeguroPaymentMethodViewModelBuilder {

		$this->capture = $capture;
		return $this;

	}

	/**
	 *
	 * @param mixed $card
	 */
	public function setCard($card): PagSeguroPaymentMethodViewModelBuilder {

		$this->card = $card;
		return $this;

	}

}

