decrypt method

Future<DecryptedInvoice> decrypt(
  1. String sdkId,
  2. EncryptedInvoice invoice
)

Implementation

Future<DecryptedInvoice> decrypt(String sdkId, EncryptedInvoice invoice) async {
	final res = await _methodChannel.invokeMethod<String>(
		'InvoiceApi.decrypt',
		{
			"sdkId": sdkId,
			"invoice": jsonEncode(EncryptedInvoice.encode(invoice)),
		}
	).catchError(convertPlatformException);
	if (res == null) throw AssertionError("received null result from platform method decrypt");
	final parsedResJson = jsonDecode(res);
	return DecryptedInvoice.fromJSON(parsedResJson);
}