diff --git a/src/Particle.js b/src/Particle.js index 2d8fcac..4f516a7 100644 --- a/src/Particle.js +++ b/src/Particle.js @@ -2485,17 +2485,17 @@ class Particle { * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account. * @param {string} options.ledgerName Ledger name. * @param {string} options.scopeValue Scope value. - * @param {object} options.data The data to set to the instance + * @param {object} options.instance The instance with the data * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. * @param {Object} [options.context] Request context. * * @returns {Promise} A promise that resolves to the updated ledger instance data. */ - setLedgerInstance({ auth, org, ledgerName, scopeValue, data, headers, context }) { + setLedgerInstance({ auth, org, ledgerName, scopeValue, instance, headers, context }) { return this.put({ uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances/${scopeValue}`), auth, - data: { data }, + data: { instance }, headers, context }); diff --git a/test/Particle.spec.js b/test/Particle.spec.js index 07dbbd4..ae324da 100644 --- a/test/Particle.spec.js +++ b/test/Particle.spec.js @@ -142,7 +142,10 @@ const props = { description: 'my ledger', direction: 'Downstream' }, - scopeValue: '1234' + scopeValue: '1234', + instance: { + property: 'yes' + } }; const product = 'ze-product-v1'; @@ -2869,8 +2872,8 @@ describe('ParticleAPI', () => { uri: `/v1/orgs/${org}/ledgers/${props.ledgerName}/instances/${props.scopeValue}`, auth: props.auth, data: { - data: { - sentient: true + instance: { + property: 'yes' } } });