Trendsic Platform Service

<back to all web services

CustomerLinkListRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/customerlink/resource/{ResourceType}/{ResourceUid}
import 'package:servicestack/servicestack.dart';

class CustomerLink implements IConvertible
{
    int? CustomerLinkId;
    String? CustomerLinkUID;
    String? TokenHash;
    String? ResourceType;
    String? ResourceUid;
    String? SensitivityTier;
    bool? RequireOtp;
    String? OtpChannel;
    String? DeliveryChannels;
    int? RecipientContactId;
    String? RecipientEmail;
    String? RecipientPhone;
    bool? SmsConsentSnapshot;
    String? CreatedByUserId;
    int? CreatedByAgentId;
    DateTime? CreatedAtUtc;
    DateTime? ExpiresAtUtc;
    int? MaxViews;
    int? ViewCount;
    DateTime? RevokedAtUtc;
    String? RevokedByUserId;
    String? TenantId;

    CustomerLink({this.CustomerLinkId,this.CustomerLinkUID,this.TokenHash,this.ResourceType,this.ResourceUid,this.SensitivityTier,this.RequireOtp,this.OtpChannel,this.DeliveryChannels,this.RecipientContactId,this.RecipientEmail,this.RecipientPhone,this.SmsConsentSnapshot,this.CreatedByUserId,this.CreatedByAgentId,this.CreatedAtUtc,this.ExpiresAtUtc,this.MaxViews,this.ViewCount,this.RevokedAtUtc,this.RevokedByUserId,this.TenantId});
    CustomerLink.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CustomerLinkId = json['CustomerLinkId'];
        CustomerLinkUID = json['CustomerLinkUID'];
        TokenHash = json['TokenHash'];
        ResourceType = json['ResourceType'];
        ResourceUid = json['ResourceUid'];
        SensitivityTier = json['SensitivityTier'];
        RequireOtp = json['RequireOtp'];
        OtpChannel = json['OtpChannel'];
        DeliveryChannels = json['DeliveryChannels'];
        RecipientContactId = json['RecipientContactId'];
        RecipientEmail = json['RecipientEmail'];
        RecipientPhone = json['RecipientPhone'];
        SmsConsentSnapshot = json['SmsConsentSnapshot'];
        CreatedByUserId = json['CreatedByUserId'];
        CreatedByAgentId = json['CreatedByAgentId'];
        CreatedAtUtc = JsonConverters.fromJson(json['CreatedAtUtc'],'DateTime',context!);
        ExpiresAtUtc = JsonConverters.fromJson(json['ExpiresAtUtc'],'DateTime',context!);
        MaxViews = json['MaxViews'];
        ViewCount = json['ViewCount'];
        RevokedAtUtc = JsonConverters.fromJson(json['RevokedAtUtc'],'DateTime',context!);
        RevokedByUserId = json['RevokedByUserId'];
        TenantId = json['TenantId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CustomerLinkId': CustomerLinkId,
        'CustomerLinkUID': CustomerLinkUID,
        'TokenHash': TokenHash,
        'ResourceType': ResourceType,
        'ResourceUid': ResourceUid,
        'SensitivityTier': SensitivityTier,
        'RequireOtp': RequireOtp,
        'OtpChannel': OtpChannel,
        'DeliveryChannels': DeliveryChannels,
        'RecipientContactId': RecipientContactId,
        'RecipientEmail': RecipientEmail,
        'RecipientPhone': RecipientPhone,
        'SmsConsentSnapshot': SmsConsentSnapshot,
        'CreatedByUserId': CreatedByUserId,
        'CreatedByAgentId': CreatedByAgentId,
        'CreatedAtUtc': JsonConverters.toJson(CreatedAtUtc,'DateTime',context!),
        'ExpiresAtUtc': JsonConverters.toJson(ExpiresAtUtc,'DateTime',context!),
        'MaxViews': MaxViews,
        'ViewCount': ViewCount,
        'RevokedAtUtc': JsonConverters.toJson(RevokedAtUtc,'DateTime',context!),
        'RevokedByUserId': RevokedByUserId,
        'TenantId': TenantId
    };

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

class CustomerLinkExtended extends CustomerLink implements IConvertible
{
    String? RecipientDisplayName;
    String? RecipientType;
    String? Status;

    CustomerLinkExtended({this.RecipientDisplayName,this.RecipientType,this.Status});
    CustomerLinkExtended.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class CustomerLinkListResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<CustomerLinkExtended>? Links = [];

    CustomerLinkListResponse({this.ResponseStatus,this.Links});
    CustomerLinkListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class CustomerLinkListRequest implements IConvertible
{
    String? ResourceType;
    String? ResourceUid;

    CustomerLinkListRequest({this.ResourceType,this.ResourceUid});
    CustomerLinkListRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'CustomerLink': TypeInfo(TypeOf.Class, create:() => CustomerLink()),
    'CustomerLinkExtended': TypeInfo(TypeOf.Class, create:() => CustomerLinkExtended()),
    'CustomerLinkListResponse': TypeInfo(TypeOf.Class, create:() => CustomerLinkListResponse()),
    'List<CustomerLinkExtended>': TypeInfo(TypeOf.Class, create:() => <CustomerLinkExtended>[]),
    'CustomerLinkListRequest': TypeInfo(TypeOf.Class, create:() => CustomerLinkListRequest()),
});

Dart CustomerLinkListRequest DTOs

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

HTTP + JSV

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

GET /v1/customerlink/resource/{ResourceType}/{ResourceUid} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Links: 
	[
		{
			RecipientDisplayName: String,
			RecipientType: String,
			Status: String,
			CustomerLinkId: 0,
			CustomerLinkUID: 00000000000000000000000000000000,
			TokenHash: String,
			ResourceType: String,
			ResourceUid: 00000000000000000000000000000000,
			SensitivityTier: String,
			RequireOtp: False,
			OtpChannel: String,
			DeliveryChannels: String,
			RecipientContactId: 0,
			RecipientEmail: String,
			RecipientPhone: String,
			SmsConsentSnapshot: False,
			CreatedByUserId: 00000000000000000000000000000000,
			CreatedByAgentId: 0,
			CreatedAtUtc: 0001-01-01,
			ExpiresAtUtc: 0001-01-01,
			MaxViews: 0,
			ViewCount: 0,
			RevokedAtUtc: 0001-01-01,
			RevokedByUserId: 00000000000000000000000000000000,
			TenantId: 00000000000000000000000000000000
		}
	]
}