<?php

namespace App\ViewModels\LojaCompra\LojaCompraCartaoCreditoPagSeguro\LojaCompraRegistrationViewModel;

use App\Utils\Builder;

class LojaCompraPaymentMethodRegistrationViewModelBuilder implements Builder {
	protected $type;
	protected $installments;
	protected $capture;
	protected $card;
	protected $soft_descriptor;

	public function build(): LojaCompraPaymentMethodRegistrationViewModel {

		$obj = new LojaCompraPaymentMethodRegistrationViewModel();

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

		return $obj;

	}

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

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

	}

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

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

	}

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

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

	}

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

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

	}

	/**
	 *
	 * @param mixed $soft_descriptor
	 */
	public function setSoftDescriptor($soft_descriptor): LojaCompraPaymentMethodRegistrationViewModelBuilder {

		$this->soft_descriptor = $soft_descriptor;
		return $this;

	}

}

