From 0f2e430cd6e68cf9032d0bede52f4f399e2b2417 Mon Sep 17 00:00:00 2001 From: Maarten Balliauw Date: Mon, 8 Dec 2014 17:54:38 +0100 Subject: [PATCH] Enums are not integers when calling ToString. Cast needed. --- src/SyntaxTree.FastSpring.Api/CompanyStore.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SyntaxTree.FastSpring.Api/CompanyStore.cs b/src/SyntaxTree.FastSpring.Api/CompanyStore.cs index 363acc6..a7f0ca6 100644 --- a/src/SyntaxTree.FastSpring.Api/CompanyStore.cs +++ b/src/SyntaxTree.FastSpring.Api/CompanyStore.cs @@ -102,7 +102,7 @@ public async Task UpdateSubscriptionAsync(string reference, SubscriptionUpdate s { using (var response = (HttpWebResponse)await request.GetResponseAsync()) { - if (!response.StatusCode.ToString().StartsWith("2")) + if (!((int)response.StatusCode).ToString().StartsWith("2")) { throw new Exception(response.StatusDescription); } @@ -148,7 +148,7 @@ public async Task CancelSubscriptionAsync(string reference) { using (var response = (HttpWebResponse)await request.GetResponseAsync()) { - if (!response.StatusCode.ToString().StartsWith("2")) + if (!((int)response.StatusCode).ToString().StartsWith("2")) { throw new Exception(response.StatusDescription); }