Platform API

<back to all web services

InsertObjectSubscription

Inseets a new object subscription record

Requires Authentication
The following routes are available for this service:
All Verbs/api/insertobjectsubscription
import 'package:servicestack/servicestack.dart';

class ObjectSubscription implements IConvertible
{
    String? ObjectSubscriptionId;
    String? ObjectId;
    String? SuiteDataSourceInstanceId;
    String? RmsTableContextId;
    String? AlternateKey;
    String? SuiteDataSourceName;
    DateTime? CreatedAt;
    DateTime? LastModified;
    String? RecordStatus;
    String? SuiteInstanceId;
    String? SuiteInstanceName;
    String? ContactIdLicensee;
    String? SubscriptionUpdateResultId;
    String? SubscriptionUpdateResult;
    bool? IsExport;
    DateTime? ProcessedAt;
    DateTime? AcknowledgedAt;
    int? Failures;
    String? Result;
    String? ObjectHash;

    ObjectSubscription({this.ObjectSubscriptionId,this.ObjectId,this.SuiteDataSourceInstanceId,this.RmsTableContextId,this.AlternateKey,this.SuiteDataSourceName,this.CreatedAt,this.LastModified,this.RecordStatus,this.SuiteInstanceId,this.SuiteInstanceName,this.ContactIdLicensee,this.SubscriptionUpdateResultId,this.SubscriptionUpdateResult,this.IsExport,this.ProcessedAt,this.AcknowledgedAt,this.Failures,this.Result,this.ObjectHash});
    ObjectSubscription.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ObjectSubscriptionId = json['ObjectSubscriptionId'];
        ObjectId = json['ObjectId'];
        SuiteDataSourceInstanceId = json['SuiteDataSourceInstanceId'];
        RmsTableContextId = json['RmsTableContextId'];
        AlternateKey = json['AlternateKey'];
        SuiteDataSourceName = json['SuiteDataSourceName'];
        CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
        LastModified = JsonConverters.fromJson(json['LastModified'],'DateTime',context!);
        RecordStatus = json['RecordStatus'];
        SuiteInstanceId = json['SuiteInstanceId'];
        SuiteInstanceName = json['SuiteInstanceName'];
        ContactIdLicensee = json['ContactIdLicensee'];
        SubscriptionUpdateResultId = json['SubscriptionUpdateResultId'];
        SubscriptionUpdateResult = json['SubscriptionUpdateResult'];
        IsExport = json['IsExport'];
        ProcessedAt = JsonConverters.fromJson(json['ProcessedAt'],'DateTime',context!);
        AcknowledgedAt = JsonConverters.fromJson(json['AcknowledgedAt'],'DateTime',context!);
        Failures = json['Failures'];
        Result = json['Result'];
        ObjectHash = json['ObjectHash'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ObjectSubscriptionId': ObjectSubscriptionId,
        'ObjectId': ObjectId,
        'SuiteDataSourceInstanceId': SuiteDataSourceInstanceId,
        'RmsTableContextId': RmsTableContextId,
        'AlternateKey': AlternateKey,
        'SuiteDataSourceName': SuiteDataSourceName,
        'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
        'LastModified': JsonConverters.toJson(LastModified,'DateTime',context!),
        'RecordStatus': RecordStatus,
        'SuiteInstanceId': SuiteInstanceId,
        'SuiteInstanceName': SuiteInstanceName,
        'ContactIdLicensee': ContactIdLicensee,
        'SubscriptionUpdateResultId': SubscriptionUpdateResultId,
        'SubscriptionUpdateResult': SubscriptionUpdateResult,
        'IsExport': IsExport,
        'ProcessedAt': JsonConverters.toJson(ProcessedAt,'DateTime',context!),
        'AcknowledgedAt': JsonConverters.toJson(AcknowledgedAt,'DateTime',context!),
        'Failures': Failures,
        'Result': Result,
        'ObjectHash': ObjectHash
    };

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

/**
* Inseets a new object subscription record
*/
// @Api(Description="Inseets a new object subscription record")
class InsertObjectSubscription implements IConvertible
{
    ObjectSubscription? ObjectSubscription;

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

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

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

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

class ObjectSubscriptionResponse implements IConvertible
{
    bool? Success;
    String? Message;
    ResponseStatus? ResponseStatus;

    ObjectSubscriptionResponse({this.Success,this.Message,this.ResponseStatus});
    ObjectSubscriptionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Success': Success,
        'Message': Message,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'pfapi.pstpf.com.au', types: <String, TypeInfo> {
    'ObjectSubscription': TypeInfo(TypeOf.Class, create:() => ObjectSubscription()),
    'InsertObjectSubscription': TypeInfo(TypeOf.Class, create:() => InsertObjectSubscription()),
    'ObjectSubscriptionResponse': TypeInfo(TypeOf.Class, create:() => ObjectSubscriptionResponse()),
});

Dart InsertObjectSubscription DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/insertobjectsubscription HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"ObjectSubscription":{"ObjectSubscriptionId":"00000000000000000000000000000000","ObjectId":"00000000-0000-0000-0000-000000000000","SuiteDataSourceInstanceId":"00000000-0000-0000-0000-000000000000","RmsTableContextId":"00000000-0000-0000-0000-000000000000","AlternateKey":"String","SuiteDataSourceName":"String","CreatedAt":"0001-01-01T00:00:00.0000000","LastModified":"0001-01-01T00:00:00.0000000","RecordStatus":"String","SuiteInstanceId":"00000000-0000-0000-0000-000000000000","SuiteInstanceName":"String","ContactIdLicensee":"00000000-0000-0000-0000-000000000000","SubscriptionUpdateResultId":"00000000000000000000000000000000","SubscriptionUpdateResult":"String","IsExport":false,"ProcessedAt":"0001-01-01T00:00:00.0000000","AcknowledgedAt":"0001-01-01T00:00:00.0000000","Failures":0,"Result":"String","ObjectHash":"String"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Success":false,"Message":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}