class GrantOfferLetterServiceImpl extends BaseTransactionalService implements GrantOfferLetterService {

    @Override
    public ServiceResult<StringResource> getDocusignUrl(long projectId) {
        return getProject(projectId).andOnSuccessReturn(project -> {
            User projectManager = getExistingProjectManager(project).get().getUser();
            return new StringResource(docusignService.getDocusignUrl(project.getSignedGolDocusignDocument().getEnvelopeId(), projectManager.getId(),
                    projectManager.getName(), projectManager.getEmail(), String.format("/project-setup/project/%d/offer", projectId)));
        });
    }

}