| POST | /ETS/Price |
|---|
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 ETSGetPrice implements IConvertible
{
String? OrderType;
int? Quantity;
bool? InsertQuote;
List<ETSLinkedVesselsViewModel>? LinkedVessels;
ETSGetPrice({this.OrderType,this.Quantity,this.InsertQuote,this.LinkedVessels});
ETSGetPrice.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
OrderType = json['OrderType'];
Quantity = json['Quantity'];
InsertQuote = json['InsertQuote'];
LinkedVessels = JsonConverters.fromJson(json['LinkedVessels'],'List<ETSLinkedVesselsViewModel>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'OrderType': OrderType,
'Quantity': Quantity,
'InsertQuote': InsertQuote,
'LinkedVessels': JsonConverters.toJson(LinkedVessels,'List<ETSLinkedVesselsViewModel>',context!)
};
getTypeName() => "ETSGetPrice";
TypeContext? context = _ctx;
}
class GetETSForwardPricesForEntityContactSimpleViewModel implements IConvertible
{
int? MonthNumber;
DateTime? StartingDate;
String? DateForGreyEpoch;
String? DateForUserInterface;
int? Over1000;
double? OurCommissionForOrder;
double? ExternalFeePerTicket;
double? ServiceFeeValue;
String? ServiceFeeDescription;
double? MarketPrice;
double? UnitCostPrice;
String? APIToUse;
double? SpotAdditionalMargin;
String? UserContactNumber;
String? AitherSettlementUUID;
GetETSForwardPricesForEntityContactSimpleViewModel({this.MonthNumber,this.StartingDate,this.DateForGreyEpoch,this.DateForUserInterface,this.Over1000,this.OurCommissionForOrder,this.ExternalFeePerTicket,this.ServiceFeeValue,this.ServiceFeeDescription,this.MarketPrice,this.UnitCostPrice,this.APIToUse,this.SpotAdditionalMargin,this.UserContactNumber,this.AitherSettlementUUID});
GetETSForwardPricesForEntityContactSimpleViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
MonthNumber = json['MonthNumber'];
StartingDate = JsonConverters.fromJson(json['StartingDate'],'DateTime',context!);
DateForGreyEpoch = json['DateForGreyEpoch'];
DateForUserInterface = json['DateForUserInterface'];
Over1000 = json['Over1000'];
OurCommissionForOrder = JsonConverters.toDouble(json['OurCommissionForOrder']);
ExternalFeePerTicket = JsonConverters.toDouble(json['ExternalFeePerTicket']);
ServiceFeeValue = JsonConverters.toDouble(json['ServiceFeeValue']);
ServiceFeeDescription = json['ServiceFeeDescription'];
MarketPrice = JsonConverters.toDouble(json['MarketPrice']);
UnitCostPrice = JsonConverters.toDouble(json['UnitCostPrice']);
APIToUse = json['APIToUse'];
SpotAdditionalMargin = JsonConverters.toDouble(json['SpotAdditionalMargin']);
UserContactNumber = json['UserContactNumber'];
AitherSettlementUUID = json['AitherSettlementUUID'];
return this;
}
Map<String, dynamic> toJson() => {
'MonthNumber': MonthNumber,
'StartingDate': JsonConverters.toJson(StartingDate,'DateTime',context!),
'DateForGreyEpoch': DateForGreyEpoch,
'DateForUserInterface': DateForUserInterface,
'Over1000': Over1000,
'OurCommissionForOrder': OurCommissionForOrder,
'ExternalFeePerTicket': ExternalFeePerTicket,
'ServiceFeeValue': ServiceFeeValue,
'ServiceFeeDescription': ServiceFeeDescription,
'MarketPrice': MarketPrice,
'UnitCostPrice': UnitCostPrice,
'APIToUse': APIToUse,
'SpotAdditionalMargin': SpotAdditionalMargin,
'UserContactNumber': UserContactNumber,
'AitherSettlementUUID': AitherSettlementUUID
};
getTypeName() => "GetETSForwardPricesForEntityContactSimpleViewModel";
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 ETSPlaceOrderViewModel 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;
bool? ThirdParty;
String? ThirdPartyName;
double? ExternalFeePerTicket;
double? OurCommissionForOrder;
double? EUAPrice;
double? RawPrice;
bool? RegenerateQuote;
String? GetETSMarketHoursMessage;
bool? IsBridgeClient;
String? APIToUse;
String? IoiId;
String? OfferIoi;
DateTime? IoiExpiresAt;
double? SpotAdditionalMargin;
String? AitherSettlementUUID;
List<SelectListItem>? GetVessels;
List<ETSLinkedVesselsViewModel>? LinkedVessels;
List<GetETSForwardPricesForEntityContactSimpleViewModel>? GetETSForwardPricesForEntityContactSimple;
GetETSRegistrationStatusViewModel? GetETSRegistrationStatus;
ETSPlaceOrderViewModel({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.ThirdParty,this.ThirdPartyName,this.ExternalFeePerTicket,this.OurCommissionForOrder,this.EUAPrice,this.RawPrice,this.RegenerateQuote,this.GetETSMarketHoursMessage,this.IsBridgeClient,this.APIToUse,this.IoiId,this.OfferIoi,this.IoiExpiresAt,this.SpotAdditionalMargin,this.AitherSettlementUUID,this.GetVessels,this.LinkedVessels,this.GetETSForwardPricesForEntityContactSimple,this.GetETSRegistrationStatus});
ETSPlaceOrderViewModel.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'];
ThirdParty = json['ThirdParty'];
ThirdPartyName = json['ThirdPartyName'];
ExternalFeePerTicket = JsonConverters.toDouble(json['ExternalFeePerTicket']);
OurCommissionForOrder = JsonConverters.toDouble(json['OurCommissionForOrder']);
EUAPrice = JsonConverters.toDouble(json['EUAPrice']);
RawPrice = JsonConverters.toDouble(json['RawPrice']);
RegenerateQuote = json['RegenerateQuote'];
GetETSMarketHoursMessage = json['GetETSMarketHoursMessage'];
IsBridgeClient = json['IsBridgeClient'];
APIToUse = json['APIToUse'];
IoiId = json['IoiId'];
OfferIoi = json['OfferIoi'];
IoiExpiresAt = JsonConverters.fromJson(json['IoiExpiresAt'],'DateTime',context!);
SpotAdditionalMargin = JsonConverters.toDouble(json['SpotAdditionalMargin']);
AitherSettlementUUID = json['AitherSettlementUUID'];
GetVessels = JsonConverters.fromJson(json['GetVessels'],'List<SelectListItem>',context!);
LinkedVessels = JsonConverters.fromJson(json['LinkedVessels'],'List<ETSLinkedVesselsViewModel>',context!);
GetETSForwardPricesForEntityContactSimple = JsonConverters.fromJson(json['GetETSForwardPricesForEntityContactSimple'],'List<GetETSForwardPricesForEntityContactSimpleViewModel>',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,
'ThirdParty': ThirdParty,
'ThirdPartyName': ThirdPartyName,
'ExternalFeePerTicket': ExternalFeePerTicket,
'OurCommissionForOrder': OurCommissionForOrder,
'EUAPrice': EUAPrice,
'RawPrice': RawPrice,
'RegenerateQuote': RegenerateQuote,
'GetETSMarketHoursMessage': GetETSMarketHoursMessage,
'IsBridgeClient': IsBridgeClient,
'APIToUse': APIToUse,
'IoiId': IoiId,
'OfferIoi': OfferIoi,
'IoiExpiresAt': JsonConverters.toJson(IoiExpiresAt,'DateTime',context!),
'SpotAdditionalMargin': SpotAdditionalMargin,
'AitherSettlementUUID': AitherSettlementUUID,
'GetVessels': JsonConverters.toJson(GetVessels,'List<SelectListItem>',context!),
'LinkedVessels': JsonConverters.toJson(LinkedVessels,'List<ETSLinkedVesselsViewModel>',context!),
'GetETSForwardPricesForEntityContactSimple': JsonConverters.toJson(GetETSForwardPricesForEntityContactSimple,'List<GetETSForwardPricesForEntityContactSimpleViewModel>',context!),
'GetETSRegistrationStatus': JsonConverters.toJson(GetETSRegistrationStatus,'GetETSRegistrationStatusViewModel',context!)
};
getTypeName() => "ETSPlaceOrderViewModel";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'internal.thebunkerbridge.com', types: <String, TypeInfo> {
'ETSLinkedVesselsViewModel': TypeInfo(TypeOf.Class, create:() => ETSLinkedVesselsViewModel()),
'ETSGetPrice': TypeInfo(TypeOf.Class, create:() => ETSGetPrice()),
'List<ETSLinkedVesselsViewModel>': TypeInfo(TypeOf.Class, create:() => <ETSLinkedVesselsViewModel>[]),
'GetETSForwardPricesForEntityContactSimpleViewModel': TypeInfo(TypeOf.Class, create:() => GetETSForwardPricesForEntityContactSimpleViewModel()),
'GetETSRegistrationStatusViewModel': TypeInfo(TypeOf.Class, create:() => GetETSRegistrationStatusViewModel()),
'ETSPlaceOrderViewModel': TypeInfo(TypeOf.Class, create:() => ETSPlaceOrderViewModel()),
'List<SelectListItem>': TypeInfo(TypeOf.Class, create:() => <SelectListItem>[]),
'SelectListItem': TypeInfo(TypeOf.Class, create:() => SelectListItem()),
'List<GetETSForwardPricesForEntityContactSimpleViewModel>': TypeInfo(TypeOf.Class, create:() => <GetETSForwardPricesForEntityContactSimpleViewModel>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /ETS/Price HTTP/1.1
Host: internal.thebunkerbridge.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"OrderType":"String","Quantity":0,"InsertQuote":false,"LinkedVessels":[{"Deleted":false,"VesselId":0,"Quantity":0,"MohaAccount":"String","IsQuote":false}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
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,"ThirdParty":false,"ThirdPartyName":"String","ExternalFeePerTicket":0,"OurCommissionForOrder":0,"EUAPrice":0,"RawPrice":0,"RegenerateQuote":false,"GetETSMarketHoursMessage":"String","IsBridgeClient":false,"APIToUse":"String","IoiId":"String","OfferIoi":"String","IoiExpiresAt":"0001-01-01T00:00:00.0000000","SpotAdditionalMargin":0,"AitherSettlementUUID":"String","GetVessels":[{"Disabled":false,"Group":{"Disabled":false,"Name":"String"},"Selected":false,"Text":"String","Value":"String"}],"LinkedVessels":[{"Deleted":false,"VesselId":0,"Quantity":0,"MohaAccount":"String","IsQuote":false}],"GetETSForwardPricesForEntityContactSimple":[{"MonthNumber":0,"StartingDate":"0001-01-01T00:00:00.0000000","DateForGreyEpoch":"String","DateForUserInterface":"String","Over1000":0,"OurCommissionForOrder":0,"ExternalFeePerTicket":0,"ServiceFeeValue":0,"ServiceFeeDescription":"String","MarketPrice":0,"UnitCostPrice":0,"APIToUse":"String","SpotAdditionalMargin":0,"UserContactNumber":"String","AitherSettlementUUID":"String"}],"GetETSRegistrationStatus":{"Status":"String","AppliedBy":"String"}}