startTransaction method
Starts a new transaction and returns its transaction ID. Transaction IDs are opaque objects that you can use to identify a transaction.
May throw InternalServiceException.
May throw OperationTimeoutException.
Parameter transactionType :
Indicates whether this transaction should be read only or read and write.
Writes made using a read-only transaction ID will be rejected. Read-only
transactions do not need to be committed.
Implementation
Future<StartTransactionResponse> startTransaction({
TransactionType? transactionType,
}) async {
final $payload = <String, dynamic>{
if (transactionType != null) 'TransactionType': transactionType.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/StartTransaction',
exceptionFnMap: _exceptionFns,
);
return StartTransactionResponse.fromJson(response);
}