Skip to content

Commit d445ab9

Browse files
Merge pull request #385 from HubSpot/codegen/webhooks
Codegen Webhooks
2 parents 0b4f4c6 + 67fb5a4 commit d445ab9

File tree

5 files changed

+129
-81
lines changed

5 files changed

+129
-81
lines changed

hubspot/webhooks/api/settings_api.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ def __init__(self, api_client=None):
3434
self.api_client = api_client
3535

3636
def clear(self, app_id, **kwargs): # noqa: E501
37-
"""clear # noqa: E501
37+
"""Delete webhook settings # noqa: E501
3838
39+
Delete the webhook settings for the specified app. Event subscriptions will not be deleted, but will be paused until another webhook is created. # noqa: E501
3940
This method makes a synchronous HTTP request by default. To make an
4041
asynchronous HTTP request, please pass async_req=True
4142
4243
>>> thread = api.clear(app_id, async_req=True)
4344
>>> result = thread.get()
4445
45-
:param app_id: (required)
46+
:param app_id: The ID of the app. (required)
4647
:type app_id: int
4748
:param async_req: Whether to execute the request asynchronously.
4849
:type async_req: bool, optional
@@ -63,15 +64,16 @@ def clear(self, app_id, **kwargs): # noqa: E501
6364
return self.clear_with_http_info(app_id, **kwargs) # noqa: E501
6465

6566
def clear_with_http_info(self, app_id, **kwargs): # noqa: E501
66-
"""clear # noqa: E501
67+
"""Delete webhook settings # noqa: E501
6768
69+
Delete the webhook settings for the specified app. Event subscriptions will not be deleted, but will be paused until another webhook is created. # noqa: E501
6870
This method makes a synchronous HTTP request by default. To make an
6971
asynchronous HTTP request, please pass async_req=True
7072
7173
>>> thread = api.clear_with_http_info(app_id, async_req=True)
7274
>>> result = thread.get()
7375
74-
:param app_id: (required)
76+
:param app_id: The ID of the app. (required)
7577
:type app_id: int
7678
:param async_req: Whether to execute the request asynchronously.
7779
:type async_req: bool, optional
@@ -153,15 +155,16 @@ def clear_with_http_info(self, app_id, **kwargs): # noqa: E501
153155
)
154156

155157
def configure(self, app_id, settings_change_request, **kwargs): # noqa: E501
156-
"""configure # noqa: E501
158+
"""Update webhook settings # noqa: E501
157159
160+
Update webhook settings for the specified app. # noqa: E501
158161
This method makes a synchronous HTTP request by default. To make an
159162
asynchronous HTTP request, please pass async_req=True
160163
161164
>>> thread = api.configure(app_id, settings_change_request, async_req=True)
162165
>>> result = thread.get()
163166
164-
:param app_id: (required)
167+
:param app_id: The ID of the app. (required)
165168
:type app_id: int
166169
:param settings_change_request: (required)
167170
:type settings_change_request: SettingsChangeRequest
@@ -184,15 +187,16 @@ def configure(self, app_id, settings_change_request, **kwargs): # noqa: E501
184187
return self.configure_with_http_info(app_id, settings_change_request, **kwargs) # noqa: E501
185188

186189
def configure_with_http_info(self, app_id, settings_change_request, **kwargs): # noqa: E501
187-
"""configure # noqa: E501
190+
"""Update webhook settings # noqa: E501
188191
192+
Update webhook settings for the specified app. # noqa: E501
189193
This method makes a synchronous HTTP request by default. To make an
190194
asynchronous HTTP request, please pass async_req=True
191195
192196
>>> thread = api.configure_with_http_info(app_id, settings_change_request, async_req=True)
193197
>>> result = thread.get()
194198
195-
:param app_id: (required)
199+
:param app_id: The ID of the app. (required)
196200
:type app_id: int
197201
:param settings_change_request: (required)
198202
:type settings_change_request: SettingsChangeRequest
@@ -288,15 +292,16 @@ def configure_with_http_info(self, app_id, settings_change_request, **kwargs):
288292
)
289293

290294
def get_all(self, app_id, **kwargs): # noqa: E501
291-
"""get_all # noqa: E501
295+
"""Read webhook settings # noqa: E501
292296
297+
Retrieve the webhook settings for the specified app, including the webhook’s target URL, throttle configuration, and create/update date. # noqa: E501
293298
This method makes a synchronous HTTP request by default. To make an
294299
asynchronous HTTP request, please pass async_req=True
295300
296301
>>> thread = api.get_all(app_id, async_req=True)
297302
>>> result = thread.get()
298303
299-
:param app_id: (required)
304+
:param app_id: The ID of the app. (required)
300305
:type app_id: int
301306
:param async_req: Whether to execute the request asynchronously.
302307
:type async_req: bool, optional
@@ -317,15 +322,16 @@ def get_all(self, app_id, **kwargs): # noqa: E501
317322
return self.get_all_with_http_info(app_id, **kwargs) # noqa: E501
318323

319324
def get_all_with_http_info(self, app_id, **kwargs): # noqa: E501
320-
"""get_all # noqa: E501
325+
"""Read webhook settings # noqa: E501
321326
327+
Retrieve the webhook settings for the specified app, including the webhook’s target URL, throttle configuration, and create/update date. # noqa: E501
322328
This method makes a synchronous HTTP request by default. To make an
323329
asynchronous HTTP request, please pass async_req=True
324330
325331
>>> thread = api.get_all_with_http_info(app_id, async_req=True)
326332
>>> result = thread.get()
327333
328-
:param app_id: (required)
334+
:param app_id: The ID of the app. (required)
329335
:type app_id: int
330336
:param async_req: Whether to execute the request asynchronously.
331337
:type async_req: bool, optional

hubspot/webhooks/api/subscriptions_api.py

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,18 @@ def __init__(self, api_client=None):
3434
self.api_client = api_client
3535

3636
def archive(self, subscription_id, app_id, **kwargs): # noqa: E501
37-
"""archive # noqa: E501
37+
"""Delete event subscription # noqa: E501
3838
39+
Delete an existing event subscription by ID. # noqa: E501
3940
This method makes a synchronous HTTP request by default. To make an
4041
asynchronous HTTP request, please pass async_req=True
4142
4243
>>> thread = api.archive(subscription_id, app_id, async_req=True)
4344
>>> result = thread.get()
4445
45-
:param subscription_id: (required)
46+
:param subscription_id: The ID of the event subscription. (required)
4647
:type subscription_id: int
47-
:param app_id: (required)
48+
:param app_id: The ID of the app. (required)
4849
:type app_id: int
4950
:param async_req: Whether to execute the request asynchronously.
5051
:type async_req: bool, optional
@@ -65,17 +66,18 @@ def archive(self, subscription_id, app_id, **kwargs): # noqa: E501
6566
return self.archive_with_http_info(subscription_id, app_id, **kwargs) # noqa: E501
6667

6768
def archive_with_http_info(self, subscription_id, app_id, **kwargs): # noqa: E501
68-
"""archive # noqa: E501
69+
"""Delete event subscription # noqa: E501
6970
71+
Delete an existing event subscription by ID. # noqa: E501
7072
This method makes a synchronous HTTP request by default. To make an
7173
asynchronous HTTP request, please pass async_req=True
7274
7375
>>> thread = api.archive_with_http_info(subscription_id, app_id, async_req=True)
7476
>>> result = thread.get()
7577
76-
:param subscription_id: (required)
78+
:param subscription_id: The ID of the event subscription. (required)
7779
:type subscription_id: int
78-
:param app_id: (required)
80+
:param app_id: The ID of the app. (required)
7981
:type app_id: int
8082
:param async_req: Whether to execute the request asynchronously.
8183
:type async_req: bool, optional
@@ -162,15 +164,16 @@ def archive_with_http_info(self, subscription_id, app_id, **kwargs): # noqa: E5
162164
)
163165

164166
def create(self, app_id, subscription_create_request, **kwargs): # noqa: E501
165-
"""create # noqa: E501
167+
"""Create an event subscription # noqa: E501
166168
169+
Create new event subscription for the specified app. # noqa: E501
167170
This method makes a synchronous HTTP request by default. To make an
168171
asynchronous HTTP request, please pass async_req=True
169172
170173
>>> thread = api.create(app_id, subscription_create_request, async_req=True)
171174
>>> result = thread.get()
172175
173-
:param app_id: (required)
176+
:param app_id: The ID of the app. (required)
174177
:type app_id: int
175178
:param subscription_create_request: (required)
176179
:type subscription_create_request: SubscriptionCreateRequest
@@ -193,15 +196,16 @@ def create(self, app_id, subscription_create_request, **kwargs): # noqa: E501
193196
return self.create_with_http_info(app_id, subscription_create_request, **kwargs) # noqa: E501
194197

195198
def create_with_http_info(self, app_id, subscription_create_request, **kwargs): # noqa: E501
196-
"""create # noqa: E501
199+
"""Create an event subscription # noqa: E501
197200
201+
Create new event subscription for the specified app. # noqa: E501
198202
This method makes a synchronous HTTP request by default. To make an
199203
asynchronous HTTP request, please pass async_req=True
200204
201205
>>> thread = api.create_with_http_info(app_id, subscription_create_request, async_req=True)
202206
>>> result = thread.get()
203207
204-
:param app_id: (required)
208+
:param app_id: The ID of the app. (required)
205209
:type app_id: int
206210
:param subscription_create_request: (required)
207211
:type subscription_create_request: SubscriptionCreateRequest
@@ -297,15 +301,16 @@ def create_with_http_info(self, app_id, subscription_create_request, **kwargs):
297301
)
298302

299303
def get_all(self, app_id, **kwargs): # noqa: E501
300-
"""get_all # noqa: E501
304+
"""Read event subscriptions # noqa: E501
301305
306+
Retrieve event subscriptions for the specified app. # noqa: E501
302307
This method makes a synchronous HTTP request by default. To make an
303308
asynchronous HTTP request, please pass async_req=True
304309
305310
>>> thread = api.get_all(app_id, async_req=True)
306311
>>> result = thread.get()
307312
308-
:param app_id: (required)
313+
:param app_id: The ID of the app. (required)
309314
:type app_id: int
310315
:param async_req: Whether to execute the request asynchronously.
311316
:type async_req: bool, optional
@@ -326,15 +331,16 @@ def get_all(self, app_id, **kwargs): # noqa: E501
326331
return self.get_all_with_http_info(app_id, **kwargs) # noqa: E501
327332

328333
def get_all_with_http_info(self, app_id, **kwargs): # noqa: E501
329-
"""get_all # noqa: E501
334+
"""Read event subscriptions # noqa: E501
330335
336+
Retrieve event subscriptions for the specified app. # noqa: E501
331337
This method makes a synchronous HTTP request by default. To make an
332338
asynchronous HTTP request, please pass async_req=True
333339
334340
>>> thread = api.get_all_with_http_info(app_id, async_req=True)
335341
>>> result = thread.get()
336342
337-
:param app_id: (required)
343+
:param app_id: The ID of the app. (required)
338344
:type app_id: int
339345
:param async_req: Whether to execute the request asynchronously.
340346
:type async_req: bool, optional
@@ -418,17 +424,18 @@ def get_all_with_http_info(self, app_id, **kwargs): # noqa: E501
418424
)
419425

420426
def get_by_id(self, subscription_id, app_id, **kwargs): # noqa: E501
421-
"""get_by_id # noqa: E501
427+
"""Read an event subscription # noqa: E501
422428
429+
Retrieve a specific event subscription by ID. # noqa: E501
423430
This method makes a synchronous HTTP request by default. To make an
424431
asynchronous HTTP request, please pass async_req=True
425432
426433
>>> thread = api.get_by_id(subscription_id, app_id, async_req=True)
427434
>>> result = thread.get()
428435
429-
:param subscription_id: (required)
436+
:param subscription_id: The ID of the event subscription. (required)
430437
:type subscription_id: int
431-
:param app_id: (required)
438+
:param app_id: The ID of the app. (required)
432439
:type app_id: int
433440
:param async_req: Whether to execute the request asynchronously.
434441
:type async_req: bool, optional
@@ -449,17 +456,18 @@ def get_by_id(self, subscription_id, app_id, **kwargs): # noqa: E501
449456
return self.get_by_id_with_http_info(subscription_id, app_id, **kwargs) # noqa: E501
450457

451458
def get_by_id_with_http_info(self, subscription_id, app_id, **kwargs): # noqa: E501
452-
"""get_by_id # noqa: E501
459+
"""Read an event subscription # noqa: E501
453460
461+
Retrieve a specific event subscription by ID. # noqa: E501
454462
This method makes a synchronous HTTP request by default. To make an
455463
asynchronous HTTP request, please pass async_req=True
456464
457465
>>> thread = api.get_by_id_with_http_info(subscription_id, app_id, async_req=True)
458466
>>> result = thread.get()
459467
460-
:param subscription_id: (required)
468+
:param subscription_id: The ID of the event subscription. (required)
461469
:type subscription_id: int
462-
:param app_id: (required)
470+
:param app_id: The ID of the app. (required)
463471
:type app_id: int
464472
:param async_req: Whether to execute the request asynchronously.
465473
:type async_req: bool, optional
@@ -548,17 +556,18 @@ def get_by_id_with_http_info(self, subscription_id, app_id, **kwargs): # noqa:
548556
)
549557

550558
def update(self, subscription_id, app_id, subscription_patch_request, **kwargs): # noqa: E501
551-
"""update # noqa: E501
559+
"""Update an event subscription # noqa: E501
552560
561+
Update an existing event subscription by ID. # noqa: E501
553562
This method makes a synchronous HTTP request by default. To make an
554563
asynchronous HTTP request, please pass async_req=True
555564
556565
>>> thread = api.update(subscription_id, app_id, subscription_patch_request, async_req=True)
557566
>>> result = thread.get()
558567
559-
:param subscription_id: (required)
568+
:param subscription_id: The ID of the event subscription. (required)
560569
:type subscription_id: int
561-
:param app_id: (required)
570+
:param app_id: The ID of the app. (required)
562571
:type app_id: int
563572
:param subscription_patch_request: (required)
564573
:type subscription_patch_request: SubscriptionPatchRequest
@@ -581,17 +590,18 @@ def update(self, subscription_id, app_id, subscription_patch_request, **kwargs):
581590
return self.update_with_http_info(subscription_id, app_id, subscription_patch_request, **kwargs) # noqa: E501
582591

583592
def update_with_http_info(self, subscription_id, app_id, subscription_patch_request, **kwargs): # noqa: E501
584-
"""update # noqa: E501
593+
"""Update an event subscription # noqa: E501
585594
595+
Update an existing event subscription by ID. # noqa: E501
586596
This method makes a synchronous HTTP request by default. To make an
587597
asynchronous HTTP request, please pass async_req=True
588598
589599
>>> thread = api.update_with_http_info(subscription_id, app_id, subscription_patch_request, async_req=True)
590600
>>> result = thread.get()
591601
592-
:param subscription_id: (required)
602+
:param subscription_id: The ID of the event subscription. (required)
593603
:type subscription_id: int
594-
:param app_id: (required)
604+
:param app_id: The ID of the app. (required)
595605
:type app_id: int
596606
:param subscription_patch_request: (required)
597607
:type subscription_patch_request: SubscriptionPatchRequest
@@ -692,15 +702,16 @@ def update_with_http_info(self, subscription_id, app_id, subscription_patch_requ
692702
)
693703

694704
def update_batch(self, app_id, batch_input_subscription_batch_update_request, **kwargs): # noqa: E501
695-
"""update_batch # noqa: E501
705+
"""Batch create event subscriptions # noqa: E501
696706
707+
Batch create event subscriptions for the specified app. # noqa: E501
697708
This method makes a synchronous HTTP request by default. To make an
698709
asynchronous HTTP request, please pass async_req=True
699710
700711
>>> thread = api.update_batch(app_id, batch_input_subscription_batch_update_request, async_req=True)
701712
>>> result = thread.get()
702713
703-
:param app_id: (required)
714+
:param app_id: The ID of the app. (required)
704715
:type app_id: int
705716
:param batch_input_subscription_batch_update_request: (required)
706717
:type batch_input_subscription_batch_update_request: BatchInputSubscriptionBatchUpdateRequest
@@ -723,15 +734,16 @@ def update_batch(self, app_id, batch_input_subscription_batch_update_request, **
723734
return self.update_batch_with_http_info(app_id, batch_input_subscription_batch_update_request, **kwargs) # noqa: E501
724735

725736
def update_batch_with_http_info(self, app_id, batch_input_subscription_batch_update_request, **kwargs): # noqa: E501
726-
"""update_batch # noqa: E501
737+
"""Batch create event subscriptions # noqa: E501
727738
739+
Batch create event subscriptions for the specified app. # noqa: E501
728740
This method makes a synchronous HTTP request by default. To make an
729741
asynchronous HTTP request, please pass async_req=True
730742
731743
>>> thread = api.update_batch_with_http_info(app_id, batch_input_subscription_batch_update_request, async_req=True)
732744
>>> result = thread.get()
733745
734-
:param app_id: (required)
746+
:param app_id: The ID of the app. (required)
735747
:type app_id: int
736748
:param batch_input_subscription_batch_update_request: (required)
737749
:type batch_input_subscription_batch_update_request: BatchInputSubscriptionBatchUpdateRequest

0 commit comments

Comments
 (0)