Trendsic Platform Service

<back to all web services

InvoiceWorkChangesDecideRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/invoice/workchanges/{ProjectUID}/decide
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class InvoiceWorkChangesDecideRequest
{
    open var ProjectUID:UUID? = null
    open var InvoiceID:Int? = null
    open var Decision:String? = null
    open var Remember:Boolean? = null
    open var Sources:ArrayList<InvoiceWorkChangeKey> = ArrayList<InvoiceWorkChangeKey>()
}

open class InvoiceWorkChangeKey
{
    open var SourceType:String? = null
    open var SourceID:Int? = null
    open var JobID:Int? = null
    open var WorkDay:String? = null
}

open class InvoiceWorkChangesResponse
{
    open var ResponseStatus:ResponseStatus? = null
    open var Success:Boolean? = null
    open var Changes:ArrayList<InvoiceWorkChange> = ArrayList<InvoiceWorkChange>()
}

open class InvoiceWorkChange
{
    open var SourceType:String? = null
    open var SourceID:Int? = null
    open var JobID:Int? = null
    open var WorkDate:Date? = null
    open var WorkDay:String? = null
    open var DisplayDay:String? = null
    open var Label:String? = null
    open var JobName:String? = null
    open var DisplayDate:Date? = null
    open var Unit:String? = null
    open var Billed:BigDecimal? = null
    open var NowQuantity:BigDecimal? = null
    open var OverBilled:BigDecimal? = null
    open var UnitFactor:BigDecimal? = null
    open var Price:BigDecimal? = null
    open var Amount:BigDecimal? = null
    open var LineType:String? = null
    open var IsTaxable:Boolean? = null
    open var InvoiceID:Int? = null
    open var InvoiceUID:UUID? = null
    open var InvoiceNumber:String? = null
    open var InvoiceTotal:BigDecimal? = null
    open var InvoiceIsLocked:Boolean? = null
    open var InvoiceIsPaid:Boolean? = null
    open var State:String? = null
    open var Remembered:String? = null
    open var DecidedByName:String? = null
    open var DecidedAt:Date? = null
}

Kotlin InvoiceWorkChangesDecideRequest DTOs

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

HTTP + XML

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

POST /v1/invoice/workchanges/{ProjectUID}/decide HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<InvoiceWorkChangesDecideRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Decision>String</Decision>
  <InvoiceID>0</InvoiceID>
  <ProjectUID>00000000-0000-0000-0000-000000000000</ProjectUID>
  <Remember>false</Remember>
  <Sources>
    <InvoiceWorkChangeKey>
      <JobID>0</JobID>
      <SourceID>0</SourceID>
      <SourceType>String</SourceType>
      <WorkDay>String</WorkDay>
    </InvoiceWorkChangeKey>
  </Sources>
</InvoiceWorkChangesDecideRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<InvoiceWorkChangesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Changes>
    <InvoiceWorkChange>
      <Amount>0</Amount>
      <Billed>0</Billed>
      <DecidedAt>0001-01-01T00:00:00</DecidedAt>
      <DecidedByName>String</DecidedByName>
      <DisplayDate>0001-01-01T00:00:00</DisplayDate>
      <DisplayDay>String</DisplayDay>
      <InvoiceID>0</InvoiceID>
      <InvoiceIsLocked>false</InvoiceIsLocked>
      <InvoiceIsPaid>false</InvoiceIsPaid>
      <InvoiceNumber>String</InvoiceNumber>
      <InvoiceTotal>0</InvoiceTotal>
      <InvoiceUID>00000000-0000-0000-0000-000000000000</InvoiceUID>
      <IsTaxable>false</IsTaxable>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <Label>String</Label>
      <LineType>String</LineType>
      <NowQuantity>0</NowQuantity>
      <OverBilled>0</OverBilled>
      <Price>0</Price>
      <Remembered>String</Remembered>
      <SourceID>0</SourceID>
      <SourceType>String</SourceType>
      <State>String</State>
      <Unit>String</Unit>
      <UnitFactor>0</UnitFactor>
      <WorkDate>0001-01-01T00:00:00</WorkDate>
      <WorkDay>String</WorkDay>
    </InvoiceWorkChange>
  </Changes>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1: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>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1: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>
    </d2p1:Meta>
  </ResponseStatus>
  <Success>false</Success>
</InvoiceWorkChangesResponse>