@radio-retail/api-client
Advanced tools
Comparing version 1.0.15 to 1.0.16
@@ -70,5 +70,10 @@ const getData = require('../utils/get-raw-data'); | ||
patchAccount(clientId, accountId, params, config = {}) { | ||
config.params = params; | ||
return instance.patch(`${baseRoute}/${clientId}/accounts/${accountId}`, config).then(getData(config.raw)); | ||
patchAccount(clientId, accountId, body, prevConfig = {}, extractNestedData = true) { | ||
const config = { | ||
headers: { | ||
'Content-Type': 'application/merge-patch+json' | ||
}, | ||
...prevConfig | ||
}; | ||
return instance.patch(`${baseRoute}/${clientId}/accounts/${accountId}`, body, config).then(getData(!extractNestedData)); | ||
}, | ||
@@ -75,0 +80,0 @@ |
{ | ||
"name": "@radio-retail/api-client", | ||
"description": "Radio Retail API client", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
11186
265