AlbaApi

<back to all web services

ApproveContents

Requires Authentication
The following routes are available for this service:
POST,PUT/approve/changelogs
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 Content extends Entity implements IConvertible
{
    String? section;
    String? itemId;
    String? itemCode;
    String? country;
    String? lang;
    String? app;
    String? companyId;
    String? company;
    Map<String,String?>? elements;

    Content({this.section,this.itemId,this.itemCode,this.country,this.lang,this.app,this.companyId,this.company,this.elements});
    Content.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        section = json['section'];
        itemId = json['itemId'];
        itemCode = json['itemCode'];
        country = json['country'];
        lang = json['lang'];
        app = json['app'];
        companyId = json['companyId'];
        company = json['company'];
        elements = JsonConverters.toStringMap(json['elements']);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'section': section,
        'itemId': itemId,
        'itemCode': itemCode,
        'country': country,
        'lang': lang,
        'app': app,
        'companyId': companyId,
        'company': company,
        'elements': elements
    });

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

class ApproveContent extends Content implements IConvertible
{
    String? status;

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

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'status': status
    });

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

class ApproveContents extends ListBase<ApproveContent> implements IConvertible
{
    final List<ApproveContent> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    ApproveContent operator [](int index) => l[index];
    void operator []=(int index, ApproveContent value) { l[index] = value; }
    ApproveContents();
    ApproveContents.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ApproveContents";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'hcbtas_q_albamfs_api.azurewebsites.net', types: <String, TypeInfo> {
    'Entity': TypeInfo(TypeOf.Class, create:() => Entity()),
    'Content': TypeInfo(TypeOf.Class, create:() => Content()),
    'ApproveContent': TypeInfo(TypeOf.Class, create:() => ApproveContent()),
    'ApproveContents': TypeInfo(TypeOf.Class, create:() => ApproveContents()),
});

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

<ArrayOfApproveContent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.Model" />
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<Content xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model">
  <Id xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model.Base">String</Id>
  <App>String</App>
  <Company>String</Company>
  <CompanyId>String</CompanyId>
  <Country>String</Country>
  <Elements xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Elements>
  <ItemCode>String</ItemCode>
  <ItemId>String</ItemId>
  <Lang>String</Lang>
  <Section>String</Section>
</Content>