         case Success
         case Error(error: ErrorType)
     }
-
+    public enum InternalErrorCode: Int {
+        case RestoredPurchaseWhenPurchasing = 0
+        case NothingToRestoreWhenPurchasing = 1
+        case PurchasedWhenRestoringPurchase = 2
+    }
 
     // MARK: Singleton
     private static let sharedInstance = SwiftyStoreKit()

    private func processPurchaseResult(result: InAppProductPurchaseRequest.TransactionResult) -> PurchaseResultType {
        switch result {
        case .Purchased(let productId):
            // TODO: Need a way to match with current product?
            return .Success(productId: productId)
        case .Failed(let error):
            return .Error(error: .Failed(error: error))
        case .Restored(_):
            fatalError("case Restored is not allowed for purchase flow")
        case .NothingToRestore:
            fatalError("case NothingToRestore is not allowed for purchase flow")
        }
    }
    
    private func processRestoreResult(result: InAppProductPurchaseRequest.TransactionResult) -> RestoreResultType {
        switch result {
        case .Purchased(let productId):
            return .Success(productId: productId)
        case .Failed(let error):
            return .Error(error: error)
        case .Restored(let productId):

            }
        }
    }
    
    private func storeInternalError(code code: Int = 0, description: String = "") -> NSError {
        return NSError(domain: "SwiftyStoreKit", code: code, userInfo: [ NSLocalizedDescriptionKey: description ])
    }
}
