def fvschedule_handler()

in financial_functions/lambda_handlers.py [0:0]


def fvschedule_handler(request, context):
    """
    Returns the future value of an initial principal after applying a series of compound interest rates. 
    :param request: Dict containing the parameters to pass to the formula.
    :param context: Lambda execution context
    :return: Dict with a 'result' entry containing the result of the calculation
    """
    logger.info("FVSCHEDULE request: {}".format(request))

    validation_result = __validate_arguments('FVSCHEDULE', request, schemas.fvschedule_schema)
    if not validation_result.get('isValid'):
        return {'error': validation_result.get('error')}

    args = [request['principal'], request.get('schedule', [])]
    return __call_ff('fvschedule', args)