| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/invoice/workchanges/{ProjectUID}/decide |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal
Namespace Global
Namespace CRM.AgencyPlatform.API.Internal
Public Partial Class InvoiceWorkChange
Public Overridable Property SourceType As String
Public Overridable Property SourceID As Integer
Public Overridable Property JobID As Integer?
Public Overridable Property WorkDate As Date?
Public Overridable Property WorkDay As String
Public Overridable Property DisplayDay As String
Public Overridable Property Label As String
Public Overridable Property JobName As String
Public Overridable Property DisplayDate As Date?
Public Overridable Property Unit As String
Public Overridable Property Billed As Decimal
Public Overridable Property NowQuantity As Decimal
Public Overridable Property OverBilled As Decimal
Public Overridable Property UnitFactor As Decimal
Public Overridable Property Price As Decimal
Public Overridable Property Amount As Decimal
Public Overridable Property LineType As String
Public Overridable Property IsTaxable As Boolean
Public Overridable Property InvoiceID As Integer
Public Overridable Property InvoiceUID As Guid
Public Overridable Property InvoiceNumber As String
Public Overridable Property InvoiceTotal As Decimal
Public Overridable Property InvoiceIsLocked As Boolean
Public Overridable Property InvoiceIsPaid As Boolean
Public Overridable Property State As String
Public Overridable Property Remembered As String
Public Overridable Property DecidedByName As String
Public Overridable Property DecidedAt As Date?
End Class
Public Partial Class InvoiceWorkChangeKey
Public Overridable Property SourceType As String
Public Overridable Property SourceID As Integer
Public Overridable Property JobID As Integer?
Public Overridable Property WorkDay As String
End Class
Public Partial Class InvoiceWorkChangesDecideRequest
Public Overridable Property ProjectUID As Guid
Public Overridable Property InvoiceID As Integer
Public Overridable Property Decision As String
Public Overridable Property Remember As Boolean
Public Overridable Property Sources As List(Of InvoiceWorkChangeKey) = New List(Of InvoiceWorkChangeKey)
End Class
Public Partial Class InvoiceWorkChangesResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property Success As Boolean
Public Overridable Property Changes As List(Of InvoiceWorkChange) = New List(Of InvoiceWorkChange)
End Class
End Namespace
End Namespace
VB.NET InvoiceWorkChangesDecideRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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>