AlbaApi

<back to all web services

PublicContactUsPostRequest

The following routes are available for this service:
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 .xml suffix or ?format=xml

HTTP + XML

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/xml
Content-Type: application/xml
Content-Length: length

<PublicContactUsPostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.ServiceModel">
  <ContactDetails>
    <Address>String</Address>
    <BccRecipients>String</BccRecipients>
    <CcRecipients>String</CcRecipients>
    <CprNumber>String</CprNumber>
    <EmailAddress>String</EmailAddress>
    <Message>String</Message>
    <Name>String</Name>
    <PhoneNumber>String</PhoneNumber>
    <ProductId>String</ProductId>
    <Subject>String</Subject>
    <ToRecipients>String</ToRecipients>
  </ContactDetails>
</PublicContactUsPostRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<boolean xmlns="http://schemas.microsoft.com/2003/10/Serialization/">false</boolean>