Bridge

<back to all web services

EnquiryEdit

Enquiries
The following routes are available for this service:
GET/Enquiries/Edit
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class EnquiryEdit implements IConvertible
{
    String? EnquiryGuid;

    EnquiryEdit({this.EnquiryGuid});
    EnquiryEdit.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'EnquiryGuid': EnquiryGuid
    };

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

class GetProductsViewModel implements IConvertible
{
    int? Id;
    int? Index;
    String? Name;
    bool? Deleted;
    double? ETSMultiplication;

    GetProductsViewModel({this.Id,this.Index,this.Name,this.Deleted,this.ETSMultiplication});
    GetProductsViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Index = json['Index'];
        Name = json['Name'];
        Deleted = json['Deleted'];
        ETSMultiplication = JsonConverters.toDouble(json['ETSMultiplication']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Index': Index,
        'Name': Name,
        'Deleted': Deleted,
        'ETSMultiplication': ETSMultiplication
    };

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

class GetVersionsViewModel implements IConvertible
{
    int? Id;
    int? Index;
    String? Name;
    bool? Deleted;

    GetVersionsViewModel({this.Id,this.Index,this.Name,this.Deleted});
    GetVersionsViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Index = json['Index'];
        Name = json['Name'];
        Deleted = json['Deleted'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Index': Index,
        'Name': Name,
        'Deleted': Deleted
    };

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

class GetGradesViewModel implements IConvertible
{
    int? Id;
    int? Index;
    String? Name;
    bool? Deleted;

    GetGradesViewModel({this.Id,this.Index,this.Name,this.Deleted});
    GetGradesViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Index = json['Index'];
        Name = json['Name'];
        Deleted = json['Deleted'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Index': Index,
        'Name': Name,
        'Deleted': Deleted
    };

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

class GetUnitsViewModel implements IConvertible
{
    int? Id;
    String? Code;
    bool? Deleted;

    GetUnitsViewModel({this.Id,this.Code,this.Deleted});
    GetUnitsViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Code = json['Code'];
        Deleted = json['Deleted'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Code': Code,
        'Deleted': Deleted
    };

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

class GetDeliveryMethodsViewModel implements IConvertible
{
    int? Id;
    String? Name;

    GetDeliveryMethodsViewModel({this.Id,this.Name});
    GetDeliveryMethodsViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name
    };

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

class EntityAccountsViewModel implements IConvertible
{
    int? Id;
    String? Type;
    String? Name;
    int? LinkedVesselId;

    EntityAccountsViewModel({this.Id,this.Type,this.Name,this.LinkedVesselId});
    EntityAccountsViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Type = json['Type'];
        Name = json['Name'];
        LinkedVesselId = json['LinkedVesselId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Type': Type,
        'Name': Name,
        'LinkedVesselId': LinkedVesselId
    };

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

class EnquiryGradesEditViewModel implements IConvertible
{
    int? Id;
    bool? Deleted;
    int? ProductId;
    int? VersionId;
    int? GradeId;
    String? SpecificationComments;
    int? VolumeFrom;
    int? VolumeTo;
    int? UnitId;

    EnquiryGradesEditViewModel({this.Id,this.Deleted,this.ProductId,this.VersionId,this.GradeId,this.SpecificationComments,this.VolumeFrom,this.VolumeTo,this.UnitId});
    EnquiryGradesEditViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Deleted = json['Deleted'];
        ProductId = json['ProductId'];
        VersionId = json['VersionId'];
        GradeId = json['GradeId'];
        SpecificationComments = json['SpecificationComments'];
        VolumeFrom = json['VolumeFrom'];
        VolumeTo = json['VolumeTo'];
        UnitId = json['UnitId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Deleted': Deleted,
        'ProductId': ProductId,
        'VersionId': VersionId,
        'GradeId': GradeId,
        'SpecificationComments': SpecificationComments,
        'VolumeFrom': VolumeFrom,
        'VolumeTo': VolumeTo,
        'UnitId': UnitId
    };

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

class APIEditEnquiryViewModel implements IConvertible
{
    int? Id;
    String? Guid;
    DateTime? DateFrom;
    DateTime? DateTo;
    String? Agent;
    String? GeneralComments;
    int? DeliveryMethodId;
    int? AccountId;
    String? RequestedTermsType;
    int? CreditTermDays;
    int? VesselId;
    String? VesselName;
    int? IMONumber;
    String? IMONumberOrMMSI;
    List<GetProductsViewModel>? GetProducts;
    List<GetVersionsViewModel>? GetVersions;
    List<GetGradesViewModel>? GetGrades;
    List<GetUnitsViewModel>? GetUnits;
    List<GetDeliveryMethodsViewModel>? GetDeliveryMethods;
    List<EntityAccountsViewModel>? GetEntityAccounts;
    List<EnquiryGradesEditViewModel>? EnquiryGradesEdit;

    APIEditEnquiryViewModel({this.Id,this.Guid,this.DateFrom,this.DateTo,this.Agent,this.GeneralComments,this.DeliveryMethodId,this.AccountId,this.RequestedTermsType,this.CreditTermDays,this.VesselId,this.VesselName,this.IMONumber,this.IMONumberOrMMSI,this.GetProducts,this.GetVersions,this.GetGrades,this.GetUnits,this.GetDeliveryMethods,this.GetEntityAccounts,this.EnquiryGradesEdit});
    APIEditEnquiryViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Guid = json['Guid'];
        DateFrom = JsonConverters.fromJson(json['DateFrom'],'DateTime',context!);
        DateTo = JsonConverters.fromJson(json['DateTo'],'DateTime',context!);
        Agent = json['Agent'];
        GeneralComments = json['GeneralComments'];
        DeliveryMethodId = json['DeliveryMethodId'];
        AccountId = json['AccountId'];
        RequestedTermsType = json['RequestedTermsType'];
        CreditTermDays = json['CreditTermDays'];
        VesselId = json['VesselId'];
        VesselName = json['VesselName'];
        IMONumber = json['IMONumber'];
        IMONumberOrMMSI = json['IMONumberOrMMSI'];
        GetProducts = JsonConverters.fromJson(json['GetProducts'],'List<GetProductsViewModel>',context!);
        GetVersions = JsonConverters.fromJson(json['GetVersions'],'List<GetVersionsViewModel>',context!);
        GetGrades = JsonConverters.fromJson(json['GetGrades'],'List<GetGradesViewModel>',context!);
        GetUnits = JsonConverters.fromJson(json['GetUnits'],'List<GetUnitsViewModel>',context!);
        GetDeliveryMethods = JsonConverters.fromJson(json['GetDeliveryMethods'],'List<GetDeliveryMethodsViewModel>',context!);
        GetEntityAccounts = JsonConverters.fromJson(json['GetEntityAccounts'],'List<EntityAccountsViewModel>',context!);
        EnquiryGradesEdit = JsonConverters.fromJson(json['EnquiryGradesEdit'],'List<EnquiryGradesEditViewModel>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Guid': Guid,
        'DateFrom': JsonConverters.toJson(DateFrom,'DateTime',context!),
        'DateTo': JsonConverters.toJson(DateTo,'DateTime',context!),
        'Agent': Agent,
        'GeneralComments': GeneralComments,
        'DeliveryMethodId': DeliveryMethodId,
        'AccountId': AccountId,
        'RequestedTermsType': RequestedTermsType,
        'CreditTermDays': CreditTermDays,
        'VesselId': VesselId,
        'VesselName': VesselName,
        'IMONumber': IMONumber,
        'IMONumberOrMMSI': IMONumberOrMMSI,
        'GetProducts': JsonConverters.toJson(GetProducts,'List<GetProductsViewModel>',context!),
        'GetVersions': JsonConverters.toJson(GetVersions,'List<GetVersionsViewModel>',context!),
        'GetGrades': JsonConverters.toJson(GetGrades,'List<GetGradesViewModel>',context!),
        'GetUnits': JsonConverters.toJson(GetUnits,'List<GetUnitsViewModel>',context!),
        'GetDeliveryMethods': JsonConverters.toJson(GetDeliveryMethods,'List<GetDeliveryMethodsViewModel>',context!),
        'GetEntityAccounts': JsonConverters.toJson(GetEntityAccounts,'List<EntityAccountsViewModel>',context!),
        'EnquiryGradesEdit': JsonConverters.toJson(EnquiryGradesEdit,'List<EnquiryGradesEditViewModel>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'internal.thebunkerbridge.com', types: <String, TypeInfo> {
    'EnquiryEdit': TypeInfo(TypeOf.Class, create:() => EnquiryEdit()),
    'GetProductsViewModel': TypeInfo(TypeOf.Class, create:() => GetProductsViewModel()),
    'GetVersionsViewModel': TypeInfo(TypeOf.Class, create:() => GetVersionsViewModel()),
    'GetGradesViewModel': TypeInfo(TypeOf.Class, create:() => GetGradesViewModel()),
    'GetUnitsViewModel': TypeInfo(TypeOf.Class, create:() => GetUnitsViewModel()),
    'GetDeliveryMethodsViewModel': TypeInfo(TypeOf.Class, create:() => GetDeliveryMethodsViewModel()),
    'EntityAccountsViewModel': TypeInfo(TypeOf.Class, create:() => EntityAccountsViewModel()),
    'EnquiryGradesEditViewModel': TypeInfo(TypeOf.Class, create:() => EnquiryGradesEditViewModel()),
    'APIEditEnquiryViewModel': TypeInfo(TypeOf.Class, create:() => APIEditEnquiryViewModel()),
    'List<GetProductsViewModel>': TypeInfo(TypeOf.Class, create:() => <GetProductsViewModel>[]),
    'List<GetVersionsViewModel>': TypeInfo(TypeOf.Class, create:() => <GetVersionsViewModel>[]),
    'List<GetGradesViewModel>': TypeInfo(TypeOf.Class, create:() => <GetGradesViewModel>[]),
    'List<GetUnitsViewModel>': TypeInfo(TypeOf.Class, create:() => <GetUnitsViewModel>[]),
    'List<GetDeliveryMethodsViewModel>': TypeInfo(TypeOf.Class, create:() => <GetDeliveryMethodsViewModel>[]),
    'List<EntityAccountsViewModel>': TypeInfo(TypeOf.Class, create:() => <EntityAccountsViewModel>[]),
    'List<EnquiryGradesEditViewModel>': TypeInfo(TypeOf.Class, create:() => <EnquiryGradesEditViewModel>[]),
});

Dart EnquiryEdit 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

HTTP + JSON

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

GET /Enquiries/Edit HTTP/1.1 
Host: internal.thebunkerbridge.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Id":0,"Guid":"00000000000000000000000000000000","DateFrom":"0001-01-01T00:00:00.0000000","DateTo":"0001-01-01T00:00:00.0000000","Agent":"String","GeneralComments":"String","DeliveryMethodId":0,"AccountId":0,"RequestedTermsType":"String","CreditTermDays":0,"VesselId":0,"VesselName":"String","IMONumber":0,"IMONumberOrMMSI":"String","GetProducts":[{"Id":0,"Index":0,"Name":"String","Deleted":false,"ETSMultiplication":0}],"GetVersions":[{"Id":0,"Index":0,"Name":"String","Deleted":false}],"GetGrades":[{"Id":0,"Index":0,"Name":"String","Deleted":false}],"GetUnits":[{"Id":0,"Code":"String","Deleted":false}],"GetDeliveryMethods":[{"Id":0,"Name":"String"}],"GetEntityAccounts":[{"Id":0,"Type":"String","Name":"String","LinkedVesselId":0}],"EnquiryGradesEdit":[{"Id":0,"Deleted":false,"ProductId":0,"VersionId":0,"GradeId":0,"SpecificationComments":"String","VolumeFrom":0,"VolumeTo":0,"UnitId":0}]}