Update End Date
Update the commit end date
client.v1.customers.commits.updateEndDate(CommitUpdateEndDateParamsbody, RequestOptionsoptions?): dataIDCommitUpdateEndDateResponse
post/v1/contracts/customerCommits/updateEndDate
Pull forward the end date of a prepaid commit. Use the "edit a commit" endpoint to extend the end date of a prepaid commit, or to make other edits to the commit.
Parameters
bodycommit_idstringcustomer_idstringaccess_ending_beforestringinvoices_ending_beforestringCommitUpdateEndDateParams
Returns
CommitUpdateEndDateResponse
import Metronome from '@metronome/sdk';
const client = new Metronome({
bearerToken: 'My Bearer Token',
});
const response = await client.v1.customers.commits.updateEndDate({
commit_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
access_ending_before: '2020-01-01T00:00:00.000Z',
invoices_ending_before: '2020-01-01T00:00:00.000Z',
});
console.log(response.data);
200 Example
{
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}
}