deletePolicy method
Delete an existing policy.
Sign the provided TDeletePolicyBody with the client's stamp function and submit the request (POST /public/v1/submit/delete_policy).
See also: stampDeletePolicy.
Implementation
Future<TDeletePolicyResponse> deletePolicy({
required TDeletePolicyBody 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_DELETE_POLICY',
);
return await request<Map<String, dynamic>, TDeletePolicyResponse>(
"/public/v1/submit/delete_policy",
body,
(json) => TDeletePolicyResponse.fromJson(
transformActivityResponse(json, 'DeletePolicy')));
}