Bridge

<back to all web services

EnquiryAddSupplier

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

class EnquiryAddSupplier implements IConvertible
{
    String? SupplierContact;
    String? EntityName;
    int? PortId;
    int? EnquiryId;
    String? EnquiryGuid;
    int? EntityId;
    bool? AddToAllPorts;
    int? AccountId;

    EnquiryAddSupplier({this.SupplierContact,this.EntityName,this.PortId,this.EnquiryId,this.EnquiryGuid,this.EntityId,this.AddToAllPorts,this.AccountId});
    EnquiryAddSupplier.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        SupplierContact = json['SupplierContact'];
        EntityName = json['EntityName'];
        PortId = json['PortId'];
        EnquiryId = json['EnquiryId'];
        EnquiryGuid = json['EnquiryGuid'];
        EntityId = json['EntityId'];
        AddToAllPorts = json['AddToAllPorts'];
        AccountId = json['AccountId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'SupplierContact': SupplierContact,
        'EntityName': EntityName,
        'PortId': PortId,
        'EnquiryId': EnquiryId,
        'EnquiryGuid': EnquiryGuid,
        'EntityId': EntityId,
        'AddToAllPorts': AddToAllPorts,
        'AccountId': AccountId
    };

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

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

    EnquiryAddSupplierViewModel({this.Status,this.EntityContactGuid,this.Errors});
    EnquiryAddSupplierViewModel.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() => "EnquiryAddSupplierViewModel";
    TypeContext? context = _ctx;
}

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

Dart EnquiryAddSupplier DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Enquiries/Add-Supplier HTTP/1.1 
Host: internal.thebunkerbridge.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"SupplierContact":"String","EntityName":"String","PortId":0,"EnquiryId":0,"EnquiryGuid":"00000000000000000000000000000000","EntityId":0,"AddToAllPorts":false,"AccountId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

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