<?php

namespace App\Entities\PagSeguro\Order;

use App\Utils\Builder;

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

	public function build(): PagSeguroPaymentMethod {

		$obj = new PagSeguroPaymentMethod();

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

		return $obj;

	}

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

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

	}

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

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

	}

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

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

	}

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

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

	}

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

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

	}

}

