createPolicies method
Create new policies.
Sign the provided TCreatePoliciesBody with the client's stamp function and submit the request (POST /public/v1/submit/create_policies).
See also: stampCreatePolicies.
Implementation
Future<TCreatePoliciesResponse> createPolicies({
required TCreatePoliciesBody 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_CREATE_POLICIES',
);
return await request<Map<String, dynamic>, TCreatePoliciesResponse>(
"/public/v1/submit/create_policies",
body,
(json) => TCreatePoliciesResponse.fromJson(
transformActivityResponse(json, 'CreatePolicies')));
}