CenResService

<back to all web services

ProfileMergePost

The following routes are available for this service:
POST/profile/merge/{SubscriptionId}
import 'package:servicestack/servicestack.dart';

class Response implements IConvertible
{
    String? statusCode;
    int? recordCount;
    int? errorCount;

    Response({this.statusCode,this.recordCount,this.errorCount});
    Response.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'statusCode': statusCode,
        'recordCount': recordCount,
        'errorCount': errorCount
    };

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

enum ProfileMergePurgeSource
{
    Other,
    Messaging,
    DirectDBExtract,
    ReportImport,
}

class ProfilePurgeContainer implements IConvertible
{
    DateTime? transactionDate;
    String? retiredProfileId;
    ProfileMergePurgeSource? sourceId;
    String? importSource;
    String? importSourceId;
    String? cendynPropertyID;

    ProfilePurgeContainer({this.transactionDate,this.retiredProfileId,this.sourceId,this.importSource,this.importSourceId,this.cendynPropertyID});
    ProfilePurgeContainer.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        transactionDate = JsonConverters.fromJson(json['transactionDate'],'DateTime',context!);
        retiredProfileId = json['retiredProfileId'];
        sourceId = JsonConverters.fromJson(json['sourceId'],'ProfileMergePurgeSource',context!);
        importSource = json['importSource'];
        importSourceId = json['importSourceId'];
        cendynPropertyID = json['cendynPropertyID'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'transactionDate': JsonConverters.toJson(transactionDate,'DateTime',context!),
        'retiredProfileId': retiredProfileId,
        'sourceId': JsonConverters.toJson(sourceId,'ProfileMergePurgeSource',context!),
        'importSource': importSource,
        'importSourceId': importSourceId,
        'cendynPropertyID': cendynPropertyID
    };

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

class ProfileMergeContainer extends ProfilePurgeContainer implements IConvertible
{
    String? winningProfileId;
    String? transferredCendynID;

    ProfileMergeContainer({this.winningProfileId,this.transferredCendynID});
    ProfileMergeContainer.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class ProfileMergePost implements IConvertible
{
    ProfileMergeContainer? profileMergeContainer;
    String? subscriptionId;

    ProfileMergePost({this.profileMergeContainer,this.subscriptionId});
    ProfileMergePost.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'profileMergeContainer': JsonConverters.toJson(profileMergeContainer,'ProfileMergeContainer',context!),
        'subscriptionId': subscriptionId
    };

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

TypeContext _ctx = TypeContext(library: 'cert.cendyn.com', types: <String, TypeInfo> {
    'Response': TypeInfo(TypeOf.Class, create:() => Response()),
    'ProfileMergePurgeSource': TypeInfo(TypeOf.Enum, enumValues:ProfileMergePurgeSource.values),
    'ProfilePurgeContainer': TypeInfo(TypeOf.Class, create:() => ProfilePurgeContainer()),
    'ProfileMergeContainer': TypeInfo(TypeOf.Class, create:() => ProfileMergeContainer()),
    'ProfileMergePost': TypeInfo(TypeOf.Class, create:() => ProfileMergePost()),
});

Dart ProfileMergePost 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 /profile/merge/{SubscriptionId} HTTP/1.1 
Host: cert.cendyn.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ProfileMergePost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
  <ProfileMergeContainer>
    <CendynPropertyID>String</CendynPropertyID>
    <ImportSource>String</ImportSource>
    <ImportSourceId>String</ImportSourceId>
    <RetiredProfileId>String</RetiredProfileId>
    <SourceId>Other</SourceId>
    <TransactionDate>0001-01-01T00:00:00</TransactionDate>
    <TransferredCendynID>String</TransferredCendynID>
    <WinningProfileId>String</WinningProfileId>
  </ProfileMergeContainer>
  <SubscriptionId>String</SubscriptionId>
</ProfileMergePost>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
  <ErrorCount>0</ErrorCount>
  <RecordCount>0</RecordCount>
  <StatusCode>String</StatusCode>
</Response>