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

NameTypeLengthDescription
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

NameDescription
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

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();
             // TODO - YOUR CODE HERE
        }
    }
}

$.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;

// NOTE: Use the namespace generated when you add the class, so that it is correct.
namespace FusionRazor.Models
{
   public class GetUtilitiesAccountDelinquency
   {
       // Add property for each input param in order to map a field to it
       [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()
       {
           //Set any defaults here
           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;

// NOTE: Replace 'MyController' with the name of your controller.

// 
// GET: /MyController/GetUtilitiesAccountDelinquency
public ActionResult GetUtilitiesAccountDelinquency()
{
   // Create a new instance of the model to pick up any default values.
   GetUtilitiesAccountDelinquency model =  new GetUtilitiesAccountDelinquency();

   // pass model to set to default values
   // NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
   return View("~/Views/MyFolderPath/GetUtilitiesAccountDelinquency.cshtml", model);
}

// 
// POST: /MyController/GetUtilitiesAccountDelinquency
[HttpPost]
public ActionResult GetUtilitiesAccountDelinquency(FormCollection collection)
{
   string url = "v2/Naviline/Utilities/{CustomerNumber}/{LocationNumber}/delinquency";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("customerNumber", collection["customerNumber"]);
   inputParms.Add("locationNumber", collection["locationNumber"]);

   try
   {
       // Send the request
       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);
   }
}