shareWith method

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

Implementation

Future<Invoice> shareWith(String sdkId, String delegateId, Invoice invoice, InvoiceShareOptions? options) async {
	final res = await _methodChannel.invokeMethod<String>(
		'InvoiceApi.tryAndRecover.shareWith',
		{
			"sdkId": sdkId,
			"delegateId": jsonEncode(delegateId),
			"invoice": jsonEncode(Invoice.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 Invoice.fromJSON(parsedResJson);
}