setRawReceiptAttachment method

Future<EncryptedReceipt> setRawReceiptAttachment(
  1. String sdkId,
  2. String receiptId,
  3. String rev,
  4. String blobType,
  5. Uint8List attachment,
)

Implementation

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