createReceipt method

Future<Receipt> createReceipt(
  1. String sdkId,
  2. Receipt entity
)

Implementation

Future<Receipt> createReceipt(String sdkId, Receipt entity) async {
	final res = await _methodChannel.invokeMethod<String>(
		'ReceiptApi.tryAndRecover.createReceipt',
		{
			"sdkId": sdkId,
			"entity": jsonEncode(Receipt.encode(entity)),
		}
	).catchError(convertPlatformException);
	if (res == null) throw AssertionError("received null result from platform method createReceipt");
	final parsedResJson = jsonDecode(res);
	return Receipt.fromJSON(parsedResJson);
}