AlbaApi

<back to all web services

ContentMergeReqUpdated

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

class Entity implements IEntity, IConvertible
{
    String? id;

    Entity({this.id});
    Entity.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'id': id
    };

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

class ChangeHistory implements IConvertible
{
    String? updatedBy;
    DateTime? dateCreated;
    String? element;
    String? old;
    String? new;
    String? status;
    String? approvedBy;
    DateTime? dateApproved;

    ChangeHistory({this.updatedBy,this.dateCreated,this.element,this.old,this.new,this.status,this.approvedBy,this.dateApproved});
    ChangeHistory.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        updatedBy = json['updatedBy'];
        dateCreated = JsonConverters.fromJson(json['dateCreated'],'DateTime',context!);
        element = json['element'];
        old = json['old'];
        new = json['new'];
        status = json['status'];
        approvedBy = json['approvedBy'];
        dateApproved = JsonConverters.fromJson(json['dateApproved'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'updatedBy': updatedBy,
        'dateCreated': JsonConverters.toJson(dateCreated,'DateTime',context!),
        'element': element,
        'old': old,
        'new': new,
        'status': status,
        'approvedBy': approvedBy,
        'dateApproved': JsonConverters.toJson(dateApproved,'DateTime',context!)
    };

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

class ChangeLog extends Entity implements IConvertible
{
    String? referenceId;
    String? country;
    String? language;
    String? section;
    String? itemCode;
    String? itemId;
    List<ChangeHistory>? history;

    ChangeLog({this.referenceId,this.country,this.language,this.section,this.itemCode,this.itemId,this.history});
    ChangeLog.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        referenceId = json['referenceId'];
        country = json['country'];
        language = json['language'];
        section = json['section'];
        itemCode = json['itemCode'];
        itemId = json['itemId'];
        history = JsonConverters.fromJson(json['history'],'List<ChangeHistory>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'referenceId': referenceId,
        'country': country,
        'language': language,
        'section': section,
        'itemCode': itemCode,
        'itemId': itemId,
        'history': JsonConverters.toJson(history,'List<ChangeHistory>',context!)
    });

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

class ContentMergeReqUpdated implements IConvertible
{
    List<ChangeLog>? changeLogs;

    ContentMergeReqUpdated({this.changeLogs});
    ContentMergeReqUpdated.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        changeLogs = JsonConverters.fromJson(json['changeLogs'],'List<ChangeLog>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'changeLogs': JsonConverters.toJson(changeLogs,'List<ChangeLog>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'hcbtas_q_albamfs_api.azurewebsites.net', types: <String, TypeInfo> {
    'Entity': TypeInfo(TypeOf.Class, create:() => Entity()),
    'ChangeHistory': TypeInfo(TypeOf.Class, create:() => ChangeHistory()),
    'ChangeLog': TypeInfo(TypeOf.Class, create:() => ChangeLog()),
    'List<ChangeHistory>': TypeInfo(TypeOf.Class, create:() => <ChangeHistory>[]),
    'ContentMergeReqUpdated': TypeInfo(TypeOf.Class, create:() => ContentMergeReqUpdated()),
    'List<ChangeLog>': TypeInfo(TypeOf.Class, create:() => <ChangeLog>[]),
});

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

POST /contentmerge/changelog HTTP/1.1 
Host: hcbtas-q-albamfs-api.azurewebsites.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"changeLogs":[{"referenceId":"String","country":"String","language":"String","section":"String","itemCode":"String","itemId":"String","history":[{"updatedBy":"String","dateCreated":"0001-01-01T00:00:00.0000000","element":"String","old":"String","new":"String","status":"String","approvedBy":"String","dateApproved":"0001-01-01T00:00:00.0000000"}],"id":"String"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"referenceId":"String","country":"String","language":"String","section":"String","itemCode":"String","itemId":"String","history":[{"updatedBy":"String","dateCreated":"0001-01-01T00:00:00.0000000","element":"String","old":"String","new":"String","status":"String","approvedBy":"String","dateApproved":"0001-01-01T00:00:00.0000000"}],"id":"String"}