File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ This SDK includes the following components:
186186- [ Opt-In Handler] ( docs/OptInHandler.md )
187187- [ Domains] ( docs/Domains.md )
188188- [ Webhooks] ( docs/Webhooks.md )
189+ - [ Account Webhooks] ( docs/AccountWebhooks.md )
189190- [ Events] ( docs/Events.md )
190191- [ Snippets] ( docs/Snippets.md )
191192- [ Subaccounts] ( docs/Subaccounts.md )
Original file line number Diff line number Diff line change 1+ Mailgun - Account Webhooks
2+ ====================
3+
4+ This is the Mailgun Ruby * Account Webhook* utilities.
5+
6+ The below assumes you've already installed the Mailgun Ruby SDK in to your
7+ project. If not, go back to the master README for instructions.
8+
9+ Usage - Account Webhooks
10+ -----------------------
11+
12+ ``` ruby
13+ # First, instantiate the Mailgun Client with your API key
14+ mg_client = Mailgun ::Client .new (' your-api-key' )
15+ hook = Mailgun ::AccountWebhooks .new (mg_client)
16+
17+ ```
18+
19+ Account Webhooks methods:
20+
21+ ``` ruby
22+ # List account-level webhooks
23+ hook.list
24+ hook.list(' id1, id2' )
25+
26+ # Create an account-level webhook
27+ hook.create(
28+ description: ' desc' ,
29+ event_types: ' accepted' ,
30+ url: ' https://the.webhook.url/'
31+ )
32+
33+ # Delete account-level webhooks
34+ hook.remove(all: true )
35+ hook.remove(' id1, id2' )
36+
37+ # Get account-level webhook by ID
38+ hook.get(' id1' )
39+
40+ # Update an account-level webhook
41+ hook.update(
42+ ' hook' ,
43+ description: ' desc' ,
44+ event_types: ' accepted' ,
45+ url: ' https://the.webhook.url/'
46+ )
47+
48+ # Delete account-level webhook by ID
49+ hook.remove_by_id(' id1' )
50+ ```
51+
52+ More Documentation
53+ ------------------
54+ See the official [ Mailgun Account Webhooks Docs] ( https://documentation.mailgun.com/docs/mailgun/api-reference/send/mailgun/account-webhooks )
55+ for more information
Original file line number Diff line number Diff line change @@ -38,5 +38,5 @@ hook.remove_all 'my.perfect.domain'
3838
3939More Documentation
4040------------------
41- See the official [ Mailgun Domain Docs] ( https://documentation.mailgun.com/en/latest /api-webhooks.html )
41+ See the official [ Mailgun Webhooks Docs] ( https://documentation.mailgun.com/docs/mailgun /api-reference/send/mailgun/domain- webhooks )
4242for more information
You can’t perform that action at this time.
0 commit comments