restoreIos method

  1. @override
Future<LinkFiveActiveProducts> restoreIos(
  1. List<LinkFiveRestoreAppleItem> restoreList
)
override

RESTORE APPLE APP STORE

This will send all restored transactionIds to LinkFive We will check against apple if those transaction are valid and enable or disable a product

Implementation

@override
Future<LinkFiveActiveProducts> restoreIos(List<LinkFiveRestoreAppleItem> restoreList) async {
  final uri = _makeUri("api/v1/purchases/user/apple/restore");

  final body = {
    "transactionIdList": restoreList.map((restoreAppleItem) {
      return restoreAppleItem.toMap;
    }).toList(growable: false)
  };

  LinkFiveLogger.d("Restore body: $body");

  final response = await httpClient.post(uri, body: body, headers: await _headers);
  return _parseOneTimePurchaseListResponse(response);
}