Returns usage based charges for a service on a given bill date
The utility services are water, sewer, sanitation, and others the city may have set up.
Calling the service requires the customer number, location number, billing date, and a service code to return the information for.
For each bill, it returns the following information:
Name | Type | Length | Description |
---|---|---|---|
customerNumber | numeric | 9 | [Required] Customer Number. See Account Search methods. |
locationNumber | numeric | 9 | [Required] Location Number. See Account Search methods. |
BillDate | date | 0 | [Required] Billing Date in YYMMDD format. See GetUtilitiesBilling method. |
ServiceCode | System.String | 2 | [Required] Service Code. Use the ServiceCode field returned by GetCurrentCharges |
GET http://localhost/FusionServices/v2/Naviline/Utilities/{CustomerNumber}/{LocationNumber}/billing/{BillDate}/service/{ServiceCode}
Name | Description |
---|---|
TransactionType | |
Description | Description of what the charge is for. Usually indicating the usage rate. |
Amount | Total amount charged to the account. |
Service | Service code for the usage charge |
BillingPeriod | Date the amount was charged on. Format: mmyyyy |
Consumption | The total amount of the utility service that was consumed. This is for metered services, such as water and electricity. |
Demand | The amount of overage demand for the utility service. Overage demand occurs when the customer's consumption exceeds a set limit. This demand amount is normally charged at a higher rate. |
Seasonal | Indicates if it is a seasonal charge. Seasonal charges are based on time of usage, such as summer or winter seasons, or peak and off-peak hours. This field will give a value indicating the type of seasonal charge rates that were applied in calculating the bill amount. |
JurisdictionCode | Indicates the district that the utility service usage occurred in. The jurisdiction the customer is in is part of the billing rate calculations. Example: W1 |
JurisdictionDescripton | Description corresponding to the jurisdiction code. Example: WATER ZONE 1 |
BillingClass | Billing class is the group that customer’s account is part of. Common billing classes are R for RESIDENTIAL and C for COMMERCIAL. Some cities may have more billing classes defined for different types of commercial businesses or residential areas. The billing class the customer is associated with is part of the billing rate calculations. |
BillingClassDescripton | Description corresponding to the BillingClass code. Example: COMMERCIAL |
Inside/Outside | Indicates if the utility is inside or outside of city limits. Values: INSIDE/OUTSIDE |
ChargeType | Any additional code used to identify the type of charge |
ChargeTypeDescripton | Description corresponding to the ChargeType code. |
$.get('http://localhost/FusionServices/v2/Naviline/Utilities/{CustomerNumber}/{LocationNumber}/billing/{BillDate}/service/{ServiceCode}', function(response) {
$('#resultDiv).html(response);
});
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 GetBilledDetail
{
// 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;}
[Required(ErrorMessage = "Required")]
[RegularExpression("^\\d\\d(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$", ErrorMessage = "Date values only. Format: YYMMDD")]
public string BillDate{get; set;}
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,2}$).*", ErrorMessage = "Must be 2 characters or less. ")]
public string ServiceCode{get; set;}
public GetBilledDetail()
{
//Set any defaults here
customerNumber = DefaultData.Get("customerNumber");
locationNumber = DefaultData.Get("locationNumber");
BillDate = DefaultData.Get("BillDate");
ServiceCode = DefaultData.Get("ServiceCode");
}
}
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the GetBilledDetail 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.GetBilledDetail
@{
ViewBag.Title = "GetBilledDetail";
string myUrl = "http://localhost/FusionServices/v2/Naviline/Utilities/" + Model.CustomerNumber + "/" + Model.LocationNumber + "/billing/" + Model.BillDate + "/service/" + Model.ServiceCode;
}
<h2>GetBilledDetail</h2>
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>GetBilledDetail</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>
<div class="editor-label">
@Html.LabelFor(model => model.BillDate)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.BillDate)
@Html.ValidationMessageFor(model => model.BillDate)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.ServiceCode)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.ServiceCode)
@Html.ValidationMessageFor(model => model.ServiceCode)
</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/GetBilledDetail
public ActionResult GetBilledDetail()
{
// Create a new instance of the model to pick up any default values.
GetBilledDetail model = new GetBilledDetail();
// pass model to set to default values
// NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
return View("~/Views/MyFolderPath/GetBilledDetail.cshtml", model);
}
//
// POST: /MyController/GetBilledDetail
[HttpPost]
public ActionResult GetBilledDetail(FormCollection collection)
{
string url = "v2/Naviline/Utilities/{CustomerNumber}/{LocationNumber}/billing/{BillDate}/service/{ServiceCode}";
// Get the value from each input field
NameValueCollection inputParms = new NameValueCollection();
inputParms.Add("customerNumber", collection["customerNumber"]);
inputParms.Add("locationNumber", collection["locationNumber"]);
inputParms.Add("BillDate", collection["BillDate"]);
inputParms.Add("ServiceCode", collection["ServiceCode"]);
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", "GetBilledDetail");
return View("Error", info);
}
}