Bridge

<back to all web services

EnquiryEditResult

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

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 EnquiryEditResult 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? IMONumberOrMMSI;
    List<GetProductsViewModel>? GetProducts;
    List<GetVersionsViewModel>? GetVersions;
    List<GetGradesViewModel>? GetGrades;
    List<GetUnitsViewModel>? GetUnits;
    List<GetDeliveryMethodsViewModel>? GetDeliveryMethods;
    List<EntityAccountsViewModel>? GetEntityAccounts;
    List<EnquiryGradesEditViewModel>? EnquiryGradesEdit;

    EnquiryEditResult({this.Id,this.Guid,this.DateFrom,this.DateTo,this.Agent,this.GeneralComments,this.DeliveryMethodId,this.AccountId,this.RequestedTermsType,this.CreditTermDays,this.VesselId,this.IMONumberOrMMSI,this.GetProducts,this.GetVersions,this.GetGrades,this.GetUnits,this.GetDeliveryMethods,this.GetEntityAccounts,this.EnquiryGradesEdit});
    EnquiryEditResult.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'];
        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,
        '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() => "EnquiryEditResult";
    TypeContext? context = _ctx;
}

enum SavingResultStatus
{
    Success,
    Error,
}

class EditEnquiryResultViewModel implements IConvertible
{
    SavingResultStatus? Status;
    String? MessageFromBridge;

    EditEnquiryResultViewModel({this.Status,this.MessageFromBridge});
    EditEnquiryResultViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'internal.thebunkerbridge.com', types: <String, TypeInfo> {
    '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()),
    'EnquiryEditResult': TypeInfo(TypeOf.Class, create:() => EnquiryEditResult()),
    '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>[]),
    'SavingResultStatus': TypeInfo(TypeOf.Enum, enumValues:SavingResultStatus.values),
    'EditEnquiryResultViewModel': TypeInfo(TypeOf.Class, create:() => EditEnquiryResultViewModel()),
});

Dart EnquiryEditResult 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 /Enquiries/Edit/Result HTTP/1.1 
Host: internal.thebunkerbridge.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<EnquiryEditResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bridge.Private.Api.DTO">
  <AccountId>0</AccountId>
  <Agent>String</Agent>
  <CreditTermDays>0</CreditTermDays>
  <DateFrom>0001-01-01T00:00:00</DateFrom>
  <DateTo>0001-01-01T00:00:00</DateTo>
  <DeliveryMethodId>0</DeliveryMethodId>
  <EnquiryGradesEdit xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
    <d2p1:EnquiryGradesEditViewModel>
      <d2p1:Deleted>false</d2p1:Deleted>
      <d2p1:GradeId>0</d2p1:GradeId>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:ProductId>0</d2p1:ProductId>
      <d2p1:SpecificationComments>String</d2p1:SpecificationComments>
      <d2p1:UnitId>0</d2p1:UnitId>
      <d2p1:VersionId>0</d2p1:VersionId>
      <d2p1:VolumeFrom>0</d2p1:VolumeFrom>
      <d2p1:VolumeTo>0</d2p1:VolumeTo>
    </d2p1:EnquiryGradesEditViewModel>
  </EnquiryGradesEdit>
  <GeneralComments>String</GeneralComments>
  <GetDeliveryMethods xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
    <d2p1:GetDeliveryMethodsViewModel>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Name>String</d2p1:Name>
    </d2p1:GetDeliveryMethodsViewModel>
  </GetDeliveryMethods>
  <GetEntityAccounts xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
    <d2p1:EntityAccountsViewModel>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:LinkedVesselId>0</d2p1:LinkedVesselId>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:Type>String</d2p1:Type>
    </d2p1:EntityAccountsViewModel>
  </GetEntityAccounts>
  <GetGrades xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
    <d2p1:GetGradesViewModel>
      <d2p1:Deleted>false</d2p1:Deleted>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Index>0</d2p1:Index>
      <d2p1:Name>String</d2p1:Name>
    </d2p1:GetGradesViewModel>
  </GetGrades>
  <GetProducts xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
    <d2p1:GetProductsViewModel>
      <d2p1:Deleted>false</d2p1:Deleted>
      <d2p1:ETSMultiplication>0</d2p1:ETSMultiplication>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Index>0</d2p1:Index>
      <d2p1:Name>String</d2p1:Name>
    </d2p1:GetProductsViewModel>
  </GetProducts>
  <GetUnits xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
    <d2p1:GetUnitsViewModel>
      <d2p1:Code>String</d2p1:Code>
      <d2p1:Deleted>false</d2p1:Deleted>
      <d2p1:Id>0</d2p1:Id>
    </d2p1:GetUnitsViewModel>
  </GetUnits>
  <GetVersions xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
    <d2p1:GetVersionsViewModel>
      <d2p1:Deleted>false</d2p1:Deleted>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Index>0</d2p1:Index>
      <d2p1:Name>String</d2p1:Name>
    </d2p1:GetVersionsViewModel>
  </GetVersions>
  <Guid>00000000-0000-0000-0000-000000000000</Guid>
  <IMONumberOrMMSI>String</IMONumberOrMMSI>
  <Id>0</Id>
  <RequestedTermsType>String</RequestedTermsType>
  <VesselId>0</VesselId>
</EnquiryEditResult>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<EditEnquiryResultViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
  <MessageFromBridge>String</MessageFromBridge>
  <Status>Success</Status>
</EditEnquiryResultViewModel>