Skip to content

Commit 9d60b2c

Browse files
committed
update GetAccountUpdaterJobSummary.cs
1 parent 138f5e7 commit 9d60b2c

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,6 @@ FakesAssemblies/
194194

195195
# Visual Studio 6 workspace options file
196196
*.opt
197+
198+
# Filesystem
199+
*.DS_Store

TransactionReporting/GetAccountUpdaterJobSummary.cs

+15-16
Original file line numberDiff line numberDiff line change
@@ -24,42 +24,41 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey)
2424
Item = ApiTransactionKey,
2525
};
2626

27-
// parameters for request
28-
string month = "2017-06";
29-
27+
// Set a valid month for the request
28+
string month = "2017-07";
3029

30+
// Build tbe request object
3131
var request = new getAccountUpdaterJobSummaryRequest();
3232
request.month = month;
3333

34-
35-
36-
37-
38-
39-
40-
// instantiate the controller that will call the service
34+
// Instantiate the controller that will call the service
4135
var controller = new getAccountUpdaterJobSummaryController(request);
4236
controller.Execute();
4337

44-
// get the response from the service (errors contained if any)
38+
// Get the response from the service (errors contained if any)
4539
var response = controller.GetApiResponse();
4640

4741
if (response != null && response.messages.resultCode == messageTypeEnum.Ok)
4842
{
43+
Console.WriteLine("SUCCESS: Get Account Updater Summary for Month : " + month);
4944
if (response.auSummary == null)
45+
{
46+
Console.WriteLine("No Account Updater summary for this month.");
5047
return response;
48+
}
5149

50+
// Displaying the summary of each response in the list
5251
foreach (var result in response.auSummary)
5352
{
54-
Console.WriteLine("Reason Code: {0}", result.auReasonCode);
55-
Console.WriteLine("Reason Description: {0}", result.reasonDescription);
56-
Console.WriteLine("# of Profiles updated for this reason: {0}", result.profileCount);
53+
Console.WriteLine(" Reason Code : " + result.auReasonCode);
54+
Console.WriteLine(" Reason Description : " + result.reasonDescription);
55+
Console.WriteLine(" # of Profiles updated for this reason : " + result.profileCount);
5756
}
5857
}
5958
else if (response != null)
6059
{
61-
Console.WriteLine("Error: " + response.messages.message[0].code + " " +
62-
response.messages.message[0].text);
60+
Console.WriteLine("ERROR : Invalid response");
61+
Console.WriteLine("Response : " + response.messages.message[0].code + " " + response.messages.message[0].text);
6362
}
6463

6564
return response;

0 commit comments

Comments
 (0)