<?php

namespace DhlPolska\API\ParcelShop\Struct;

use JsonSerializable;

/**
 * Contact data structure for ParcelShop API.
 */
class ContactData implements JsonSerializable {

	/** @var string */
	private string $person_name;

	/** @var string */
	private string $phone_number;

	/** @var string */
	private string $email_address;

	/**
	 * ContactData constructor.
	 *
	 * @param string $person_name
	 * @param string $phone_number
	 * @param string $email_address
	 */
	public function __construct(
		string $person_name,
		string $phone_number,
		string $email_address
	) {
		$this->person_name   = $person_name;
		$this->phone_number  = $phone_number;
		$this->email_address = $email_address;
	}

	/**
	 * @return array
	 */
	public function jsonSerialize(): array {
		return [
			'personName'   => $this->person_name,
			'phoneNumber'  => $this->phone_number,
			'emailAddress' => $this->email_address,
		];
	}
}
