const config = require('../../../config')
const authorisedRequest = require('../../lib/authorised-request')

const Order = {
  save (token, data) {
    return authorisedRequest(token, {
      url: `${config.apiRoot}/v3/omis/order`,
      method: 'POST',
      body: data,
    })
  },

  update (token, id, data) {
    return authorisedRequest(token, {
      url: `${config.apiRoot}/v3/omis/order/${id}`,
      method: 'PATCH',
      body: data,
    })
  },

  getById (token, id) {
    return authorisedRequest(token, `${config.apiRoot}/v3/omis/order/${id}`)
  },
}

module.exports = {
  Order,
}

@@ -451,16 +451,206 @@
 )%0A  %7D,%0A%0A
+  saveSubscribers (token, id, body) %7B%0A    return authorisedRequest(token, %7B%0A      url: %60$%7Bconfig.apiRoot%7D/v3/omis/order/$%7Bid%7D/subscriber-list%60,%0A      method: 'PUT',%0A      body,%0A    %7D)%0A  %7D,%0A%0A
   getByI

Add saveSubscribers method to OMIS Order model