rejectActivity method

Future<TRejectActivityResponse> rejectActivity({
  1. required TRejectActivityBody input,
})

Reject an activity.

Sign the provided TRejectActivityBody with the client's stamp function and submit the request (POST /public/v1/submit/reject_activity).

See also: stampRejectActivity.

Implementation

Future<TRejectActivityResponse> rejectActivity({
  required TRejectActivityBody 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_REJECT_ACTIVITY',
  );
  return await request<Map<String, dynamic>, TRejectActivityResponse>(
      "/public/v1/submit/reject_activity",
      body,
      (json) => TRejectActivityResponse.fromJson(
          transformActivityResponse(json, 'RejectActivity')));
}