digitaluapi

<back to all web services

BatchViewQuery

The following routes are available for this service:
GET/batch_view
GET/batch_view/{Id}
import 'package:servicestack/servicestack.dart';
import 'dart:collection';

// @DataContract
abstract class QueryBase
{
    // @DataMember(Order=1)
    int? Skip;

    // @DataMember(Order=2)
    int? Take;

    // @DataMember(Order=3)
    String? OrderBy;

    // @DataMember(Order=4)
    String? OrderByDesc;

    // @DataMember(Order=5)
    String? Include;

    // @DataMember(Order=6)
    String? Fields;

    // @DataMember(Order=7)
    Map<String,String?>? Meta;

    QueryBase({this.Skip,this.Take,this.OrderBy,this.OrderByDesc,this.Include,this.Fields,this.Meta});
    QueryBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Skip = json['Skip'];
        Take = json['Take'];
        OrderBy = json['OrderBy'];
        OrderByDesc = json['OrderByDesc'];
        Include = json['Include'];
        Fields = json['Fields'];
        Meta = JsonConverters.toStringMap(json['Meta']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Skip': Skip,
        'Take': Take,
        'OrderBy': OrderBy,
        'OrderByDesc': OrderByDesc,
        'Include': Include,
        'Fields': Fields,
        'Meta': Meta
    };

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

abstract class QueryDb<T> extends QueryBase
{
    QueryDb();
    QueryDb.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "QueryDb<$T>";
    TypeContext? context = _ctx;
}

class BatchView implements IConvertible
{
    int? Id;
    DateTime? CreatedDate;
    String? FileName;
    String? FileSize;
    int? RecordCount;
    int? UserAuthId;
    String? RowVersionGuid;
    int? InsertedRecords;
    int? UpdatedRecords;
    int? DeletedRecords;
    String? UploadType;
    int? StatusCodesId;
    String? StatusCodeDescription;

    BatchView({this.Id,this.CreatedDate,this.FileName,this.FileSize,this.RecordCount,this.UserAuthId,this.RowVersionGuid,this.InsertedRecords,this.UpdatedRecords,this.DeletedRecords,this.UploadType,this.StatusCodesId,this.StatusCodeDescription});
    BatchView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        FileName = json['FileName'];
        FileSize = json['FileSize'];
        RecordCount = json['RecordCount'];
        UserAuthId = json['UserAuthId'];
        RowVersionGuid = json['RowVersionGuid'];
        InsertedRecords = json['InsertedRecords'];
        UpdatedRecords = json['UpdatedRecords'];
        DeletedRecords = json['DeletedRecords'];
        UploadType = json['UploadType'];
        StatusCodesId = json['StatusCodesId'];
        StatusCodeDescription = json['StatusCodeDescription'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'FileName': FileName,
        'FileSize': FileSize,
        'RecordCount': RecordCount,
        'UserAuthId': UserAuthId,
        'RowVersionGuid': RowVersionGuid,
        'InsertedRecords': InsertedRecords,
        'UpdatedRecords': UpdatedRecords,
        'DeletedRecords': DeletedRecords,
        'UploadType': UploadType,
        'StatusCodesId': StatusCodesId,
        'StatusCodeDescription': StatusCodeDescription
    };

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

class BatchViewQuery extends QueryDb<BatchView> implements IGet, IConvertible
{
    int? UserAuthId;

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

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

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

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

class CampaignCustomersView implements IConvertible
{
    // @DataMember(Order=1)
    int? Id;

    // @DataMember(Order=2)
    String? Name;

    // @DataMember(Order=3)
    String? Description;

    // @DataMember(Order=4)
    int? CustomersId;

    // @DataMember(Order=5)
    String? FirstName;

    // @DataMember(Order=6)
    String? LastName;

    // @DataMember(Order=7)
    String? IdNumber;

    // @DataMember(Order=8)
    String? PassportNumber;

    // @DataMember(Order=9)
    String? Email;

    // @DataMember(Order=10)
    String? MobileNumber;

    // @DataMember(Order=11)
    String? CustomerUniqueIdentifier;

    // @DataMember(Order=12)
    String? CustomerPublicAccessGuid;

    // @DataMember(Order=13)
    String? CampaignPublicAccessGuid;

    // @DataMember(Order=14)
    int? TenantsId;

    CampaignCustomersView({this.Id,this.Name,this.Description,this.CustomersId,this.FirstName,this.LastName,this.IdNumber,this.PassportNumber,this.Email,this.MobileNumber,this.CustomerUniqueIdentifier,this.CustomerPublicAccessGuid,this.CampaignPublicAccessGuid,this.TenantsId});
    CampaignCustomersView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Description = json['Description'];
        CustomersId = json['CustomersId'];
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        IdNumber = json['IdNumber'];
        PassportNumber = json['PassportNumber'];
        Email = json['Email'];
        MobileNumber = json['MobileNumber'];
        CustomerUniqueIdentifier = json['CustomerUniqueIdentifier'];
        CustomerPublicAccessGuid = json['CustomerPublicAccessGuid'];
        CampaignPublicAccessGuid = json['CampaignPublicAccessGuid'];
        TenantsId = json['TenantsId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Description': Description,
        'CustomersId': CustomersId,
        'FirstName': FirstName,
        'LastName': LastName,
        'IdNumber': IdNumber,
        'PassportNumber': PassportNumber,
        'Email': Email,
        'MobileNumber': MobileNumber,
        'CustomerUniqueIdentifier': CustomerUniqueIdentifier,
        'CustomerPublicAccessGuid': CustomerPublicAccessGuid,
        'CampaignPublicAccessGuid': CampaignPublicAccessGuid,
        'TenantsId': TenantsId
    };

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

// @DataContract
class QueryResponse<T> implements IConvertible
{
    // @DataMember(Order=1)
    int? Offset;

    // @DataMember(Order=2)
    int? Total;

    // @DataMember(Order=3)
    List<CampaignCustomersView>? Results;

    // @DataMember(Order=4)
    Map<String,String?>? Meta;

    // @DataMember(Order=5)
    ResponseStatus? ResponseStatus;

    QueryResponse({this.Offset,this.Total,this.Results,this.Meta,this.ResponseStatus});
    QueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Offset = json['Offset'];
        Total = json['Total'];
        Results = JsonConverters.fromJson(json['Results'],'List<CampaignCustomersView>',context!);
        Meta = JsonConverters.toStringMap(json['Meta']);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Offset': Offset,
        'Total': Total,
        'Results': JsonConverters.toJson(Results,'List<CampaignCustomersView>',context!),
        'Meta': Meta,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "QueryResponse<$T>";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
    'BatchView': TypeInfo(TypeOf.Class, create:() => BatchView()),
    'BatchViewQuery': TypeInfo(TypeOf.Class, create:() => BatchViewQuery()),
    'List<BatchView>': TypeInfo(TypeOf.Class, create:() => <BatchView>[]),
    'CampaignCustomersView': TypeInfo(TypeOf.Class, create:() => CampaignCustomersView()),
    'List<CampaignCustomersView>': TypeInfo(TypeOf.Class, create:() => <CampaignCustomersView>[]),
});

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

GET /batch_view HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<QueryResponseOfBatchViewqTGWvAI3 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Offset>0</Offset>
  <Total>0</Total>
  <Results xmlns:d2p1="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel.Types">
    <d2p1:BatchView>
      <d2p1:CreatedDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </d2p1:CreatedDate>
      <d2p1:DeletedRecords>0</d2p1:DeletedRecords>
      <d2p1:FileName>String</d2p1:FileName>
      <d2p1:FileSize>String</d2p1:FileSize>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:InsertedRecords>0</d2p1:InsertedRecords>
      <d2p1:RecordCount>0</d2p1:RecordCount>
      <d2p1:RowVersionGuid>00000000-0000-0000-0000-000000000000</d2p1:RowVersionGuid>
      <d2p1:StatusCodeDescription>String</d2p1:StatusCodeDescription>
      <d2p1:StatusCodesId>0</d2p1:StatusCodesId>
      <d2p1:UpdatedRecords>0</d2p1:UpdatedRecords>
      <d2p1:UploadType>String</d2p1:UploadType>
      <d2p1:UserAuthId>0</d2p1:UserAuthId>
    </d2p1:BatchView>
  </Results>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
  <ResponseStatus>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StackTrace>String</StackTrace>
    <Errors>
      <ResponseError>
        <ErrorCode>String</ErrorCode>
        <FieldName>String</FieldName>
        <Message>String</Message>
        <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Meta>
      </ResponseError>
    </Errors>
    <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Meta>
  </ResponseStatus>
</QueryResponseOfBatchViewqTGWvAI3>