Bridge

<back to all web services

ETSPlaceOrderForwardSubmit

ETS
The following routes are available for this service:
POST/ETS/Forward/Place-Order
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class ETSLinkedVesselsViewModel implements IConvertible
{
    bool? Deleted;
    int? VesselId;
    int? Quantity;
    String? MohaAccount;
    bool? IsQuote;

    ETSLinkedVesselsViewModel({this.Deleted,this.VesselId,this.Quantity,this.MohaAccount,this.IsQuote});
    ETSLinkedVesselsViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Deleted = json['Deleted'];
        VesselId = json['VesselId'];
        Quantity = json['Quantity'];
        MohaAccount = json['MohaAccount'];
        IsQuote = json['IsQuote'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Deleted': Deleted,
        'VesselId': VesselId,
        'Quantity': Quantity,
        'MohaAccount': MohaAccount,
        'IsQuote': IsQuote
    };

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

class GetETSRegistrationStatusViewModel implements IConvertible
{
    String? Status;
    String? AppliedBy;

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

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

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

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

class ETSPlaceOrderForwardSubmit implements IConvertible
{
    String? QuoteGuid;
    int? Quantity;
    int? MonthNumber;
    DateTime? StartDate;
    String? InvoicedBy;
    String? SelectedForwardOption;
    bool? ThirdParty;
    String? ThirdPartyName;
    List<ETSLinkedVesselsViewModel>? LinkedVessels;
    GetETSRegistrationStatusViewModel? GetETSRegistrationStatus;

    ETSPlaceOrderForwardSubmit({this.QuoteGuid,this.Quantity,this.MonthNumber,this.StartDate,this.InvoicedBy,this.SelectedForwardOption,this.ThirdParty,this.ThirdPartyName,this.LinkedVessels,this.GetETSRegistrationStatus});
    ETSPlaceOrderForwardSubmit.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        QuoteGuid = json['QuoteGuid'];
        Quantity = json['Quantity'];
        MonthNumber = json['MonthNumber'];
        StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!);
        InvoicedBy = json['InvoicedBy'];
        SelectedForwardOption = json['SelectedForwardOption'];
        ThirdParty = json['ThirdParty'];
        ThirdPartyName = json['ThirdPartyName'];
        LinkedVessels = JsonConverters.fromJson(json['LinkedVessels'],'List<ETSLinkedVesselsViewModel>',context!);
        GetETSRegistrationStatus = JsonConverters.fromJson(json['GetETSRegistrationStatus'],'GetETSRegistrationStatusViewModel',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'QuoteGuid': QuoteGuid,
        'Quantity': Quantity,
        'MonthNumber': MonthNumber,
        'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!),
        'InvoicedBy': InvoicedBy,
        'SelectedForwardOption': SelectedForwardOption,
        'ThirdParty': ThirdParty,
        'ThirdPartyName': ThirdPartyName,
        'LinkedVessels': JsonConverters.toJson(LinkedVessels,'List<ETSLinkedVesselsViewModel>',context!),
        'GetETSRegistrationStatus': JsonConverters.toJson(GetETSRegistrationStatus,'GetETSRegistrationStatusViewModel',context!)
    };

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

enum SavingResultStatus
{
    Success,
    Error,
}

class SavingResultErrors implements IConvertible
{
    String? Error;

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

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

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

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

class SavingResult implements IConvertible
{
    int? Id;
    String? GuidId;
    SavingResultStatus? Status;
    List<SavingResultErrors>? Errors;

    SavingResult({this.Id,this.GuidId,this.Status,this.Errors});
    SavingResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'internal.thebunkerbridge.com', types: <String, TypeInfo> {
    'ETSLinkedVesselsViewModel': TypeInfo(TypeOf.Class, create:() => ETSLinkedVesselsViewModel()),
    'GetETSRegistrationStatusViewModel': TypeInfo(TypeOf.Class, create:() => GetETSRegistrationStatusViewModel()),
    'ETSPlaceOrderForwardSubmit': TypeInfo(TypeOf.Class, create:() => ETSPlaceOrderForwardSubmit()),
    'List<ETSLinkedVesselsViewModel>': TypeInfo(TypeOf.Class, create:() => <ETSLinkedVesselsViewModel>[]),
    'SavingResultStatus': TypeInfo(TypeOf.Enum, enumValues:SavingResultStatus.values),
    'SavingResultErrors': TypeInfo(TypeOf.Class, create:() => SavingResultErrors()),
    'SavingResult': TypeInfo(TypeOf.Class, create:() => SavingResult()),
    'List<SavingResultErrors>': TypeInfo(TypeOf.Class, create:() => <SavingResultErrors>[]),
});

Dart ETSPlaceOrderForwardSubmit 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 /ETS/Forward/Place-Order HTTP/1.1 
Host: internal.thebunkerbridge.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ETSPlaceOrderForwardSubmit xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bridge.Private.Api.DTO">
  <GetETSRegistrationStatus xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
    <d2p1:AppliedBy>String</d2p1:AppliedBy>
    <d2p1:Status>String</d2p1:Status>
  </GetETSRegistrationStatus>
  <InvoicedBy>String</InvoicedBy>
  <LinkedVessels xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
    <d2p1:ETSLinkedVesselsViewModel>
      <d2p1:Deleted>false</d2p1:Deleted>
      <d2p1:IsQuote>false</d2p1:IsQuote>
      <d2p1:MohaAccount>String</d2p1:MohaAccount>
      <d2p1:Quantity>0</d2p1:Quantity>
      <d2p1:VesselId>0</d2p1:VesselId>
    </d2p1:ETSLinkedVesselsViewModel>
  </LinkedVessels>
  <MonthNumber>0</MonthNumber>
  <Quantity>0</Quantity>
  <QuoteGuid>00000000-0000-0000-0000-000000000000</QuoteGuid>
  <SelectedForwardOption>String</SelectedForwardOption>
  <StartDate>0001-01-01T00:00:00</StartDate>
  <ThirdParty>false</ThirdParty>
  <ThirdPartyName>String</ThirdPartyName>
</ETSPlaceOrderForwardSubmit>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SavingResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bridge.Core.Results">
  <Errors>
    <SavingResultErrors>
      <Error>String</Error>
    </SavingResultErrors>
  </Errors>
  <GuidId>00000000-0000-0000-0000-000000000000</GuidId>
  <Id>0</Id>
  <Status>Success</Status>
</SavingResult>