public function __construct(array $options, HttpClientInterface $client, MessageFactory $messageFactory)
{
$options = ArrayObject::ensureArrayObject($options);
$options->defaults($this->options);
$options->validateNotEmpty(array('username', 'password', 'partner', 'vendor', 'tender'));
if (false == is_bool($options['sandbox'])) {
throw new LogicException('The boolean sandbox option must be set.');
}
$this->options = $options;
$this->client = $client;
$this->messageFactory = $messageFactory;
}