Trendsic Platform Service

<back to all web services

PortalQuoteApprovalRequest

The following routes are available for this service:
POST,OPTIONS/portal/{Token}/quote/approval
import 'package:servicestack/servicestack.dart';

class PortalQuoteApprovalResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    String? Status;
    bool? Applied;

    PortalQuoteApprovalResponse({this.ResponseStatus,this.Status,this.Applied});
    PortalQuoteApprovalResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class PortalQuoteApprovalRequest implements IConvertible
{
    String? Token;
    String? Decision;
    String? ApprovedByName;
    String? DeclineReason;

    PortalQuoteApprovalRequest({this.Token,this.Decision,this.ApprovedByName,this.DeclineReason});
    PortalQuoteApprovalRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Token = json['Token'];
        Decision = json['Decision'];
        ApprovedByName = json['ApprovedByName'];
        DeclineReason = json['DeclineReason'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Token': Token,
        'Decision': Decision,
        'ApprovedByName': ApprovedByName,
        'DeclineReason': DeclineReason
    };

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'PortalQuoteApprovalResponse': TypeInfo(TypeOf.Class, create:() => PortalQuoteApprovalResponse()),
    'PortalQuoteApprovalRequest': TypeInfo(TypeOf.Class, create:() => PortalQuoteApprovalRequest()),
});

Dart PortalQuoteApprovalRequest 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 /portal/{Token}/quote/approval HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Token: String,
	Decision: String,
	ApprovedByName: String,
	DeclineReason: String
}
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
		}
	},
	Status: String,
	Applied: False
}