sendConsumptionInformation method
Send consumption information about a consumable in-app purchase to the App Store, after your server receives a consumption request notification.
Param: originalTransactionId - The original transaction identifier for which you’re providing consumption information. You receive this identifier in the CONSUMPTION_REQUEST notification the App Store sends to your server.
Implementation
Future<void> sendConsumptionInformation(
String originalTransactionId, ConsumptionRequest request) async {
var url = _appStoreServerHttpClient
.getUrl('/inApps/v1/transactions/consumption/$originalTransactionId');
await _appStoreServerHttpClient.put(url,
body: jsonEncode(request.toJson()));
}