openOrCreate

abstract suspend fun openOrCreate(uniqueName: String, ttl: <Error class: unknown class> = Duration.INFINITE): SyncDocument

Open existing SyncDocument by unique name or create a new one if specified name does not exist.

Return

Opened or created SyncDocument.

Parameters

uniqueName

Unique name to find existing document or to assign to new document upon creation.

ttl

Time to live from now or Duration.INFINITE to indicate no expiry.

Throws

TwilioException

When error occurred while document opening or creation.