updateOauth2Credential method
Future<TUpdateOauth2CredentialResponse>
updateOauth2Credential({
- required TUpdateOauth2CredentialBody input,
Update an OAuth 2.0 provider credential
Sign the provided TUpdateOauth2CredentialBody with the client's stamp function and submit the request (POST /public/v1/submit/update_oauth2_credential).
See also: stampUpdateOauth2Credential.
Implementation
Future<TUpdateOauth2CredentialResponse> updateOauth2Credential({
required TUpdateOauth2CredentialBody input,
}) async {
final body = packActivityBody(
bodyJson: input.toJson(),
fallbackOrganizationId: input.organizationId ??
config.organizationId ??
(throw Exception(
"Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
activityType: 'ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL',
);
return await request<Map<String, dynamic>, TUpdateOauth2CredentialResponse>(
"/public/v1/submit/update_oauth2_credential",
body,
(json) => TUpdateOauth2CredentialResponse.fromJson(
transformActivityResponse(json, 'UpdateOauth2Credential')));
}