Portal

<back to all web services

EditPurchaseOrderVersionMeta

Requires Authentication
Required role:VeoliaAdmin
The following routes are available for this service:
PUT/user/{supplieruserid}/purchaseorder/{purchaseorderid}/purchaseorderversion/{purchaseorderversionid}/meta
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Portal.ServiceDto
Imports Portal.Common

Namespace Global

    Namespace Portal.Common

        Public Enum PurchaseOrderDocumentType
            Draft = 0
            Comment = 1
        End Enum

        Public Enum ReviewStatus
            Draft = 0
            Commented = 1
            Accepted = 2
        End Enum
    End Namespace

    Namespace Portal.ServiceDto

        Public Partial Class BrowseFileResponseBase
            Public Overridable Property Id As Integer
            Public Overridable Property FileContentId As Integer
            Public Overridable Property FileName As String
            Public Overridable Property Size As Long
        End Class

        Public Partial Class BrowsePurchaseOrderVersionResponse
            Inherits ResponseBase
            Public Overridable Property PurchaseOrderVersion As PurchaseOrderVersionDetails
        End Class

        Public Partial Class EditPurchaseOrderVersionMeta
            Inherits PurchaseOrderVersionBase
            Implements IPut
            Public Sub New()
                Meta = New Dictionary(Of String, String)
            End Sub

            Public Overridable Property Meta As Dictionary(Of String, String)
        End Class

        Public Partial Class PurchaseOrderBase
            Public Overridable Property PurchaseOrderId As Integer
            Public Overridable Property SupplierUserId As Integer
        End Class

        Public Partial Class PurchaseOrderFileSimple
            Inherits BrowseFileResponseBase
            Public Overridable Property PurchaseOrderVersionId As Integer
            Public Overridable Property DocumentType As PurchaseOrderDocumentType
        End Class

        Public Partial Class PurchaseOrderVersionBase
            Inherits PurchaseOrderBase
            Public Overridable Property PurchaseOrderVersionId As Integer
        End Class

        Public Partial Class PurchaseOrderVersionDetails
            Inherits PurchaseOrderVersionSimple
            Public Sub New()
                Meta = New Dictionary(Of String, String)
                PurchaseOrderFiles = New List(Of PurchaseOrderFileSimple)
            End Sub

            Public Overridable Property Meta As Dictionary(Of String, String)
            Public Overridable Property ViewingDateTime As Nullable(Of Date)
            Public Overridable Property ReviewingDateTime As Nullable(Of Date)
            Public Overridable Property PurchaseOrderFiles As List(Of PurchaseOrderFileSimple)
        End Class

        Public Partial Class PurchaseOrderVersionSimple
            Public Overridable Property Id As Integer
            Public Overridable Property PurchaseOrderId As Integer
            Public Overridable Property SupplierUserId As Integer
            Public Overridable Property Version As Integer
            Public Overridable Property IsViewed As Boolean
            Public Overridable Property Status As ReviewStatus
        End Class

        Public Partial Class ResponseBase
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class
    End Namespace
End Namespace

VB.NET EditPurchaseOrderVersionMeta DTOs

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

HTTP + JSV

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

PUT /user/{supplieruserid}/purchaseorder/{purchaseorderid}/purchaseorderversion/{purchaseorderversionid}/meta HTTP/1.1 
Host: szallitoiportal-be.veolia.hu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Meta: 
	{
		String: String
	},
	PurchaseOrderVersionId: 0,
	PurchaseOrderId: 0,
	SupplierUserId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	PurchaseOrderVersion: 
	{
		Meta: 
		{
			String: String
		},
		ViewingDateTime: 0001-01-01,
		ReviewingDateTime: 0001-01-01,
		PurchaseOrderFiles: 
		[
			{
				PurchaseOrderVersionId: 0,
				DocumentType: 0,
				Id: 0,
				FileContentId: 0,
				FileName: String,
				Size: 0
			}
		],
		Id: 0,
		PurchaseOrderId: 0,
		SupplierUserId: 0,
		Version: 0,
		IsViewed: False,
		Status: 0
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}