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

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ETSViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
  <CanPurchaseEUA>false</CanPurchaseEUA>
  <GetETSOrderListNewIncludingForwards>
    <GetETSOrderListNewIncludingForwardsViewModel>
      <Company>String</Company>
      <CurrentValue>0</CurrentValue>
      <EUAMarkToMarket>0</EUAMarkToMarket>
      <ForwardMonth>String</ForwardMonth>
      <Id>0</Id>
      <IsForward>false</IsForward>
      <IsThirdParty>false</IsThirdParty>
      <MonthStartingDate>0001-01-01T00:00:00</MonthStartingDate>
      <OrderByImageGuid>00000000-0000-0000-0000-000000000000</OrderByImageGuid>
      <OrderByName>String</OrderByName>
      <OrderGuid>00000000-0000-0000-0000-000000000000</OrderGuid>
      <OrderPlacedDateTime>String</OrderPlacedDateTime>
      <OrderVesselCount>0</OrderVesselCount>
      <Quantity>0</Quantity>
      <ShowMarkToMarket>false</ShowMarkToMarket>
      <Status>String</Status>
      <ThirdPartyName>String</ThirdPartyName>
      <TotalPrice>0</TotalPrice>
      <UnitPrice>0</UnitPrice>
    </GetETSOrderListNewIncludingForwardsViewModel>
  </GetETSOrderListNewIncludingForwards>
  <GetETSPriceDayChange>
    <ClosePrice>0</ClosePrice>
    <EURChange>0</EURChange>
    <Id>0</Id>
    <IsRegistered>String</IsRegistered>
    <LabelDescription>String</LabelDescription>
    <MarketCountdownLabel>String</MarketCountdownLabel>
    <MinutesRemaining>0</MinutesRemaining>
    <PercentageChange>0</PercentageChange>
    <PreviousClose>0</PreviousClose>
    <ShowGetQuoteButton>false</ShowGetQuoteButton>
    <ShowPriceSection>false</ShowPriceSection>
    <Today>0001-01-01T00:00:00</Today>
  </GetETSPriceDayChange>
  <GetETSRegistrationStatus>
    <AppliedBy>String</AppliedBy>
    <Status>String</Status>
  </GetETSRegistrationStatus>
</ETSViewModel>