import { computed } from '@ember/object';
import { inject as service } from '@ember/service';

import AjaxService from 'ember-ajax/services/ajax';

export default AjaxService.extend({
  session: service(),

  headers: computed('session.data.authenticated.access_token', function () {
    let headers = {};
    let authToken = this.get('session.data.authenticated.access_token');
    if (authToken) {
      headers['Authorization'] = `Bearer ${authToken}`;
    }
    return headers;
  }),

  options(url, options = {}) {
    if (options.json) {
      options.contentType = 'application/json';
      options.data = JSON.stringify(options.json);
      delete options.json;
    }

    return this._super(url, options);
  },
});

@@ -160,63 +160,60 @@
 ult 
-AjaxService.extend(%7B%0A  session: service(),%0A%0A  headers: 
+class extends AjaxService %7B%0A  @service session;%0A%0A  @
 comp
@@ -262,19 +262,23 @@
 ken'
-, function 
+)%0A  get headers
 () %7B
@@ -483,10 +483,8 @@
 %0A  %7D
-),
 %0A%0A  
@@ -684,19 +684,21 @@
 urn 
-this._super
+super.options
 (url
@@ -716,10 +716,7 @@
 %0A  %7D
-,
 %0A%7D
-);
 %0A

Convert to ES6 class