<?php

namespace PostenBringCheckout\admin\bring\models\booking;

defined( 'ABSPATH' ) || exit;

class ValidationResponse {
	private $orderValidations = array();

	public function __construct( array $validations ) {
		foreach ( $validations as $validation ) {
			$this->orderValidations[ $validation['orderRef'] ] = $validation['validationErrors'];
		}
	}

	public function getOrder( $orderRef ) {
		return isset( $this->orderValidations[ $orderRef ] ) ? $this->orderValidations[ $orderRef ] : array();
	}
}
