| 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>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<ETSPlaceOrderSubmit xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bridge.Private.Api.DTO">
<APIToUse>String</APIToUse>
<AitherSettlementUUID>String</AitherSettlementUUID>
<ArrangementFee>0</ArrangementFee>
<ArrangementFeeDescription>String</ArrangementFeeDescription>
<CanPurchaseEUA>false</CanPurchaseEUA>
<CompanyName>String</CompanyName>
<ETSOrderInfoTextFinanced>String</ETSOrderInfoTextFinanced>
<ETSOrderInfoTextNonFinanced>String</ETSOrderInfoTextNonFinanced>
<EUAPrice>0</EUAPrice>
<EmailAddress>String</EmailAddress>
<ExternalFeePerTicket>0</ExternalFeePerTicket>
<FinancingPrice>0</FinancingPrice>
<FinancingStatus>String</FinancingStatus>
<FullName>String</FullName>
<GetETSRegistrationStatus xmlns:d2p1="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
<d2p1:AppliedBy>String</d2p1:AppliedBy>
<d2p1:Status>String</d2p1:Status>
</GetETSRegistrationStatus>
<IoIId>String</IoIId>
<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>
<OfferIoi>String</OfferIoi>
<OrderType>String</OrderType>
<OriginalQuantity>0</OriginalQuantity>
<OurCommissionForOrder>0</OurCommissionForOrder>
<PaymentType>String</PaymentType>
<Price>0</Price>
<Quantity>0</Quantity>
<QuoteGuid>00000000-0000-0000-0000-000000000000</QuoteGuid>
<SpotAdditionalMargin>0</SpotAdditionalMargin>
<ThirdParty>false</ThirdParty>
<ThirdPartyName>String</ThirdPartyName>
<UnitCostPrice>0</UnitCostPrice>
<UnitPrice>0</UnitPrice>
</ETSPlaceOrderSubmit>
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>