| POST,OPTIONS | /v1/quote/{QuoteUID}/send |
|---|
import 'package:servicestack/servicestack.dart';
class SendQuoteResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
String? PortalUrl;
List<String>? DeliveryErrors = [];
SendQuoteResponse({this.ResponseStatus,this.PortalUrl,this.DeliveryErrors});
SendQuoteResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
PortalUrl = json['PortalUrl'];
DeliveryErrors = JsonConverters.fromJson(json['DeliveryErrors'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'PortalUrl': PortalUrl,
'DeliveryErrors': JsonConverters.toJson(DeliveryErrors,'List<String>',context!)
};
getTypeName() => "SendQuoteResponse";
TypeContext? context = _ctx;
}
class SendQuoteRequest implements IConvertible
{
String? QuoteUID;
int? RecipientContactId;
String? RecipientEmail;
String? RecipientPhone;
bool? DeliverEmail;
bool? DeliverSms;
SendQuoteRequest({this.QuoteUID,this.RecipientContactId,this.RecipientEmail,this.RecipientPhone,this.DeliverEmail,this.DeliverSms});
SendQuoteRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
QuoteUID = json['QuoteUID'];
RecipientContactId = json['RecipientContactId'];
RecipientEmail = json['RecipientEmail'];
RecipientPhone = json['RecipientPhone'];
DeliverEmail = json['DeliverEmail'];
DeliverSms = json['DeliverSms'];
return this;
}
Map<String, dynamic> toJson() => {
'QuoteUID': QuoteUID,
'RecipientContactId': RecipientContactId,
'RecipientEmail': RecipientEmail,
'RecipientPhone': RecipientPhone,
'DeliverEmail': DeliverEmail,
'DeliverSms': DeliverSms
};
getTypeName() => "SendQuoteRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'SendQuoteResponse': TypeInfo(TypeOf.Class, create:() => SendQuoteResponse()),
'SendQuoteRequest': TypeInfo(TypeOf.Class, create:() => SendQuoteRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/quote/{QuoteUID}/send HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"QuoteUID":"00000000000000000000000000000000","RecipientContactId":0,"RecipientEmail":"String","RecipientPhone":"String","DeliverEmail":false,"DeliverSms":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"PortalUrl":"String","DeliveryErrors":["String"]}