Bridge

<back to all web services

EnquiryAddBuyer

Enquiries
The following routes are available for this service:
POST/Enquiries/Add-Buyer
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class EnquiryAddBuyer implements IConvertible
{
    int? EnquiryId;
    String? EnquiryGuid;
    String? BuyerCompany;
    String? BuyerEmailAddress;
    int? AccountId;
    int? EntityId;

    EnquiryAddBuyer({this.EnquiryId,this.EnquiryGuid,this.BuyerCompany,this.BuyerEmailAddress,this.AccountId,this.EntityId});
    EnquiryAddBuyer.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        EnquiryId = json['EnquiryId'];
        EnquiryGuid = json['EnquiryGuid'];
        BuyerCompany = json['BuyerCompany'];
        BuyerEmailAddress = json['BuyerEmailAddress'];
        AccountId = json['AccountId'];
        EntityId = json['EntityId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'EnquiryId': EnquiryId,
        'EnquiryGuid': EnquiryGuid,
        'BuyerCompany': BuyerCompany,
        'BuyerEmailAddress': BuyerEmailAddress,
        'AccountId': AccountId,
        'EntityId': EntityId
    };

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

class EnquiryAddBuyerViewModel implements IConvertible
{
    String? Status;
    String? EntityContactGuid;
    List<String>? Errors;

    EnquiryAddBuyerViewModel({this.Status,this.EntityContactGuid,this.Errors});
    EnquiryAddBuyerViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'internal.thebunkerbridge.com', types: <String, TypeInfo> {
    'EnquiryAddBuyer': TypeInfo(TypeOf.Class, create:() => EnquiryAddBuyer()),
    'EnquiryAddBuyerViewModel': TypeInfo(TypeOf.Class, create:() => EnquiryAddBuyerViewModel()),
});

Dart EnquiryAddBuyer 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 /Enquiries/Add-Buyer HTTP/1.1 
Host: internal.thebunkerbridge.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	EnquiryId: 0,
	EnquiryGuid: 00000000000000000000000000000000,
	BuyerCompany: String,
	BuyerEmailAddress: String,
	AccountId: 0,
	EntityId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Status: String,
	EntityContactGuid: 00000000000000000000000000000000,
	Errors: 
	[
		String
	]
}