def METHOD_NAME(self, order_lines):
    # Check order contains order lines
    if not order_lines:
        raise serializers.ValidationError(_('At least one order line required.'))
    # Check products in order lines are unique
    product_ids = [ol['product'].product_id for ol in order_lines]
    if len(product_ids) > len(set(product_ids)):
        raise serializers.ValidationError(_('Order lines cannot contain duplicate products.'))
    resource = self.context.get('resource')
    if resource and resource.has_rent():
        if not any(ol['product'].type == Product.RENT for ol in order_lines):
            raise serializers.ValidationError(_('The order must contain at least one product of type "rent".'))
    return order_lines