createInvitations method
Create invitations to join an existing organization.
Sign the provided TCreateInvitationsBody with the client's stamp function and submit the request (POST /public/v1/submit/create_invitations).
See also: stampCreateInvitations.
Implementation
Future<TCreateInvitationsResponse> createInvitations({
required TCreateInvitationsBody 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_INVITATIONS',
);
return await request<Map<String, dynamic>, TCreateInvitationsResponse>(
"/public/v1/submit/create_invitations",
body,
(json) => TCreateInvitationsResponse.fromJson(
transformActivityResponse(json, 'CreateInvitations')));
}