2022-10-12 01:42:45 +00:00
|
|
|
class Price {
|
|
|
|
Price({
|
|
|
|
required this.value,
|
|
|
|
required this.currency,
|
|
|
|
});
|
|
|
|
|
2023-06-22 19:02:49 +00:00
|
|
|
final double value;
|
|
|
|
final Currency currency;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum CurrencyType {
|
|
|
|
eur,
|
|
|
|
usd,
|
2024-04-12 12:13:30 +00:00
|
|
|
unknown,
|
2023-06-22 19:02:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Currency {
|
|
|
|
Currency({
|
|
|
|
required this.type,
|
|
|
|
required this.shortcode,
|
|
|
|
this.fontcode,
|
|
|
|
this.symbol,
|
|
|
|
});
|
|
|
|
|
|
|
|
factory Currency.fromType(final CurrencyType type) {
|
|
|
|
switch (type) {
|
|
|
|
case CurrencyType.eur:
|
|
|
|
return Currency(
|
|
|
|
type: type,
|
|
|
|
shortcode: 'EUR',
|
|
|
|
fontcode: 'euro',
|
|
|
|
symbol: '€',
|
|
|
|
);
|
|
|
|
case CurrencyType.usd:
|
|
|
|
return Currency(
|
|
|
|
type: type,
|
|
|
|
shortcode: 'USD',
|
|
|
|
fontcode: 'attach_money',
|
|
|
|
symbol: '\$',
|
|
|
|
);
|
|
|
|
default:
|
|
|
|
return Currency(
|
|
|
|
type: type,
|
|
|
|
shortcode: '?',
|
|
|
|
fontcode: 'payments',
|
|
|
|
symbol: '?',
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
final CurrencyType type;
|
|
|
|
final String shortcode;
|
|
|
|
final String? fontcode;
|
|
|
|
final String? symbol;
|
2022-10-12 01:42:45 +00:00
|
|
|
}
|
2023-08-07 10:51:47 +00:00
|
|
|
|
|
|
|
class AdditionalPricing {
|
|
|
|
AdditionalPricing({
|
|
|
|
required this.perVolumeGb,
|
|
|
|
required this.perPublicIpv4,
|
|
|
|
});
|
|
|
|
final Price perVolumeGb;
|
|
|
|
final Price perPublicIpv4;
|
|
|
|
}
|