 import Alamofire
 
 public class EasyPostApi {
+    
+    let errorDomain = "com.technomagination.EasyPostApi"
     
     var apiToken = ""               //Pass in via setCredentials
     var apiBaseUrl = ""             //Pass in via setCredentials

                if(result.isSuccess) {
                    
                    if let resultDict = result.value as? NSDictionary {
                        if let addressDict = resultDict["address"] as? NSDictionary {
                            let address = EasyPostAddress(jsonDictionary: addressDict)
                        
                            completion(result: EasyPostResult.Success(address))
                        }
                    }
                    
                    

                
                if(result.isSuccess) {
                    
                    if let resultDict = result.value as? NSDictionary {
                        
                        if let error = self.checkForApiResultError(resultDict) {
                            completion(result: EasyPostResult.Failure(error))
                        } else {
                            let address = EasyPostAddress(jsonDictionary: resultDict)
                    
                            completion(result: EasyPostResult.Success(address))
                        }
                    } else {
                        print("Result was successful, but blank.")
                        completion(result: EasyPostResult.Failure(NSError(domain: self.errorDomain, code: 2, userInfo: nil)))
                    }
                    
                    
