shareWith method

Future<EncryptedInvoice> shareWith(
  1. String sdkId,
  2. String delegateId,
  3. EncryptedInvoice invoice,
  4. InvoiceShareOptions? options,
)

Implementation

Future<EncryptedInvoice> shareWith(String sdkId, String delegateId, EncryptedInvoice invoice, InvoiceShareOptions? options) async {
	final res = await _methodChannel.invokeMethod<String>(
		'InvoiceApi.encrypted.shareWith',
		{
			"sdkId": sdkId,
			"delegateId": jsonEncode(delegateId),
			"invoice": jsonEncode(EncryptedInvoice.encode(invoice)),
			"options": jsonEncode(options == null ? null : InvoiceShareOptions.encode(options!)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method shareWith");
	final parsedResJson = jsonDecode(res);
	return EncryptedInvoice.fromJSON(parsedResJson);
}