regis

<back to all web services

FinancialAidApplicationFileRequest

Requires Authentication
Required permission:FinancialAidPermission
The following routes are available for this service:
POST/Finance/FinancialAid/Application/{application_uuid}/{file_uuid}
import Foundation
import ServiceStack

public class FinancialAidApplicationFileRequest : Codable
{
    public var application_uuid:String
    public var file_uuid:String

    required public init(){}
}

public class FileResponse : FileSimpleResponse
{
    public var type:String
    public var content:[UInt8] = []

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

    private enum CodingKeys : String, CodingKey {
        case type
        case content
    }

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

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

public class FileSimpleResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var uuid:String
    public var name:String
    public var `extension`:String
    public var size:Int

    required public init(){}
}


Swift FinancialAidApplicationFileRequest DTOs

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

HTTP + OTHER

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

POST /Finance/FinancialAid/Application/{application_uuid}/{file_uuid} HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"application_uuid":"String","file_uuid":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"type":"String","content":"AA==","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"uuid":"String","name":"String","extension":"String","size":0}