encryptAndSetReceiptAttachment method
Implementation
Future<EncryptedReceipt> encryptAndSetReceiptAttachment(String sdkId, Receipt receipt, String blobType, Uint8List attachment) async {
final res = await _methodChannel.invokeMethod<String>(
'ReceiptApi.encryptAndSetReceiptAttachment',
{
"sdkId": sdkId,
"receipt": jsonEncode(Receipt.encode(receipt)),
"blobType": jsonEncode(blobType),
"attachment": jsonEncode(base64Encode(attachment as List<int>)),
}
);
if (res == null) throw AssertionError("received null result from platform method encryptAndSetReceiptAttachment");
final parsedResJson = jsonDecode(res);
return EncryptedReceipt.fromJSON(parsedResJson);
}