Trendsic Platform Service

<back to all web services

LineMessagesRequest

Requires Authentication
Required roles:Administrator, Administrator, AdministratorRequires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/LineMessages/{Id}
GET,POST,PUT,DELETE,OPTIONS/v1/LineMessages
GET,POST,PUT,DELETE,OPTIONS/v1/LineMessages/Line/{LineId}
GET,POST,PUT,DELETE,OPTIONS/v1/LineMessages/Location/{LocationId}/Customers/{CustomerId}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class LineMessage implements IConvertible
{
    String? Id;
    String? LineId;
    String? LineName;
    String? Message;
    String? MessageId;
    int? DisplayOrder;

    LineMessage({this.Id,this.LineId,this.LineName,this.Message,this.MessageId,this.DisplayOrder});
    LineMessage.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        LineId = json['LineId'];
        LineName = json['LineName'];
        Message = json['Message'];
        MessageId = json['MessageId'];
        DisplayOrder = json['DisplayOrder'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'LineId': LineId,
        'LineName': LineName,
        'Message': Message,
        'MessageId': MessageId,
        'DisplayOrder': DisplayOrder
    };

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

class LineMessagesResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<LineMessage>? LineMessages = [];

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

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

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

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

class LineMessagesRequest implements IConvertible
{
    String? Id;
    String? LineId;
    List<LineMessage>? LineMessages = [];

    LineMessagesRequest({this.Id,this.LineId,this.LineMessages});
    LineMessagesRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'LineId': LineId,
        'LineMessages': JsonConverters.toJson(LineMessages,'List<LineMessage>',context!)
    };

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

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

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

POST /v1/LineMessages/{Id} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Id: 00000000000000000000000000000000,
	LineId: 00000000000000000000000000000000,
	LineMessages: 
	[
		{
			Id: 00000000000000000000000000000000,
			LineId: 00000000000000000000000000000000,
			LineName: String,
			Message: String,
			MessageId: 00000000000000000000000000000000,
			DisplayOrder: 0
		}
	]
}
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
		}
	},
	LineMessages: 
	[
		{
			Id: 00000000000000000000000000000000,
			LineId: 00000000000000000000000000000000,
			LineName: String,
			Message: String,
			MessageId: 00000000000000000000000000000000,
			DisplayOrder: 0
		}
	]
}