<?php

namespace Planaday\Entities\Booking\DTO;

use Planaday\Entities\Booking\Enum\TransactionStatus;

class Transaction {
	protected float $totalCost = 0;
	protected string $method = "";
	protected TransactionStatus $status = TransactionStatus::Pending;
	protected string $checkoutUrl = "";

	public function __construct(
		protected string $id
	) {}

	public function setCheckoutUrl( string $checkoutUrl ): self {
		$this->checkoutUrl = $checkoutUrl;

		return $this;
	}

	public function setStatus( TransactionStatus $status ): self {
		$this->status = $status;
		return $this;
	}

	public function setTotalCost( float $totalCost ): self {
		$this->totalCost = $totalCost;

		return $this;
	}

	public function setMethod( string $method ): self {
		$this->method = $method;

		return $this;
	}

	public function getCheckoutUrl(): string {
		return $this->checkoutUrl;
	}

	public function getTotalCost(): float {
		return $this->totalCost;
	}

	public function getId(): string {
		return $this->id;
	}

	public function getMethod(): string {
		return $this->method;
	}

	public function getStatus(): TransactionStatus {
		return $this->status;
	}
}