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 .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

{"QuoteGuid":"00000000000000000000000000000000","Quantity":0,"MonthNumber":0,"StartDate":"0001-01-01T00:00:00.0000000","InvoicedBy":"String","SelectedForwardOption":"String","ThirdParty":false,"ThirdPartyName":"String","LinkedVessels":[{"Deleted":false,"VesselId":0,"Quantity":0,"MohaAccount":"String","IsQuote":false}],"GetETSRegistrationStatus":{"Status":"String","AppliedBy":"String"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Id":0,"GuidId":"00000000000000000000000000000000","Status":"Success","Errors":[{"Error":"String"}]}