shrimpy-node-temp
Version:
Client for the Shrimpy API
35 lines • 1.84 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var nullable_date_dto_converter_1 = require("./nullable-date-dto-converter");
var nullable_decimal_dto_converter_1 = require("./nullable-decimal-dto-converter");
var TickerDtoConverter = /** @class */ (function () {
function TickerDtoConverter() {
this._nullableDecimalDtoConverter = new nullable_decimal_dto_converter_1.NullableDecimalDtoConverter();
this._nullableDateDtoConverter = new nullable_date_dto_converter_1.NullableDateDtoConverter();
}
TickerDtoConverter.prototype.convertFromDto = function (dto) {
var result = {
lastUpdated: this._nullableDateDtoConverter.convertFromDto(dto.lastUpdated),
name: dto.name,
percentChange24hUsd: this._nullableDecimalDtoConverter.convertFromDto(dto.percentChange24hUsd),
priceBtc: this._nullableDecimalDtoConverter.convertFromDto(dto.priceBtc),
priceUsd: this._nullableDecimalDtoConverter.convertFromDto(dto.priceUsd),
symbol: dto.symbol
};
return result;
};
TickerDtoConverter.prototype.convertToDto = function (model) {
var result = {
lastUpdated: this._nullableDateDtoConverter.convertToDto(model.lastUpdated),
name: model.name,
percentChange24hUsd: this._nullableDecimalDtoConverter.convertToDto(model.percentChange24hUsd),
priceBtc: this._nullableDecimalDtoConverter.convertToDto(model.priceBtc),
priceUsd: this._nullableDecimalDtoConverter.convertToDto(model.priceUsd),
symbol: model.symbol
};
return result;
};
return TickerDtoConverter;
}());
exports.TickerDtoConverter = TickerDtoConverter;
//# sourceMappingURL=ticker-dto-converter.js.map