Files
purchases-ios/Tests/APITesters/AllAPITests/CustomEntitlementComputationSwiftAPITester/ErrorCodesAPI.swift
T

63 lines
1.9 KiB
Swift

//
// Copyright RevenueCat Inc. All Rights Reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// ErrorCodesAPI.swift
//
// Created by Madeline Beyl on 9/5/21.
import Foundation
import RevenueCat_CustomEntitlementComputation
var errCode: ErrorCode!
func checkPurchasesErrorCodeEnums() {
switch errCode! {
case .unknownError,
.purchaseCancelledError,
.storeProblemError,
.purchaseNotAllowedError,
.purchaseInvalidError,
.productNotAvailableForPurchaseError,
.productAlreadyPurchasedError,
.receiptAlreadyInUseError,
.invalidReceiptError,
.missingReceiptFileError,
.networkError,
.invalidCredentialsError,
.unexpectedBackendResponseError,
.receiptInUseByOtherSubscriberError,
.invalidAppUserIdError,
.unknownBackendError,
.invalidAppleSubscriptionKeyError,
.ineligibleError,
.insufficientPermissionsError,
.paymentPendingError,
.invalidSubscriberAttributesError,
.logOutAnonymousUserError,
.configurationError,
.unsupportedError,
.operationAlreadyInProgressForProductError,
.emptySubscriberAttributes,
.productDiscountMissingIdentifierError,
.productDiscountMissingSubscriptionGroupIdentifierError,
.customerInfoError,
.systemInfoError,
.beginRefundRequestError,
.productRequestTimedOut,
.apiEndpointBlockedError,
.invalidPromotionalOfferError,
.offlineConnectionError,
.featureNotAvailableInCustomEntitlementsComputationMode,
.signatureVerificationFailed,
.featureNotSupportedWithStoreKit1:
print(errCode!)
@unknown default:
fatalError()
}
}