Bridge

<back to all web services

ETSCalculatorCalculate

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

class ETSCalculatorCalculate implements IConvertible
{
    int? AllowancesRequired;
    int? ProductId;
    double? VoyageFuelBurn;
    bool? BothEU;

    ETSCalculatorCalculate({this.AllowancesRequired,this.ProductId,this.VoyageFuelBurn,this.BothEU});
    ETSCalculatorCalculate.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        AllowancesRequired = json['AllowancesRequired'];
        ProductId = json['ProductId'];
        VoyageFuelBurn = JsonConverters.toDouble(json['VoyageFuelBurn']);
        BothEU = json['BothEU'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'AllowancesRequired': AllowancesRequired,
        'ProductId': ProductId,
        'VoyageFuelBurn': VoyageFuelBurn,
        'BothEU': BothEU
    };

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

class GetETSCalculationViewModel implements IConvertible
{
    int? AllowancesRequired;
    String? FormulaExplanation;

    GetETSCalculationViewModel({this.AllowancesRequired,this.FormulaExplanation});
    GetETSCalculationViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        AllowancesRequired = json['AllowancesRequired'];
        FormulaExplanation = json['FormulaExplanation'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'AllowancesRequired': AllowancesRequired,
        'FormulaExplanation': FormulaExplanation
    };

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

TypeContext _ctx = TypeContext(library: 'internal.thebunkerbridge.com', types: <String, TypeInfo> {
    'ETSCalculatorCalculate': TypeInfo(TypeOf.Class, create:() => ETSCalculatorCalculate()),
    'GetETSCalculationViewModel': TypeInfo(TypeOf.Class, create:() => GetETSCalculationViewModel()),
});

Dart ETSCalculatorCalculate DTOs

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

HTTP + CSV

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

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

{"AllowancesRequired":0,"FormulaExplanation":"String"}