/**
  * UnconfirmedBankAccountException constructor.
  *
  * @param BankInfoStatus $status
  * @param int|bool $miraklId
  * @param string $message
  * @param int $code
  * @param Exception $previous
  */
 public function __construct(BankInfoStatus $status, $miraklId = null, $message = '', $code = 0, Exception $previous = null)
 {
     $this->miraklId = $miraklId;
     $this->status = $status;
     $identity = $miraklId ? "This vendor ({$miraklId})" : "The operator";
     parent::__construct($message ?: "{$identity} bank account is not validated.\n\n             Please contact HiPay", $code, $previous);
 }
 /**
  * InvalidOperation constructor.
  *
  * @param OperationInterface $operation
  * @param string             $message
  * @param int                $code
  * @param Exception          $previous
  */
 public function __construct($operation, $message = '', $code = 0, Exception $previous = null)
 {
     $this->operation = $operation;
     $miraklId = $operation->getMiraklId() ?: 'operateur';
     parent::__construct($message ?: "This operation is invalid [{$miraklId}, {$operation->getAmount()}\n                , {$operation->getCycleDate()->format('Y-m-d')}]", $code, $previous);
 }
 /**
  * AlreadyCreatedOperationException constructor.
  *
  * @param OperationInterface $operation
  * @param string             $message
  * @param int                $code
  * @param Exception          $previous
  */
 public function __construct($operation, $message = '', $code = 0, Exception $previous = null)
 {
     $this->operation = $operation;
     $miraklId = $operation->getMiraklId() ?: 'operateur';
     parent::__construct($message ?: "An operation for {$miraklId} is already\n            created for the payment voucher {$operation->getPaymentVoucher()}", $code, $previous);
 }
 /**
  * TransactionException constructor.
  *
  * @param VendorInterface $vendor
  * @param string          $message
  * @param int             $code
  * @param $previousException
  */
 public function __construct($vendor, $message = '', $code = 0, $previousException = null)
 {
     $this->vendor = $vendor;
     parent::__construct($message ?: "The HiPay Wallet account {$vendor->getHiPayId()} is unidentified. Please upload identification documents for Mirakl shop " . $vendor->getMiraklId() . " if you didn't already do so.", $code, $previousException);
 }
 /**
  * NoWalletFoundException constructor.
  *
  * @param VendorInterface $vendor
  * @param string          $message
  * @param int             $code
  * @param Exception       $previous
  */
 public function __construct(VendorInterface $vendor = null, $message = '', $code = 0, Exception $previous = null)
 {
     $this->vendor = $vendor;
     $defaultMessage = $vendor ? "The wallet for {$vendor->getHiPayId()} is not found" : "The vendor is not found in the storage";
     parent::__construct($message ?: $defaultMessage, $code, $previous);
 }
 /**
  * ValidationFailedException constructor.
  *
  * @param string $constraintViolationList
  * @param int $object
  * @param string $message
  * @param int $code
  * @param Exception $previous
  */
 public function __construct($constraintViolationList, $object, $message = '', $code = 0, Exception $previous = null)
 {
     $this->constraintViolationList = $constraintViolationList;
     parent::__construct($message ?: $this->getDefaultMessage(), $code, $previous);
     $this->object = $object;
 }
 /**
  * NoWalletFoundException constructor.
  *
  * @param VendorInterface $vendor
  * @param string          $message
  * @param int             $code
  * @param Exception       $previous
  */
 public function __construct(VendorInterface $vendor, $message = '', $code = 0, Exception $previous = null)
 {
     $this->vendor = $vendor;
     parent::__construct($message ?: "The vendor {$vendor->getMiraklId()} can't be saved", $code, $previous);
 }
 /**
  * NoFundsAvailable constructor.
  *
  * @param int       $miraklId
  * @param string    $message
  * @param int       $code
  * @param Exception $previous
  */
 public function __construct($miraklId, $message = '', $code = 0, Exception $previous = null)
 {
     $this->miraklId = $miraklId;
     parent::__construct($message ?: "This vendor ({$miraklId}) balance is wrong", $code, $previous);
 }
 /**
  * ChecksumFailedException constructor.
  * @param string $operation
  * @param string $message
  * @param int $code
  * @param Exception|null $previous
  */
 public function __construct($operation, $message = '', $code = 0, Exception $previous = null)
 {
     parent::__construct($message ?: "This operation's status is incorrect", $code, $previous);
     $this->operation = $operation;
 }
 /**
  * InvalidBankInfoException constructor.
  *
  * @param VendorInterface $vendor
  * @param BankInfo        $bankInfo
  * @param string          $message
  * @param int             $code
  * @param Exception       $previous
  */
 public function __construct(VendorInterface $vendor, BankInfo $bankInfo, $message = '', $code = 0, Exception $previous = null)
 {
     $this->vendor = $vendor;
     $this->bankInfo = $bankInfo;
     parent::__construct($message ?: "The creation of the bank account for hipay Wallet\n            {$vendor->getHiPayId()} failed", $code, $previous);
 }
 /**
  * ChecksumFailedException constructor.
  * @param string $withdrawId
  * @param string $message
  * @param int $code
  * @param Exception|null $previous
  */
 public function __construct($withdrawId, $message = '', $code = 0, Exception $previous = null)
 {
     parent::__construct($message ?: "No operation was found with this withdrawId : {$withdrawId}", $code, $previous);
 }
 /**
  * ChecksumFailedException constructor.
  * @param string $message
  * @param int $code
  * @param Exception|null $previous
  */
 public function __construct($message = '', $code = 0, Exception $previous = null)
 {
     parent::__construct($message ?: 'Wrong checksum', $code, $previous);
 }
 /**
  * InvalidBankInfoException constructor.
  *
  * @param VendorInterface $vendor
  * @param BankInfo        $bankInfo
  * @param string          $message
  * @param int             $code
  * @param Exception       $previous
  */
 public function __construct(VendorInterface $vendor, BankInfo $bankInfo, $message = '', $code = 0, Exception $previous = null)
 {
     $this->vendor = $vendor;
     $this->bankInfo = $bankInfo;
     parent::__construct($message ?: "The Bank info for shop {$vendor->getMiraklId()} are not synchronized with HiPay Wallet (which means that bank info have been updated in Mirakl though they were already registered into HiPay Wallet). Please contact HiPay in order to update the bank info for this shop.", $code, $previous);
 }
 /**
  * UnauthorizedModificationException constructor.
  *
  * @param $object
  * @param string         $message
  * @param int            $code
  * @param Exception|null $previous
  */
 public function __construct($object, $message = '', $code = 0, Exception $previous = null)
 {
     $this->object = $object;
     parent::__construct($message ?: 'There are properties who were modified', $code, $previous);
 }