2022-02-19 01:36:01 +03:00
|
|
|
import BaseSerializer from './application';
|
|
|
|
import {underscore} from '@ember/string';
|
|
|
|
|
|
|
|
export default BaseSerializer.extend({
|
|
|
|
embed: true,
|
|
|
|
|
|
|
|
include(/*request*/) {
|
|
|
|
let includes = [];
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
includes.push('tierBenefits');
|
2022-02-19 01:36:01 +03:00
|
|
|
|
|
|
|
return includes;
|
|
|
|
},
|
|
|
|
|
|
|
|
keyForEmbeddedRelationship(relationshipName) {
|
2022-05-11 20:11:54 +03:00
|
|
|
if (relationshipName === 'tierBenefits') {
|
2022-02-19 01:36:01 +03:00
|
|
|
return 'benefits';
|
|
|
|
}
|
|
|
|
|
|
|
|
return underscore(relationshipName);
|
|
|
|
}
|
|
|
|
});
|