patchCaptableStakeholdersById method
- String id,
- CaptableStakeholderPatch captableStakeholderPatch
Changes one of the caller org's stakeholders.
Changes one of the caller org's stakeholders. It is a PARTIAL update: only the fields the request names are written, and a field sent as null clears that column. A request that names no updatable field is refused, and an id this org does not hold is not found. The values are stored as sent. Unlike adding a stakeholder, this route does not check the email's shape or the type and relationship vocabularies, so it can record a value that adding one would have rejected.
Parameters:
-
String id (required): ID is the stakeholder to update. It is the path segment: the URL is the addressing authority, and the org it is resolved in comes from the caller's principal, so an id from another tenant is simply not found.
-
CaptableStakeholderPatch captableStakeholderPatch (required):
Implementation
Future<CaptableUpdated?> patchCaptableStakeholdersById(String id, CaptableStakeholderPatch captableStakeholderPatch,) async {
final response = await patchCaptableStakeholdersByIdWithHttpInfo(id, captableStakeholderPatch,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CaptableUpdated',) as CaptableUpdated;
}
return null;
}