<?php
/**
 * ShipX Exception.
 *
 * @package PaczkomatyInpost
 */

/**
 * ShipX exception.
 */
class WPDesk_Paczkomaty_ShipX_Exception extends Exception {

	/**
	 * API response.
	 *
	 * @var object|null
	 */
	private $api_response;

	/**
	 * WPDesk_Paczkomaty_ShipX_Exception constructor.
	 *
	 * @param string $message .
	 * @param object $api_response .
	 */
	public function __construct( $message = '', $api_response = null ) {
		parent::__construct( $message );
		$this->api_response = $api_response;
	}

	/**
	 * Get API response.
	 *
	 * @return object|null
	 */
	public function get_api_response() {
		return $this->api_response;
	}

}
