'Cancel an order that was created by the user.
:return: The order that is created
:rtype: Order'

def cancel_order(self, order_id):

    assert isinstance(order_id, OrderId), type(order_id)
    order = self.order_repository.find_by_id(order_id)
    if order:
        order.cancel()
        self.order_repository.update(order)
    self._logger.info(('Order    cancelled    with    id:    ' + str(order_id)))
