Bridge

<back to all web services

ETSOrders

ETS
The following routes are available for this service:
GET/ETS/Orders
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class ETSOrders implements IConvertible
{
    DateTime? DateFrom;
    DateTime? DateTo;
    int? VesselId;

    ETSOrders({this.DateFrom,this.DateTo,this.VesselId});
    ETSOrders.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DateFrom = JsonConverters.fromJson(json['DateFrom'],'DateTime',context!);
        DateTo = JsonConverters.fromJson(json['DateTo'],'DateTime',context!);
        VesselId = json['VesselId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DateFrom': JsonConverters.toJson(DateFrom,'DateTime',context!),
        'DateTo': JsonConverters.toJson(DateTo,'DateTime',context!),
        'VesselId': VesselId
    };

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

class GetETSPriceDayChangeViewModel implements IConvertible
{
    int? Id;
    DateTime? Today;
    double? PreviousClose;
    double? ClosePrice;
    double? PercentageChange;
    double? EURChange;
    String? LabelDescription;
    bool? ShowGetQuoteButton;
    bool? ShowPriceSection;
    int? MinutesRemaining;
    String? MarketCountdownLabel;
    String? IsRegistered;

    GetETSPriceDayChangeViewModel({this.Id,this.Today,this.PreviousClose,this.ClosePrice,this.PercentageChange,this.EURChange,this.LabelDescription,this.ShowGetQuoteButton,this.ShowPriceSection,this.MinutesRemaining,this.MarketCountdownLabel,this.IsRegistered});
    GetETSPriceDayChangeViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Today = JsonConverters.fromJson(json['Today'],'DateTime',context!);
        PreviousClose = JsonConverters.toDouble(json['PreviousClose']);
        ClosePrice = JsonConverters.toDouble(json['ClosePrice']);
        PercentageChange = JsonConverters.toDouble(json['PercentageChange']);
        EURChange = JsonConverters.toDouble(json['EURChange']);
        LabelDescription = json['LabelDescription'];
        ShowGetQuoteButton = json['ShowGetQuoteButton'];
        ShowPriceSection = json['ShowPriceSection'];
        MinutesRemaining = json['MinutesRemaining'];
        MarketCountdownLabel = json['MarketCountdownLabel'];
        IsRegistered = json['IsRegistered'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Today': JsonConverters.toJson(Today,'DateTime',context!),
        'PreviousClose': PreviousClose,
        'ClosePrice': ClosePrice,
        'PercentageChange': PercentageChange,
        'EURChange': EURChange,
        'LabelDescription': LabelDescription,
        'ShowGetQuoteButton': ShowGetQuoteButton,
        'ShowPriceSection': ShowPriceSection,
        'MinutesRemaining': MinutesRemaining,
        'MarketCountdownLabel': MarketCountdownLabel,
        'IsRegistered': IsRegistered
    };

    getTypeName() => "GetETSPriceDayChangeViewModel";
    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 GetETSOrderListNewIncludingForwardsViewModel implements IConvertible
{
    int? Id;
    String? OrderGuid;
    String? Company;
    String? Status;
    String? OrderByName;
    String? OrderByImageGuid;
    int? Quantity;
    String? OrderPlacedDateTime;
    int? OrderVesselCount;
    double? UnitPrice;
    double? TotalPrice;
    bool? IsForward;
    String? ForwardMonth;
    bool? IsThirdParty;
    String? ThirdPartyName;
    double? CurrentValue;
    double? EUAMarkToMarket;
    DateTime? MonthStartingDate;
    bool? ShowMarkToMarket;

    GetETSOrderListNewIncludingForwardsViewModel({this.Id,this.OrderGuid,this.Company,this.Status,this.OrderByName,this.OrderByImageGuid,this.Quantity,this.OrderPlacedDateTime,this.OrderVesselCount,this.UnitPrice,this.TotalPrice,this.IsForward,this.ForwardMonth,this.IsThirdParty,this.ThirdPartyName,this.CurrentValue,this.EUAMarkToMarket,this.MonthStartingDate,this.ShowMarkToMarket});
    GetETSOrderListNewIncludingForwardsViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        OrderGuid = json['OrderGuid'];
        Company = json['Company'];
        Status = json['Status'];
        OrderByName = json['OrderByName'];
        OrderByImageGuid = json['OrderByImageGuid'];
        Quantity = json['Quantity'];
        OrderPlacedDateTime = json['OrderPlacedDateTime'];
        OrderVesselCount = json['OrderVesselCount'];
        UnitPrice = JsonConverters.toDouble(json['UnitPrice']);
        TotalPrice = JsonConverters.toDouble(json['TotalPrice']);
        IsForward = json['IsForward'];
        ForwardMonth = json['ForwardMonth'];
        IsThirdParty = json['IsThirdParty'];
        ThirdPartyName = json['ThirdPartyName'];
        CurrentValue = JsonConverters.toDouble(json['CurrentValue']);
        EUAMarkToMarket = JsonConverters.toDouble(json['EUAMarkToMarket']);
        MonthStartingDate = JsonConverters.fromJson(json['MonthStartingDate'],'DateTime',context!);
        ShowMarkToMarket = json['ShowMarkToMarket'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'OrderGuid': OrderGuid,
        'Company': Company,
        'Status': Status,
        'OrderByName': OrderByName,
        'OrderByImageGuid': OrderByImageGuid,
        'Quantity': Quantity,
        'OrderPlacedDateTime': OrderPlacedDateTime,
        'OrderVesselCount': OrderVesselCount,
        'UnitPrice': UnitPrice,
        'TotalPrice': TotalPrice,
        'IsForward': IsForward,
        'ForwardMonth': ForwardMonth,
        'IsThirdParty': IsThirdParty,
        'ThirdPartyName': ThirdPartyName,
        'CurrentValue': CurrentValue,
        'EUAMarkToMarket': EUAMarkToMarket,
        'MonthStartingDate': JsonConverters.toJson(MonthStartingDate,'DateTime',context!),
        'ShowMarkToMarket': ShowMarkToMarket
    };

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

class ETSViewModel implements IConvertible
{
    bool? CanPurchaseEUA;
    GetETSPriceDayChangeViewModel? GetETSPriceDayChange;
    GetETSRegistrationStatusViewModel? GetETSRegistrationStatus;
    List<GetETSOrderListNewIncludingForwardsViewModel>? GetETSOrderListNewIncludingForwards;

    ETSViewModel({this.CanPurchaseEUA,this.GetETSPriceDayChange,this.GetETSRegistrationStatus,this.GetETSOrderListNewIncludingForwards});
    ETSViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CanPurchaseEUA = json['CanPurchaseEUA'];
        GetETSPriceDayChange = JsonConverters.fromJson(json['GetETSPriceDayChange'],'GetETSPriceDayChangeViewModel',context!);
        GetETSRegistrationStatus = JsonConverters.fromJson(json['GetETSRegistrationStatus'],'GetETSRegistrationStatusViewModel',context!);
        GetETSOrderListNewIncludingForwards = JsonConverters.fromJson(json['GetETSOrderListNewIncludingForwards'],'List<GetETSOrderListNewIncludingForwardsViewModel>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CanPurchaseEUA': CanPurchaseEUA,
        'GetETSPriceDayChange': JsonConverters.toJson(GetETSPriceDayChange,'GetETSPriceDayChangeViewModel',context!),
        'GetETSRegistrationStatus': JsonConverters.toJson(GetETSRegistrationStatus,'GetETSRegistrationStatusViewModel',context!),
        'GetETSOrderListNewIncludingForwards': JsonConverters.toJson(GetETSOrderListNewIncludingForwards,'List<GetETSOrderListNewIncludingForwardsViewModel>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'internal.thebunkerbridge.com', types: <String, TypeInfo> {
    'ETSOrders': TypeInfo(TypeOf.Class, create:() => ETSOrders()),
    'GetETSPriceDayChangeViewModel': TypeInfo(TypeOf.Class, create:() => GetETSPriceDayChangeViewModel()),
    'GetETSRegistrationStatusViewModel': TypeInfo(TypeOf.Class, create:() => GetETSRegistrationStatusViewModel()),
    'GetETSOrderListNewIncludingForwardsViewModel': TypeInfo(TypeOf.Class, create:() => GetETSOrderListNewIncludingForwardsViewModel()),
    'ETSViewModel': TypeInfo(TypeOf.Class, create:() => ETSViewModel()),
    'List<GetETSOrderListNewIncludingForwardsViewModel>': TypeInfo(TypeOf.Class, create:() => <GetETSOrderListNewIncludingForwardsViewModel>[]),
});

Dart ETSOrders DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /ETS/Orders HTTP/1.1 
Host: internal.thebunkerbridge.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	CanPurchaseEUA: False,
	GetETSPriceDayChange: 
	{
		Id: 0,
		Today: 0001-01-01,
		PreviousClose: 0,
		ClosePrice: 0,
		PercentageChange: 0,
		EURChange: 0,
		LabelDescription: String,
		ShowGetQuoteButton: False,
		ShowPriceSection: False,
		MinutesRemaining: 0,
		MarketCountdownLabel: String,
		IsRegistered: String
	},
	GetETSRegistrationStatus: 
	{
		Status: String,
		AppliedBy: String
	},
	GetETSOrderListNewIncludingForwards: 
	[
		{
			Id: 0,
			OrderGuid: 00000000000000000000000000000000,
			Company: String,
			Status: String,
			OrderByName: String,
			OrderByImageGuid: 00000000000000000000000000000000,
			Quantity: 0,
			OrderPlacedDateTime: String,
			OrderVesselCount: 0,
			UnitPrice: 0,
			TotalPrice: 0,
			IsForward: False,
			ForwardMonth: String,
			IsThirdParty: False,
			ThirdPartyName: String,
			CurrentValue: 0,
			EUAMarkToMarket: 0,
			MonthStartingDate: 0001-01-01,
			ShowMarkToMarket: False
		}
	]
}