Edit
Update a credit grant
client.v1.creditGrants.edit(CreditGrantEditParamsbody, RequestOptionsoptions?): dataIDCreditGrantEditResponse
post/v1/credits/editGrant
Edit an existing credit grant
Parameters
bodyidstringcredit_grant_typestringexpires_atstringnamestringCreditGrantEditParams
Returns
CreditGrantEditResponse
import Metronome from '@metronome/sdk';
const client = new Metronome({
bearerToken: 'My Bearer Token',
});
const response = await client.v1.creditGrants.edit({
id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
expires_at: '2022-04-01T00:00:00Z',
name: 'Acme Corp Promotional Credit Grant',
});
console.log(response.data);
200 Example
{
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}
}