| All Verbs | /SignDocumentEYPV2/ |
|---|
import Foundation
import ServiceStack
public class SignDocumentEYPV2 : Codable
{
public var eypImzaType:EYPImzaType
public var clientKey:String
public var authorizationID:String
public var userSSN:String
public var agentMessage:String
public var documentId:Int
public var stampYn:Bool
public var stampSSN:String
required public init(){}
}
public enum EYPImzaType : Int, Codable
{
case ParafOzetiImza = 1
case PaketOzetiImza = 2
case NihaiOzetMuhur = 3
}
public class SignDocumentEYPResponse : BaseResponse
{
public var result:Bool
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case result
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
result = try container.decodeIfPresent(Bool.self, forKey: .result)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if result != nil { try container.encode(result, forKey: .result) }
}
}
public class BaseResponse : Codable
{
public var serviceSuccessResult:Bool
public var errorMesage:String
required public init(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /SignDocumentEYPV2/ HTTP/1.1
Host: imzagerservices.eyyubiye.bel.tr
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
eypImzaType: ParafOzetiImza,
ClientKey: String,
AuthorizationID: String,
UserSSN: String,
AgentMessage: String,
DocumentId: 0,
stampYn: False,
StampSSN: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Result: False,
ServiceSuccessResult: False,
ErrorMesage: String
}