diff --git a/SampleCode.cs b/SampleCode.cs index d401d9b..5d1ef64 100644 --- a/SampleCode.cs +++ b/SampleCode.cs @@ -133,6 +133,7 @@ private static void ShowMethods() Console.WriteLine(" GetCustomerProfileTransactionList"); Console.WriteLine(" CreateAnAcceptPaymentTransaction"); Console.WriteLine(" GetAccountUpdaterJobSummary"); + Console.WriteLine(" GetAccountUpdaterJobDetails"); } private static void RunMethod(String methodName) @@ -364,6 +365,9 @@ private static void RunMethod(String methodName) //case "GetAccountUpdaterJobSummary": // GetAccountUpdaterJobSummary.Run(apiLoginId, transactionKey); // break; + case "GetAccountUpdaterJobDetails": + GetAccountUpdaterJobDetails.Run(apiLoginId, transactionKey); + break; default: ShowUsage(); break; diff --git a/SampleCode.csproj b/SampleCode.csproj index 29a5425..25a607a 100644 --- a/SampleCode.csproj +++ b/SampleCode.csproj @@ -1,129 +1,129 @@ - - - - - Debug - AnyCPU - {EE8CB03C-AFF3-4480-AFD5-1C8B51540570} - Exe - Properties - net.authorize.sample - SampleCode - v4.5 - 512 - - - - AnyCPU - true - full - false - .\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - .\ - TRACE - prompt - 4 - false - - - - packages\AuthorizeNet.1.9.6\lib\AuthorizeNet.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + AnyCPU + {EE8CB03C-AFF3-4480-AFD5-1C8B51540570} + Exe + Properties + net.authorize.sample + SampleCode + v4.5 + 512 + + + + AnyCPU + true + full + false + .\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + .\ + TRACE + prompt + 4 + false + + + + packages\AuthorizeNet.1.9.6\lib\AuthorizeNet.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleCodeTest/TestRunner.cs b/SampleCodeTest/TestRunner.cs index e4b3a55..3f22e58 100644 --- a/SampleCodeTest/TestRunner.cs +++ b/SampleCodeTest/TestRunner.cs @@ -468,5 +468,9 @@ public ANetApiResponse TestGetAnAcceptPaymentPage() return GetAnAcceptPaymentPage.Run(apiLoginId, transactionKey, GetAmount()); } + public ANetApiResponse TestGetAccountUpdaterJobDetails() + { + return GetAccountUpdaterJobDetails.Run(apiLoginId, transactionKey); + } } } diff --git a/TransactionReporting/GetAccountUpdaterJobDetails.cs b/TransactionReporting/GetAccountUpdaterJobDetails.cs index ba201a2..d1356f7 100644 --- a/TransactionReporting/GetAccountUpdaterJobDetails.cs +++ b/TransactionReporting/GetAccountUpdaterJobDetails.cs @@ -6,6 +6,7 @@ using AuthorizeNet.Api.Contracts.V1; using AuthorizeNet.Api.Controllers; using AuthorizeNet.Api.Controllers.Bases; +using System.Collections; namespace net.authorize.sample { @@ -25,6 +26,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey) }; // parameters for request + string month = "2018-05"; var request = new getAUJobDetailsRequest(); @@ -32,7 +34,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey) request.modifiedTypeFilter = AUJobTypeEnum.all; request.paging = new Paging { - limit = 1000, + limit = 100, offset = 1 }; @@ -45,6 +47,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey) if (response != null && response.messages.resultCode == messageTypeEnum.Ok) { + Console.WriteLine("SUCCESS: Get Account Updater job details for Month : " + month); if (response.auDetails == null) return response; @@ -63,13 +66,20 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey) Console.WriteLine("Reason Code: {0}", delete.auReasonCode); Console.WriteLine("Reason Description: {0}", delete.reasonDescription); } + } + else if (response != null) { Console.WriteLine("Error: " + response.messages.message[0].code + " " + - response.messages.message[0].text); + response.messages.message[0].text); + } + else if (response == null) + { + var errResponse = controller.GetErrorResponse(); + Console.WriteLine("Error: " + errResponse.messages.message[0].code + " " + + response.messages.message[0].text); } - return response; } }