Trendsic Platform Service

<back to all web services

LineQuestionsRequest

Requires Authentication
Required roles:Administrator, Administrator, Administrator
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/LineQuestions/{Id}
GET,POST,PUT,DELETE,OPTIONS/v1/LineQuestions
GET,POST,PUT,DELETE,OPTIONS/v1/LineQuestions/Line/{LineId}
GET,POST,PUT,DELETE,OPTIONS/v1/LineQuestions/Line/Questionnaire/{CustomerCheckInId}/{RO}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class LineQuestion implements IConvertible
{
    int? Id;
    String? CustomerCheckInId;
    String? LineId;
    String? Question;
    String? Answer;
    bool? Active;

    LineQuestion({this.Id,this.CustomerCheckInId,this.LineId,this.Question,this.Answer,this.Active});
    LineQuestion.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        CustomerCheckInId = json['CustomerCheckInId'];
        LineId = json['LineId'];
        Question = json['Question'];
        Answer = json['Answer'];
        Active = json['Active'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CustomerCheckInId': CustomerCheckInId,
        'LineId': LineId,
        'Question': Question,
        'Answer': Answer,
        'Active': Active
    };

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

class LineQuestionsResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<LineQuestion>? LineQuestions = [];

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

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

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

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

class LineQuestionsRequest implements IConvertible
{
    int? Id;
    String? LineId;
    String? CustomerCheckInId;
    bool? RO;
    List<LineQuestion>? LineQuestions = [];

    LineQuestionsRequest({this.Id,this.LineId,this.CustomerCheckInId,this.RO,this.LineQuestions});
    LineQuestionsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'LineId': LineId,
        'CustomerCheckInId': CustomerCheckInId,
        'RO': RO,
        'LineQuestions': JsonConverters.toJson(LineQuestions,'List<LineQuestion>',context!)
    };

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

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

Dart LineQuestionsRequest DTOs

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

HTTP + OTHER

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

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

{"Id":0,"LineId":"00000000000000000000000000000000","CustomerCheckInId":"00000000000000000000000000000000","RO":false,"LineQuestions":[{"Id":0,"CustomerCheckInId":"00000000000000000000000000000000","LineId":"00000000000000000000000000000000","Question":"String","Answer":"String","Active":false}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"LineQuestions":[{"Id":0,"CustomerCheckInId":"00000000000000000000000000000000","LineId":"00000000000000000000000000000000","Question":"String","Answer":"String","Active":false}]}