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 .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 /v1/customerlink/resource/{ResourceType}/{ResourceUid} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CustomerLinkListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Links>
    <CustomerLinkExtended>
      <CreatedAtUtc>0001-01-01T00:00:00</CreatedAtUtc>
      <CreatedByAgentId>0</CreatedByAgentId>
      <CreatedByUserId>00000000-0000-0000-0000-000000000000</CreatedByUserId>
      <CustomerLinkId>0</CustomerLinkId>
      <CustomerLinkUID>00000000-0000-0000-0000-000000000000</CustomerLinkUID>
      <DeliveryChannels>String</DeliveryChannels>
      <ExpiresAtUtc>0001-01-01T00:00:00</ExpiresAtUtc>
      <MaxViews>0</MaxViews>
      <OtpChannel>String</OtpChannel>
      <RecipientContactId>0</RecipientContactId>
      <RecipientEmail>String</RecipientEmail>
      <RecipientPhone>String</RecipientPhone>
      <RequireOtp>false</RequireOtp>
      <ResourceType>String</ResourceType>
      <ResourceUid>00000000-0000-0000-0000-000000000000</ResourceUid>
      <RevokedAtUtc>0001-01-01T00:00:00</RevokedAtUtc>
      <RevokedByUserId>00000000-0000-0000-0000-000000000000</RevokedByUserId>
      <SensitivityTier>String</SensitivityTier>
      <SmsConsentSnapshot>false</SmsConsentSnapshot>
      <TenantId>00000000-0000-0000-0000-000000000000</TenantId>
      <TokenHash>String</TokenHash>
      <ViewCount>0</ViewCount>
      <RecipientDisplayName>String</RecipientDisplayName>
      <RecipientType>String</RecipientType>
      <Status>String</Status>
    </CustomerLinkExtended>
  </Links>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1: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>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1: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>
    </d2p1:Meta>
  </ResponseStatus>
</CustomerLinkListResponse>