AlbaApi

<back to all web services

PostDocumentReq

The following routes are available for this service:
POST/documents
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class Members implements IConvertible
{
    String? homeUrl;
    bool? success;
    bool? isPensionSight;

    Members({this.homeUrl,this.success,this.isPensionSight});
    Members.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        homeUrl = json['homeUrl'];
        success = json['success'];
        isPensionSight = json['isPensionSight'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'homeUrl': homeUrl,
        'success': success,
        'isPensionSight': isPensionSight
    };

    getTypeName() => "Members";
    TypeContext? context = _ctx;
}

enum AuthenticationMethodType
{
    NemId,
    SSO,
    Common,
    Single,
}

class PostDocumentReq implements IConvertible
{
    String? reference;
    String? languageIsoCode;
    String? countryIsoCode;
    String? clientUri;
    AuthenticationMethodType? authenticationMethodType;
    String? employeeGuid;

    PostDocumentReq({this.reference,this.languageIsoCode,this.countryIsoCode,this.clientUri,this.authenticationMethodType,this.employeeGuid});
    PostDocumentReq.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        reference = json['reference'];
        languageIsoCode = json['languageIsoCode'];
        countryIsoCode = json['countryIsoCode'];
        clientUri = json['clientUri'];
        authenticationMethodType = JsonConverters.fromJson(json['authenticationMethodType'],'AuthenticationMethodType',context!);
        employeeGuid = json['employeeGuid'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'reference': reference,
        'languageIsoCode': languageIsoCode,
        'countryIsoCode': countryIsoCode,
        'clientUri': clientUri,
        'authenticationMethodType': JsonConverters.toJson(authenticationMethodType,'AuthenticationMethodType',context!),
        'employeeGuid': employeeGuid
    };

    getTypeName() => "PostDocumentReq";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'hcbtas_q_albamfs_api.azurewebsites.net', types: <String, TypeInfo> {
    'Members': TypeInfo(TypeOf.Class, create:() => Members()),
    'AuthenticationMethodType': TypeInfo(TypeOf.Enum, enumValues:AuthenticationMethodType.values),
    'PostDocumentReq': TypeInfo(TypeOf.Class, create:() => PostDocumentReq()),
});

Dart PostDocumentReq 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.

POST /documents HTTP/1.1 
Host: hcbtas-q-albamfs-api.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	reference: String,
	languageIsoCode: String,
	countryIsoCode: String,
	clientUri: String,
	authenticationMethodType: NemId,
	employeeGuid: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	homeUrl: String,
	success: False,
	isPensionSight: False
}