POST | /public/contactus |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class PublicContactUsDetails implements IConvertible
{
String? name;
String? cprNumber;
String? emailAddress;
String? phoneNumber;
String? productId;
String? subject;
String? message;
String? address;
String? toRecipients;
String? ccRecipients;
String? bccRecipients;
PublicContactUsDetails({this.name,this.cprNumber,this.emailAddress,this.phoneNumber,this.productId,this.subject,this.message,this.address,this.toRecipients,this.ccRecipients,this.bccRecipients});
PublicContactUsDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
cprNumber = json['cprNumber'];
emailAddress = json['emailAddress'];
phoneNumber = json['phoneNumber'];
productId = json['productId'];
subject = json['subject'];
message = json['message'];
address = json['address'];
toRecipients = json['toRecipients'];
ccRecipients = json['ccRecipients'];
bccRecipients = json['bccRecipients'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name,
'cprNumber': cprNumber,
'emailAddress': emailAddress,
'phoneNumber': phoneNumber,
'productId': productId,
'subject': subject,
'message': message,
'address': address,
'toRecipients': toRecipients,
'ccRecipients': ccRecipients,
'bccRecipients': bccRecipients
};
getTypeName() => "PublicContactUsDetails";
TypeContext? context = _ctx;
}
class PublicContactUsPostRequest implements IConvertible
{
PublicContactUsDetails? contactDetails;
PublicContactUsPostRequest({this.contactDetails});
PublicContactUsPostRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
contactDetails = JsonConverters.fromJson(json['contactDetails'],'PublicContactUsDetails',context!);
return this;
}
Map<String, dynamic> toJson() => {
'contactDetails': JsonConverters.toJson(contactDetails,'PublicContactUsDetails',context!)
};
getTypeName() => "PublicContactUsPostRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'hcbtas_q_albamfs_api.azurewebsites.net', types: <String, TypeInfo> {
'PublicContactUsDetails': TypeInfo(TypeOf.Class, create:() => PublicContactUsDetails()),
'PublicContactUsPostRequest': TypeInfo(TypeOf.Class, create:() => PublicContactUsPostRequest()),
});
Dart PublicContactUsPostRequest DTOs
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 /public/contactus HTTP/1.1
Host: hcbtas-q-albamfs-api.azurewebsites.net
Accept: application/json
Content-Type: application/json
Content-Length: length
{"contactDetails":{"name":"String","cprNumber":"String","emailAddress":"String","phoneNumber":"String","productId":"String","subject":"String","message":"String","address":"String","toRecipients":"String","ccRecipients":"String","bccRecipients":"String"}}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length false