<?php

namespace PostenBringCheckout\admin\bring\models\booking;

defined( 'ABSPATH' ) || exit;

class MyBringBookingResponse {
	public string $webShopId;
	public string $externalOrderId;
	public string $consignmentNumber;
	public string $labelUrl;
	public ?string $returnLabelUrl;
	public string $trackingUrl;
	public string $serviceId;
	public ?string $waybillUrl;

	public function __construct( $data ) {
		$this->webShopId         = $data['webShopId'];
		$this->externalOrderId   = $data['externalOrderId'];
		$this->consignmentNumber = $data['consignmentNumber'];
		$this->labelUrl          = $data['labelUrl'];
		$this->returnLabelUrl    = $data['returnLabelUrl'] ?? null;
		$this->trackingUrl       = $data['trackingUrl'];
		$this->serviceId         = $data['serviceId'];
		$this->waybillUrl        = $data['waybillUrl'] ?? null;
	}
}
