shrimpy-node
Version:
Client for the Shrimpy API
33 lines • 1.73 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var decimal_dto_converter_1 = require("./decimal-dto-converter");
var nullable_decimal_dto_converter_1 = require("./nullable-decimal-dto-converter");
var AssetInsightDtoConverter = /** @class */ (function () {
function AssetInsightDtoConverter() {
this._nullableDecimalDtoConverter = new nullable_decimal_dto_converter_1.NullableDecimalDtoConverter();
this._decimalDtoConverter = new decimal_dto_converter_1.DecimalDtoConverter();
}
AssetInsightDtoConverter.prototype.convertFromDto = function (dto) {
var result = {
id: dto.id,
percent: this._decimalDtoConverter.convertFromDto(dto.percent),
change24h: this._nullableDecimalDtoConverter.convertFromDto(dto.change24h),
change7d: this._nullableDecimalDtoConverter.convertFromDto(dto.change7d),
change30d: this._nullableDecimalDtoConverter.convertFromDto(dto.change30d),
};
return result;
};
AssetInsightDtoConverter.prototype.convertToDto = function (model) {
var result = {
id: model.id,
percent: this._decimalDtoConverter.convertToDto(model.percent),
change24h: this._nullableDecimalDtoConverter.convertToDto(model.change24h),
change7d: this._nullableDecimalDtoConverter.convertToDto(model.change7d),
change30d: this._nullableDecimalDtoConverter.convertToDto(model.change30d),
};
return result;
};
return AssetInsightDtoConverter;
}());
exports.AssetInsightDtoConverter = AssetInsightDtoConverter;
//# sourceMappingURL=asset-insight-dto-converter.js.map