2022-03-04 12:18:45 +03:00
|
|
|
import ApplicationSerializer from './application';
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
export default class TierSerializer extends ApplicationSerializer {
|
2022-03-04 12:18:45 +03:00
|
|
|
serialize() {
|
|
|
|
let json = super.serialize(...arguments);
|
|
|
|
|
2022-05-16 21:51:49 +03:00
|
|
|
if (json?.monthly_price) {
|
|
|
|
json.monthly_price = Math.round(json.monthly_price);
|
2022-03-04 12:18:45 +03:00
|
|
|
}
|
|
|
|
|
2022-05-16 21:51:49 +03:00
|
|
|
if (json?.yearly_price) {
|
|
|
|
json.yearly_price = Math.round(json.yearly_price);
|
2022-03-04 12:18:45 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
return json;
|
|
|
|
}
|
|
|
|
}
|