Skip to content

Commit fadd232

Browse files
committed
test: custom_headers webhook
1 parent faac9d4 commit fadd232

File tree

9 files changed

+92
-74
lines changed

9 files changed

+92
-74
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Next Release
44

5-
- Fixes the wrapping of params on the request for the update webhook function
5+
- Adds `secret` and `custom_headers` properties to Typescript definitions of a Webhook
66
- Bumps dependencies
77

88
## v7.5.5 (2025-02-06)

examples

Submodule examples updated 170 files

src/services/webhook_service.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,11 @@ export default (easypostClient) =>
3232
*/
3333
static async update(id, params) {
3434
const url = `webhooks/${id}`;
35-
const wrappedParams = {
36-
webhook: params,
37-
};
3835

3936
try {
40-
const response = await easypostClient._patch(url, wrappedParams);
37+
const response = await easypostClient._patch(url, params);
4138

42-
return this._convertToEasyPostObject(response.body, wrappedParams);
39+
return this._convertToEasyPostObject(response.body, params);
4340
} catch (e) {
4441
return Promise.reject(e);
4542
}

test/cassettes/Webhook-Service_1674309497/creates-a-webhook_1900246512/recording.har

Lines changed: 31 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)