Method GetUtilitiesAccountDelinquency
Summary
Returns amount overdue on the account
Remarks
This is used to quickly show if there is an amount overdue on the account, but does not provide further detail.
This method returns records for deliquent accounts starting with the account number provided. If the account is not delinquent, it will still return rows, but the first row will not be for the account provided. Check the account number in the returned rows to get the delinquent amount for the customer.
Input Parameters
Name | Type | Length | Description |
customerNumber |
numeric |
9 |
[Required] Customer Number. See Account Search methods. |
locationNumber |
numeric |
9 |
[Required] Location Number. See Account Search methods. |
Example
GET http://localhost/FusionServices/v2/Naviline/Utilities/{CustomerNumber}/{LocationNumber}/delinquency
Return Values
Name | Description |
CustomerID |
The customer number for the account. Customer number is the first part of the account number. |
LocationID |
The location number for the account. Location number is the second part of the account number. |
CustomerAreaCode |
3 digit area code for customer's phone number. |
CustomerPhone |
Customer's phone number, not including the area code. |
DelinquencyDate |
Date the amount was overdue. Format: mmddyyyy |
CurrentBalance |
Current balance amount on the account. |
DelinquencyAmount |
Amount overdue on the account. |
PendingAmount |
Amount of any payments pending. |
Sample Responses
{
"ServerElapsedTime": "00:00:05.0006681",
"Rows": [
{
"CustomerID": "000027239",
"LocationID": "000041830",
"CustomerAreaCode": "936",
"CustomerPhone": "6397704",
"DelinquencyDate": "05172013",
"CurrentBalance": "001968897",
"DelinquencyAmount": "001968897",
"PendingAmount": "000000000"
},
{
"CustomerID": "000027241",
"LocationID": "000041832",
"CustomerAreaCode": "936",
"CustomerPhone": "6324383",
"DelinquencyDate": "05172013",
"CurrentBalance": "000976927",
"DelinquencyAmount": "000976927",
"PendingAmount": "000000000"
}
],
"OutputParms": {
"ErrorCode": "0000",
"ErrorMessage": ""
}
}
Sample Code
using System.Net;
using Newtonsoft.Json.Linq;
public void MethodName(parms)
{
string uri = "http://localhost/FusionServices/v2/Naviline/Utilities/27211/9258/delinquency";
WebClient wc = new WebClient();
wc.Headers.Set("X-APPID", "YOURID");
wc.Headers.Set("X-APPKEY", "YOURKEY");
string stringResult = wc.DownloadString(new Uri(uri));
JObject response = JObject.Parse(stringResult);
string error = response["OutputParms"]["ErrorCode"].ToString();
if (error == "0000")
{
JArray jRows = (JArray)response["Rows"];
foreach (JObject row in jRows)
{
string CustomerID = row["CustomerID"].ToString();
string LocationID = row["LocationID"].ToString();
string CustomerAreaCode = row["CustomerAreaCode"].ToString();
string CustomerPhone = row["CustomerPhone"].ToString();
string DelinquencyDate = row["DelinquencyDate"].ToString();
string CurrentBalance = row["CurrentBalance"].ToString();
string DelinquencyAmount = row["DelinquencyAmount"].ToString();
string PendingAmount = row["PendingAmount"].ToString();
}
}
}
$.get('http://localhost/FusionServices/v2/Naviline/Utilities/27211/9258/delinquency', function(response) {
$('#resultDiv).html(response);
});
C# Razor MVC Sample Code
using System;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Collections.Specialized;
using FusionServiceHelper.Models;
namespace FusionRazor.Models
{
public class GetUtilitiesAccountDelinquency
{
[Required(ErrorMessage = "Required")]
[RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
public string customerNumber{get; set;}
[Required(ErrorMessage = "Required")]
[RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
public string locationNumber{get; set;}
public GetUtilitiesAccountDelinquency()
{
customerNumber = DefaultData.Get("customerNumber");
locationNumber = DefaultData.Get("locationNumber");
}
}
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the GetUtilitiesAccountDelinquency class. *@
@* NOTE: Select Edit as the Scaffold template. *@
@* NOTE: Use the @model line that is generated at the top. Replace the rest with the lines below.
@model FusionRazor.Models.GetUtilitiesAccountDelinquency
@{
ViewBag.Title = "GetUtilitiesAccountDelinquency";
string myUrl = "http://localhost/FusionServices/v2/Naviline/Utilities/" + Model.CustomerNumber + "/" + Model.LocationNumber + "/delinquency";
}
<h2>GetUtilitiesAccountDelinquency</h2>
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>GetUtilitiesAccountDelinquency</legend>
<div class="editor-label">Use the fields below to change the values and resubmit.</div>
<div class="editor-label">
@Html.LabelFor(model => model.customerNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.customerNumber)
@Html.ValidationMessageFor(model => model.customerNumber)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.locationNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.locationNumber)
@Html.ValidationMessageFor(model => model.locationNumber)
</div>
<p>
<input type="submit" value="Submit"/>
</p>
</fieldset>
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
using System;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FusionServiceHelper.Models;
public ActionResult GetUtilitiesAccountDelinquency()
{
GetUtilitiesAccountDelinquency model = new GetUtilitiesAccountDelinquency();
return View("~/Views/MyFolderPath/GetUtilitiesAccountDelinquency.cshtml", model);
}
[HttpPost]
public ActionResult GetUtilitiesAccountDelinquency(FormCollection collection)
{
string url = "v2/Naviline/Utilities/{CustomerNumber}/{LocationNumber}/delinquency";
NameValueCollection inputParms = new NameValueCollection();
inputParms.Add("customerNumber", collection["customerNumber"]);
inputParms.Add("locationNumber", collection["locationNumber"]);
try
{
FusionServiceRequest request = new FusionServiceRequest();
FusionServiceResult result = request.Get(url, inputParms);
return View("Result", result);
}
catch(Exception e)
{
HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "GetUtilitiesAccountDelinquency");
return View("Error", info);
}
}