def generate_recurrent_orders(request):
        """
        Start report generating with users recurrent orders

        :param request: Request from client side

        :return: Response with data for users who have recurrent orders
        """

        parameters = request.query_params
        start_date = get_date_from_request(parameters, 'start_date')
        end_date = get_date_from_request(parameters, 'end_date')
        direct_debit = check_for_true_false_all(parameters, 'direct_debit')
        period_finished = check_for_true_false_all(parameters, 'period_finished')
        context = request.user.appcontextmembers.context

        return start_report_generating(
            context,
            INTERNAL_REPORT_RECURRENT_ORDERS,
            input_data=dict(
                start_date=format_date_short_or_none(start_date),
                end_date=format_date_short_or_none(end_date),
                direct_debit=direct_debit,
                period_finished=period_finished
            )
        )
    def generate_active_users_list(self, request):
        """
        Start report generating with active users

        :param request: Request from client side

        :return: Response with active users
        """

        context = request.user.appcontextmembers.context

        parameters = request.query_params
        start_date = get_date(parameters.get(
            'start_date', None), 'start_date')
        end_date = get_date(parameters.get(
            'end_date', None), 'end_date')
        consecutive_days = get_required_int_value(parameters.get(
            'consecutive_days', None), 'consecutive_days')
        amount_to_validate = get_required_int_value(parameters.get(
            'amount_to_validate', None), 'amount_to_validate')

        return start_report_generating(
            context,
            INTERNAL_REPORT_ACTIVE_USERS,
            input_data=dict(
                start_date=format_date_short(start_date),
                end_date=format_date_short(end_date),
                consecutive_days=consecutive_days,
                amount_to_validate=amount_to_validate
            )
        )
    def generate_assets_list(self, request):
        """
        Start report generating with assets

        :param request: Request from client side

        :return: Response with assets
        """

        context = request.user.appcontextmembers.context

        return start_report_generating(
            context,
            INTERNAL_REPORT_ASSETS,
        )
    def generate_balances(request):
        """
        Start report generating with asset container balances

        :param request: Request from client side

        :return: Response with data for asset container balances
        """

        context = request.user.appcontextmembers.context

        return start_report_generating(
            context,
            INTERNAL_REPORT_BALANCES,
        )
    def validate_quarter_data(self, request):
        """
        Start report generating with invalid quarter reports
        :param request: Request from client side
        :return: Response with data for users who did not pass validation

        ---
        """

        parameters = request.query_params
        end_date = get_end_date_from_request(parameters)
        context = request.user.appcontextmembers.context

        return start_report_generating(
            context,
            INTERNAL_REPORT_QUARTER_VALIDATION,
            input_data=dict(
                end_date=format_date_short(end_date)
            )
        )
    def generate_users_risk_score_list(self, request):
        """
        Start report generating with users risk score

        ---
        """

        parameters = request.query_params

        context = request.user.appcontextmembers.context

        upper_risk_score = get_int_value(parameters.get('upper_risk_score'))
        lower_risk_score = get_int_value(parameters.get('lower_risk_score'))

        return start_report_generating(
            context,
            INTERNAL_REPORT_USER_RISK_SCORES,
            input_data=dict(
                upper_risk_score=upper_risk_score,
                lower_risk_score=lower_risk_score
            )
        )
    def generate_orders(request):
        """
        Start report generating with users orders

        :param request: Request from client side

        :return: Response with data for users who have orders
        """

        parameters = request.query_params
        start_date = get_date_from_request(parameters, 'start_date')
        end_date = get_date_from_request(parameters, 'end_date')
        context = request.user.appcontextmembers.context

        return start_report_generating(
            context,
            INTERNAL_REPORT_ORDERS,
            input_data=dict(
                start_date=format_date_short_or_none(start_date),
                end_date=format_date_short_or_none(end_date)
            )
        )
    def get_goals_report(request):
        """
        Start report generating with users goals

        :param request: Request from client side

        :return: Response with data for users who did not pass validation
        """

        parameters = request.query_params
        start_date = get_date_from_request(parameters, 'start_date')
        end_date = get_date_from_request(parameters, 'end_date')
        context = request.user.appcontextmembers.context

        return start_report_generating(
            context,
            INTERNAL_REPORT_GOALS,
            input_data=dict(
                start_date=format_date_short_or_none(start_date),
                end_date=format_date_short_or_none(end_date)
            )
        )