sendInvitation method

Future<void> sendInvitation({
  1. String? userArn,
})

Sends an enrollment invitation email with a URL to a user. The URL is valid for 30 days or until you call this operation again, whichever comes first.

May throw NotFoundException. May throw InvalidUserStatusException. May throw ConcurrentModificationException.

Parameter userArn : The ARN of the user to whom to send an invitation. Required.

Implementation

Future<void> sendInvitation({
  String? userArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.SendInvitation'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (userArn != null) 'UserArn': userArn,
    },
  );
}