Portal

<back to all web services

BrowseSupplementaryDocumentType

The following routes are available for this service:
GET/tender/{tenderid}/user/{userid}/round/{tenderroundid}/supplementary/{supplementaryid}/documenttype
import Foundation
import ServiceStack

public class BrowseSupplementaryDocumentType : SupplementaryBase, IGet
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public class SupplementaryBase : TenderUserTenderRoundBase
{
    public var supplementaryId:Int

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case supplementaryId
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        supplementaryId = try container.decodeIfPresent(Int.self, forKey: .supplementaryId)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if supplementaryId != nil { try container.encode(supplementaryId, forKey: .supplementaryId) }
    }
}

public class TenderUserTenderRoundBase : Codable
{
    public var tenderId:Int
    public var userId:Int
    public var tenderRoundId:Int

    required public init(){}
}

public class BrowseSupplementaryDocumentTypeResponse : ResponseBase
{
    public var documentTypes:[SupplementaryDocumentTypeSimple] = []

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case documentTypes
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        documentTypes = try container.decodeIfPresent([SupplementaryDocumentTypeSimple].self, forKey: .documentTypes) ?? []
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if documentTypes.count > 0 { try container.encode(documentTypes, forKey: .documentTypes) }
    }
}

public class ResponseBase : Codable
{
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class SupplementaryDocumentTypeSimple : Codable
{
    public var id:Int
    public var documentType:String
    public var direction:SupplementaryFileDirection

    required public init(){}
}

public enum SupplementaryFileDirection : Int, Codable
{
    case Request = 0
    case Response = 1
}


Swift BrowseSupplementaryDocumentType DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /tender/{tenderid}/user/{userid}/round/{tenderroundid}/supplementary/{supplementaryid}/documenttype HTTP/1.1 
Host: szallitoiportal-be.veolia.hu 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"DocumentTypes":[{"Id":0,"DocumentType":"String","Direction":0}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}