Get Entity Codes
Name | Type | Length | Description |
---|---|---|---|
None | No input parameters to pass |
GET http://localhost/FusionServices/v3/Naviline/Tax/EntityCodes
Name | Description |
---|---|
TaxEntityCode | Tax Entity Code |
TaxYear2 | Tax year 2 digit. Ex. 1=2001, 93=1993 |
TaxYear4 | Tax year 4 digit. Ex. 2001, 1993 |
TaxingUnitName | Taxing unit name |
TaxDescription | Description |
ShortDescription | Short Description |
FlatRateAmount | Flat Rate Amount charged |
TaxRatePercentage | Tax Rate Percentage charged |
PerUnitValue | Per Unit value for Tax Rate Percentage charged |
MinimumPenaltyAmount | Minimum penalty amount |
MinimumInterestAmount | Minimum interest amount |
MinimumCollectionAmount | Minimum collection amount |
Type | Type 1=Tax, 2=Charge, 3=Lien, 4=Credit |
AdjustedCharge | Y/N Used only when Type=4(Credit) |
StepRates | Y/N. A step rate is used to calculate the tax amount |
DisplayInColumn | Display In Column 1=Tax, 2=Penalty, 3=Interest, 4=Other |
PeriodsPerYear | Number of periods per year. Blank=Default to roll |
PeriodsToAssign | List of periods to assign when periods per year is used. |
PenaltyGroupCode | Penalty Group Code |
PaymentSequence | Payment Sequence |
BillTypeCode | Bill Type Code |
AllowInstallments | Allow Installments |
using System.Net;
using Newtonsoft.Json.Linq;
public void MethodName(parms)
{
string uri = "http://localhost/FusionServices/v3/Naviline/Tax/EntityCodes";
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 TaxEntityCode = row["TaxEntityCode"].ToString();
string TaxYear2 = row["TaxYear2"].ToString();
string TaxYear4 = row["TaxYear4"].ToString();
string TaxingUnitName = row["TaxingUnitName"].ToString();
string TaxDescription = row["TaxDescription"].ToString();
string ShortDescription = row["ShortDescription"].ToString();
string FlatRateAmount = row["FlatRateAmount"].ToString();
string TaxRatePercentage = row["TaxRatePercentage"].ToString();
string PerUnitValue = row["PerUnitValue"].ToString();
string MinimumPenaltyAmount = row["MinimumPenaltyAmount"].ToString();
string MinimumInterestAmount = row["MinimumInterestAmount"].ToString();
string MinimumCollectionAmount = row["MinimumCollectionAmount"].ToString();
string Type = row["Type"].ToString();
string TXRDTD = row["TXRDTD"].ToString();
string AdjustedCharge = row["AdjustedCharge"].ToString();
string StepRates = row["StepRates"].ToString();
string DisplayInColumn = row["DisplayInColumn"].ToString();
string TXRAPS = row["TXRAPS"].ToString();
string PeriodsPerYear = row["PeriodsPerYear"].ToString();
string PeriodsToAssign = row["PeriodsToAssign"].ToString();
string PenaltyGroupCode = row["PenaltyGroupCode"].ToString();
string PaymentSequence = row["PaymentSequence"].ToString();
string BillTypeCode = row["BillTypeCode"].ToString();
string AllowInstallments = row["AllowInstallments"].ToString();
// TODO - YOUR CODE HERE
}
}
}
$.get('http://localhost/FusionServices/v3/Naviline/Tax/EntityCodes', 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 GetEntityCodes
{
// Add property for each input param in order to map a field to it
public GetEntityCodes()
{
//Set any defaults here
}
}
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the GetEntityCodes 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.GetEntityCodes
@{
ViewBag.Title = "GetEntityCodes";
string myUrl = "http://localhost/FusionServices/v3/Naviline/Tax/EntityCodes";
}
<h2>GetEntityCodes</h2>
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>GetEntityCodes</legend>
<div class="editor-label">Use the fields below to change the values and resubmit.</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/GetEntityCodes
public ActionResult GetEntityCodes()
{
// Create a new instance of the model to pick up any default values.
GetEntityCodes model = new GetEntityCodes();
// pass model to set to default values
// NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
return View("~/Views/MyFolderPath/GetEntityCodes.cshtml", model);
}
//
// POST: /MyController/GetEntityCodes
[HttpPost]
public ActionResult GetEntityCodes(FormCollection collection)
{
string url = "v3/Naviline/Tax/EntityCodes";
// Get the value from each input field
NameValueCollection inputParms = new NameValueCollection();
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", "GetEntityCodes");
return View("Error", info);
}
}