updateDocument

inline suspend fun <T : Any> Documents.updateDocument(sidOrUniqueName: String, data: T)

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncDocument without opening the document.

Type T must be annotated with @Serializable.

Parameters

sidOrUniqueName

SID or unique name of existing SyncDocument.

data

New document data.

Throws

SerializationException

If the given value cannot be serialized to JSON object.

TwilioException

When error occurred while updating the document.