Trackunit API

<back to all web services

UpdateUnit

import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    @DataContract
    public static class UpdateUnit
    {
        @DataMember
        public String id = null;

        @DataMember
        public String name = null;

        @DataMember
        public String referenceNumber = null;

        @DataMember
        public String clientId = null;

        @DataMember
        public String categoryId = null;

        @DataMember
        public String vehicleType = null;

        @DataMember
        public Double preKm = null;

        @DataMember
        public Double preRun1 = null;

        @DataMember
        public Double preRun2 = null;

        @DataMember
        public String note = null;

        @DataMember
        public Boolean isActive = null;

        @DataMember
        public String input1Name = null;

        @DataMember
        public String input2Name = null;

        @DataMember
        public String input3Name = null;

        @DataMember
        public String input4Name = null;

        @DataMember
        public Boolean lock = null;
        
        public String getId() { return id; }
        public UpdateUnit setId(String value) { this.id = value; return this; }
        public String getName() { return name; }
        public UpdateUnit setName(String value) { this.name = value; return this; }
        public String getReferenceNumber() { return referenceNumber; }
        public UpdateUnit setReferenceNumber(String value) { this.referenceNumber = value; return this; }
        public String getClientId() { return clientId; }
        public UpdateUnit setClientId(String value) { this.clientId = value; return this; }
        public String getCategoryId() { return categoryId; }
        public UpdateUnit setCategoryId(String value) { this.categoryId = value; return this; }
        public String getVehicleType() { return vehicleType; }
        public UpdateUnit setVehicleType(String value) { this.vehicleType = value; return this; }
        public Double getPreKm() { return preKm; }
        public UpdateUnit setPreKm(Double value) { this.preKm = value; return this; }
        public Double getPreRun1() { return preRun1; }
        public UpdateUnit setPreRun1(Double value) { this.preRun1 = value; return this; }
        public Double getPreRun2() { return preRun2; }
        public UpdateUnit setPreRun2(Double value) { this.preRun2 = value; return this; }
        public String getNote() { return note; }
        public UpdateUnit setNote(String value) { this.note = value; return this; }
        public Boolean getIsActive() { return isActive; }
        public UpdateUnit setIsActive(Boolean value) { this.isActive = value; return this; }
        public String getInput1Name() { return input1Name; }
        public UpdateUnit setInput1Name(String value) { this.input1Name = value; return this; }
        public String getInput2Name() { return input2Name; }
        public UpdateUnit setInput2Name(String value) { this.input2Name = value; return this; }
        public String getInput3Name() { return input3Name; }
        public UpdateUnit setInput3Name(String value) { this.input3Name = value; return this; }
        public String getInput4Name() { return input4Name; }
        public UpdateUnit setInput4Name(String value) { this.input4Name = value; return this; }
        public Boolean isLock() { return lock; }
        public UpdateUnit setLock(Boolean value) { this.lock = value; return this; }
    }

    @DataContract
    public static class UpdateUnitResponse
    {
        @DataMember
        public ResponseStatus responseStatus = null;
        
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public UpdateUnitResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

}

Java UpdateUnit DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .soap11 suffix or ?format=soap11

HTTP + SOAP11

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /soap11 HTTP/1.1 
Host: api.trackunit.com 
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: UpdateUnit

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>

<UpdateUnit xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <CategoryId>String</CategoryId>
  <ClientId>String</ClientId>
  <Id>String</Id>
  <Input1Name>String</Input1Name>
  <Input2Name>String</Input2Name>
  <Input3Name>String</Input3Name>
  <Input4Name>String</Input4Name>
  <IsActive>false</IsActive>
  <Lock>false</Lock>
  <Name>String</Name>
  <Note>String</Note>
  <PreKm>0</PreKm>
  <PreRun1>0</PreRun1>
  <PreRun2>0</PreRun2>
  <ReferenceNumber>String</ReferenceNumber>
  <VehicleType>String</VehicleType>
</UpdateUnit>

</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>

<UpdateUnitResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ResponseStatus>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StackTrace>String</StackTrace>
    <Errors>
      <ResponseError>
        <ErrorCode>String</ErrorCode>
        <FieldName>String</FieldName>
        <Message>String</Message>
        <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Meta>
      </ResponseError>
    </Errors>
    <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Meta>
  </ResponseStatus>
</UpdateUnitResponse>

</soap:Body>
</soap:Envelope>