def METHOD_NAME(
    cls,
    reward: Union[int, float],
    total_available_places: int,
) -> Union[int, float]:
    """
    API docs for this endpoint:
    https://docs.prolific.co/docs/api-docs/public/#tag/
        Studies/paths/~1api~1v1~1study-cost-calculator~1/post
    """
    params = dict(
        reward=reward,
        total_available_places=total_available_places,
    )
    response_json = cls.post(cls.calculate_cost_api_endpoint, params=params)
    return response_json["total_cost"]