<?php

namespace PostenBringCheckout\admin\bring\models;

defined( 'ABSPATH' ) || exit;

/**
 * Credentials
 *
 * Credentials and webshop id
 *
 * @since 0.0.1
 */
class Credentials {

	/**
	 * API key.
	 *
	 * @since 0.0.1
	 * @var string $apikey API key.
	 */
	public $apikey;

	/**
	 * Webshop id.
	 *
	 * @since 0.0.1
	 * @var string $webshop_id Webshop id.
	 */
	public $webshop_id;

	/**
	 * Constructor
	 *
	 * @param string $username API uid.
	 * @param string $apikey API key.
	 * @param string $webshop_id Webshop id.
	 */
	public function __construct( string $apikey, string $webshop_id ) {
		$this->apikey     = $apikey;
		$this->webshop_id = $webshop_id;
	}

	public function to_array(): array {
		return array(
			'apikey' => $this->apikey,
			'webshop_id' => $this->webshop_id
		);
	}
}
