Bridge

<back to all web services

ETSPlaceOrderSubmit

ETS
The following routes are available for this service:
POST/ETS/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 ETSPlaceOrderSubmit implements IConvertible
{
    String? OrderType;
    String? QuoteGuid;
    double? UnitPrice;
    double? Price;
    double? FinancingPrice;
    String? FinancingStatus;
    double? ArrangementFee;
    String? ArrangementFeeDescription;
    String? ETSOrderInfoTextNonFinanced;
    String? ETSOrderInfoTextFinanced;
    String? PaymentType;
    int? Quantity;
    int? OriginalQuantity;
    String? CompanyName;
    String? FullName;
    String? EmailAddress;
    bool? CanPurchaseEUA;
    double? ExternalFeePerTicket;
    double? OurCommissionForOrder;
    double? EUAPrice;
    double? UnitCostPrice;
    bool? ThirdParty;
    String? ThirdPartyName;
    String? APIToUse;
    String? IoIId;
    String? OfferIoi;
    double? SpotAdditionalMargin;
    String? AitherSettlementUUID;
    List<ETSLinkedVesselsViewModel>? LinkedVessels;
    GetETSRegistrationStatusViewModel? GetETSRegistrationStatus;

    ETSPlaceOrderSubmit({this.OrderType,this.QuoteGuid,this.UnitPrice,this.Price,this.FinancingPrice,this.FinancingStatus,this.ArrangementFee,this.ArrangementFeeDescription,this.ETSOrderInfoTextNonFinanced,this.ETSOrderInfoTextFinanced,this.PaymentType,this.Quantity,this.OriginalQuantity,this.CompanyName,this.FullName,this.EmailAddress,this.CanPurchaseEUA,this.ExternalFeePerTicket,this.OurCommissionForOrder,this.EUAPrice,this.UnitCostPrice,this.ThirdParty,this.ThirdPartyName,this.APIToUse,this.IoIId,this.OfferIoi,this.SpotAdditionalMargin,this.AitherSettlementUUID,this.LinkedVessels,this.GetETSRegistrationStatus});
    ETSPlaceOrderSubmit.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        OrderType = json['OrderType'];
        QuoteGuid = json['QuoteGuid'];
        UnitPrice = JsonConverters.toDouble(json['UnitPrice']);
        Price = JsonConverters.toDouble(json['Price']);
        FinancingPrice = JsonConverters.toDouble(json['FinancingPrice']);
        FinancingStatus = json['FinancingStatus'];
        ArrangementFee = JsonConverters.toDouble(json['ArrangementFee']);
        ArrangementFeeDescription = json['ArrangementFeeDescription'];
        ETSOrderInfoTextNonFinanced = json['ETSOrderInfoTextNonFinanced'];
        ETSOrderInfoTextFinanced = json['ETSOrderInfoTextFinanced'];
        PaymentType = json['PaymentType'];
        Quantity = json['Quantity'];
        OriginalQuantity = json['OriginalQuantity'];
        CompanyName = json['CompanyName'];
        FullName = json['FullName'];
        EmailAddress = json['EmailAddress'];
        CanPurchaseEUA = json['CanPurchaseEUA'];
        ExternalFeePerTicket = JsonConverters.toDouble(json['ExternalFeePerTicket']);
        OurCommissionForOrder = JsonConverters.toDouble(json['OurCommissionForOrder']);
        EUAPrice = JsonConverters.toDouble(json['EUAPrice']);
        UnitCostPrice = JsonConverters.toDouble(json['UnitCostPrice']);
        ThirdParty = json['ThirdParty'];
        ThirdPartyName = json['ThirdPartyName'];
        APIToUse = json['APIToUse'];
        IoIId = json['IoIId'];
        OfferIoi = json['OfferIoi'];
        SpotAdditionalMargin = JsonConverters.toDouble(json['SpotAdditionalMargin']);
        AitherSettlementUUID = json['AitherSettlementUUID'];
        LinkedVessels = JsonConverters.fromJson(json['LinkedVessels'],'List<ETSLinkedVesselsViewModel>',context!);
        GetETSRegistrationStatus = JsonConverters.fromJson(json['GetETSRegistrationStatus'],'GetETSRegistrationStatusViewModel',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'OrderType': OrderType,
        'QuoteGuid': QuoteGuid,
        'UnitPrice': UnitPrice,
        'Price': Price,
        'FinancingPrice': FinancingPrice,
        'FinancingStatus': FinancingStatus,
        'ArrangementFee': ArrangementFee,
        'ArrangementFeeDescription': ArrangementFeeDescription,
        'ETSOrderInfoTextNonFinanced': ETSOrderInfoTextNonFinanced,
        'ETSOrderInfoTextFinanced': ETSOrderInfoTextFinanced,
        'PaymentType': PaymentType,
        'Quantity': Quantity,
        'OriginalQuantity': OriginalQuantity,
        'CompanyName': CompanyName,
        'FullName': FullName,
        'EmailAddress': EmailAddress,
        'CanPurchaseEUA': CanPurchaseEUA,
        'ExternalFeePerTicket': ExternalFeePerTicket,
        'OurCommissionForOrder': OurCommissionForOrder,
        'EUAPrice': EUAPrice,
        'UnitCostPrice': UnitCostPrice,
        'ThirdParty': ThirdParty,
        'ThirdPartyName': ThirdPartyName,
        'APIToUse': APIToUse,
        'IoIId': IoIId,
        'OfferIoi': OfferIoi,
        'SpotAdditionalMargin': SpotAdditionalMargin,
        'AitherSettlementUUID': AitherSettlementUUID,
        'LinkedVessels': JsonConverters.toJson(LinkedVessels,'List<ETSLinkedVesselsViewModel>',context!),
        'GetETSRegistrationStatus': JsonConverters.toJson(GetETSRegistrationStatus,'GetETSRegistrationStatusViewModel',context!)
    };

    getTypeName() => "ETSPlaceOrderSubmit";
    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()),
    'ETSPlaceOrderSubmit': TypeInfo(TypeOf.Class, create:() => ETSPlaceOrderSubmit()),
    '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 ETSPlaceOrderSubmit 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.

POST /ETS/Place-Order HTTP/1.1 
Host: internal.thebunkerbridge.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"OrderType":"String","QuoteGuid":"00000000000000000000000000000000","UnitPrice":0,"Price":0,"FinancingPrice":0,"FinancingStatus":"String","ArrangementFee":0,"ArrangementFeeDescription":"String","ETSOrderInfoTextNonFinanced":"String","ETSOrderInfoTextFinanced":"String","PaymentType":"String","Quantity":0,"OriginalQuantity":0,"CompanyName":"String","FullName":"String","EmailAddress":"String","CanPurchaseEUA":false,"ExternalFeePerTicket":0,"OurCommissionForOrder":0,"EUAPrice":0,"UnitCostPrice":0,"ThirdParty":false,"ThirdPartyName":"String","APIToUse":"String","IoIId":"String","OfferIoi":"String","SpotAdditionalMargin":0,"AitherSettlementUUID":"String","LinkedVessels":[{"Deleted":false,"VesselId":0,"Quantity":0,"MohaAccount":"String","IsQuote":false}],"GetETSRegistrationStatus":{"Status":"String","AppliedBy":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

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