tvpl.api

<back to all web services

ApproveProcurementItemRequest

Requires Authentication
The following routes are available for this service:
POST/procurement/item/{Id}/approve
namespace tvpl.api.ServiceModel

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type ProcurementItem() = 
        member val Id:Int32 = new Int32() with get,set
        member val BatchId:Int32 = new Int32() with get,set
        member val DepartmentId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val EquipmentId:Nullable<Int32> = new Nullable<Int32>() with get,set
        [<Required>]
        [<StringLength(500)>]
        member val ProductName:String = null with get,set

        member val TechnicalSpec:String = null with get,set
        [<StringLength(50)>]
        member val Unit:String = null with get,set

        member val Quantity:Int32 = new Int32() with get,set
        member val Purpose:String = null with get,set
        member val Note:String = null with get,set
        member val ApprovalStatus:Int32 = new Int32() with get,set
        member val ApprovalNote:String = null with get,set
        member val ApprovedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val ApprovedBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val CreatedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val CreatedBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val UpdatedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val UpdatedBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val IsDeleted:Nullable<Boolean> = new Nullable<Boolean>() with get,set
        member val DeletedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val DeletedBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        [<Ignore>]
        member val DepartmentName:String = null with get,set

        [<Ignore>]
        member val CreatedByName:String = null with get,set

        [<Ignore>]
        member val ApprovedByName:String = null with get,set

    [<AllowNullLiteral>]
    type ApproveProcurementItemRequest() = 
        member val Id:Int32 = new Int32() with get,set
        member val Approve:Boolean = new Boolean() with get,set
        member val Note:String = null with get,set

F# ApproveProcurementItemRequest 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 /procurement/item/{Id}/approve HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ApproveProcurementItemRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
  <Approve>false</Approve>
  <Id>0</Id>
  <Note>String</Note>
</ApproveProcurementItemRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ProcurementItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
  <ApprovalNote>String</ApprovalNote>
  <ApprovalStatus>0</ApprovalStatus>
  <ApprovedAt>0001-01-01T00:00:00</ApprovedAt>
  <ApprovedBy>0</ApprovedBy>
  <ApprovedByName>String</ApprovedByName>
  <BatchId>0</BatchId>
  <CreatedAt>0001-01-01T00:00:00</CreatedAt>
  <CreatedBy>0</CreatedBy>
  <CreatedByName>String</CreatedByName>
  <DeletedAt>0001-01-01T00:00:00</DeletedAt>
  <DeletedBy>0</DeletedBy>
  <DepartmentId>0</DepartmentId>
  <DepartmentName>String</DepartmentName>
  <EquipmentId>0</EquipmentId>
  <Id>0</Id>
  <IsDeleted>false</IsDeleted>
  <Note>String</Note>
  <ProductName>String</ProductName>
  <Purpose>String</Purpose>
  <Quantity>0</Quantity>
  <TechnicalSpec>String</TechnicalSpec>
  <Unit>String</Unit>
  <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
  <UpdatedBy>0</UpdatedBy>
</ProcurementItem>