AlbaApi

<back to all web services

SiteContextRequesttModel

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

class SiteContextRequesttModel implements IConvertible
{
    String? accessToken;
    String? pid;
    String? cprNumber;
    String? uri;
    String? mapUri;
    bool? isPreview;
    String? wtwUserName;
    bool? hasMemberData;

    SiteContextRequesttModel({this.accessToken,this.pid,this.cprNumber,this.uri,this.mapUri,this.isPreview,this.wtwUserName,this.hasMemberData});
    SiteContextRequesttModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        accessToken = json['accessToken'];
        pid = json['pid'];
        cprNumber = json['cprNumber'];
        uri = json['uri'];
        mapUri = json['mapUri'];
        isPreview = json['isPreview'];
        wtwUserName = json['wtwUserName'];
        hasMemberData = json['hasMemberData'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'accessToken': accessToken,
        'pid': pid,
        'cprNumber': cprNumber,
        'uri': uri,
        'mapUri': mapUri,
        'isPreview': isPreview,
        'wtwUserName': wtwUserName,
        'hasMemberData': hasMemberData
    };

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

class SiteContextMemberModel implements IConvertible
{
    String? email;
    String? firstName;
    String? lastName;
    String? mapEmail;
    String? employeeGuid;

    SiteContextMemberModel({this.email,this.firstName,this.lastName,this.mapEmail,this.employeeGuid});
    SiteContextMemberModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        email = json['email'];
        firstName = json['firstName'];
        lastName = json['lastName'];
        mapEmail = json['mapEmail'];
        employeeGuid = json['employeeGuid'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'email': email,
        'firstName': firstName,
        'lastName': lastName,
        'mapEmail': mapEmail,
        'employeeGuid': employeeGuid
    };

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

class SiteContextResponseModel implements IConvertible
{
    bool? cprNumberNeeded;
    String? tokenId;
    String? displayName;
    SiteContextMemberModel? member;

    SiteContextResponseModel({this.cprNumberNeeded,this.tokenId,this.displayName,this.member});
    SiteContextResponseModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        cprNumberNeeded = json['cprNumberNeeded'];
        tokenId = json['tokenId'];
        displayName = json['displayName'];
        member = JsonConverters.fromJson(json['member'],'SiteContextMemberModel',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'cprNumberNeeded': cprNumberNeeded,
        'tokenId': tokenId,
        'displayName': displayName,
        'member': JsonConverters.toJson(member,'SiteContextMemberModel',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'hcbtas_q_albamfs_api.azurewebsites.net', types: <String, TypeInfo> {
    'SiteContextRequesttModel': TypeInfo(TypeOf.Class, create:() => SiteContextRequesttModel()),
    'SiteContextMemberModel': TypeInfo(TypeOf.Class, create:() => SiteContextMemberModel()),
    'SiteContextResponseModel': TypeInfo(TypeOf.Class, create:() => SiteContextResponseModel()),
});

Dart SiteContextRequesttModel 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 /nemidsitecontext HTTP/1.1 
Host: hcbtas-q-albamfs-api.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SiteContextRequesttModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.Model">
  <AccessToken>String</AccessToken>
  <CprNumber>String</CprNumber>
  <HasMemberData>false</HasMemberData>
  <IsPreview>false</IsPreview>
  <Pid>String</Pid>
  <Uri>String</Uri>
  <WtwUserName>String</WtwUserName>
</SiteContextRequesttModel>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SiteContextResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.Model">
  <CprNumberNeeded>false</CprNumberNeeded>
  <DisplayName>String</DisplayName>
  <Member>
    <Email>String</Email>
    <EmployeeGuid>00000000-0000-0000-0000-000000000000</EmployeeGuid>
    <FirstName>String</FirstName>
    <LastName>String</LastName>
  </Member>
  <TokenId>String</TokenId>
</SiteContextResponseModel>