Method PostAdjustmentDetails

Summary

Adjustment Details

Input Parameters

NameTypeLengthDescription
taxID numeric 9 [Required] Tax Account ID
taxYear numeric 4 Tax Year
rollCodes System.String 2 Roll Code
period numeric 1 Period
entityCode System.String 4 Entity Code
adjustedData System.String 12 Adjusted Data

Example

POST http://localhost/FusionServices/v3/Naviline/Tax/AdjustmentDetails

Return Values

NameDescription
TransactionCode Transaction Code
TransactionDescription Transaction Description
AdjustmentCode Adjustment Code
AdjustmentDescription Adjustment Description
EntDescription Entity Description
TaxableValue Taxable Value
DelinquentDate Delinquent Date. Format=MMddyy
AdjustmentComment Adjustment Comment
UnpaidAmount Unpaid Amount
ErrorCode 0000 if successful
ErrorMessage details of any error that occurred

Sample Responses

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms)
{
   string uri = "http://localhost/FusionServices/v3/Naviline/Tax/AdjustmentDetails";
   System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 
   // Set paramater values
   postParms.Add("taxID",System.Web.HttpUtility.UrlEncode("290359"));
   postParms.Add("taxYear",System.Web.HttpUtility.UrlEncode("2014"));
   postParms.Add("rollCodes",System.Web.HttpUtility.UrlEncode("RE"));
   postParms.Add("period",System.Web.HttpUtility.UrlEncode("2"));
   postParms.Add("entityCode",System.Web.HttpUtility.UrlEncode("CNSA"));
   postParms.Add("adjustedData",System.Web.HttpUtility.UrlEncode("00080584BOR "));

   WebClient req = new WebClient();
   wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
   wc.Headers.Set("X-APPID", "YOURID");
   wc.Headers.Set("X-APPKEY", "YOURKEY");

   byte[] responseBytes = wc.UploadValues(new Uri(uri), "POST", postParms);
   string stringResult = Encoding.UTF8.GetString(responseBytes); 
   JObject response = JObject.Parse(stringResult);
   string error = response["OutputParms"]["ErrorCode"].ToString();
   if (error == "0000")
   {
         // TODO - YOUR CODE HERE
   }
}

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 PostAdjustmentDetails
   {
       // 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 taxID{get; set;}

       [RegularExpression("[0-9]{0,4}", ErrorMessage = "Numeric values only. Must be 4 digits or less. ")]
       public string taxYear{get; set;}

       [RegularExpression("^(?=.{0,2}$).*", ErrorMessage = "Must be 2 characters or less. ")]
       public string rollCodes{get; set;}

       [RegularExpression("[0-9]{0,1}", ErrorMessage = "Numeric values only. Must be 1 digits or less. ")]
       public string period{get; set;}

       [RegularExpression("^(?=.{0,4}$).*", ErrorMessage = "Must be 4 characters or less. ")]
       public string entityCode{get; set;}

       [RegularExpression("^(?=.{0,12}$).*", ErrorMessage = "Must be 12 characters or less. ")]
       public string adjustedData{get; set;}

       public PostAdjustmentDetails()
       {
           //Set any defaults here
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostAdjustmentDetails 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.PostAdjustmentDetails

@{
   ViewBag.Title = "PostAdjustmentDetails";
}

<h2>PostAdjustmentDetails</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>PostAdjustmentDetails</legend>
       <div class="editor-label">
           @Html.LabelFor(model => model.taxID)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.taxID)
           @Html.ValidationMessageFor(model => model.taxID)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.taxYear)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.taxYear)
           @Html.ValidationMessageFor(model => model.taxYear)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.rollCodes)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.rollCodes)
           @Html.ValidationMessageFor(model => model.rollCodes)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.period)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.period)
           @Html.ValidationMessageFor(model => model.period)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.entityCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.entityCode)
           @Html.ValidationMessageFor(model => model.entityCode)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.adjustedData)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.adjustedData)
           @Html.ValidationMessageFor(model => model.adjustedData)
       </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/PostAdjustmentDetails
public ActionResult PostAdjustmentDetails()
{
   // Create a new instance of the model to pick up any default values.
   PostAdjustmentDetails model =  new PostAdjustmentDetails();

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

// 
// POST: /MyController/PostAdjustmentDetails
[HttpPost]
public ActionResult PostAdjustmentDetails(FormCollection collection)
{
   string url = "v3/Naviline/Tax/AdjustmentDetails";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("taxID", collection["taxID"]);
   inputParms.Add("taxYear", collection["taxYear"]);
   inputParms.Add("rollCodes", collection["rollCodes"]);
   inputParms.Add("period", collection["period"]);
   inputParms.Add("entityCode", collection["entityCode"]);
   inputParms.Add("adjustedData", collection["adjustedData"]);

   try
   {
       // Send the request
       FusionServiceRequest request = new FusionServiceRequest();
       FusionServiceResult result = request.Post(url, inputParms);

       return View("Result", result);
   }
   catch(Exception e)
   {
       HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "PostAdjustmentDetails");
       return View("Error", info);
   }
}