(webhooks.v1)
- activate_config - Activate one config
- change_config_secret - Change the signing secret of a config
- deactivate_config - Deactivate one config
- delete_config - Delete one config
- get_many_configs - Get many configs
- insert_config - Insert a new config
- test_config - Test one config
Activate a webhooks config by ID, to start receiving webhooks to its endpoint.
import sdk
from sdk.models import operations, shared
s = sdk.SDK(
security=shared.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
)
res = s.webhooks.v1.activate_config(request=operations.ActivateConfigRequest(
id='4997257d-dfb6-445b-929c-cbe2ab182818',
))
if res.config_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ActivateConfigRequest | ✔️ | The request object to use for the request. |
operations.ActivateConfigResponse
Error Type | Status Code | Content Type |
---|---|---|
errors.WebhooksErrorResponse | default | application/json |
errors.SDKError | 4XX, 5XX | */* |
Change the signing secret of the endpoint of a webhooks config.
If not passed or empty, a secret is automatically generated. The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding)
import sdk
from sdk.models import operations, shared
s = sdk.SDK(
security=shared.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
)
res = s.webhooks.v1.change_config_secret(request=operations.ChangeConfigSecretRequest(
id='4997257d-dfb6-445b-929c-cbe2ab182818',
config_change_secret=shared.ConfigChangeSecret(
secret='V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3',
),
))
if res.config_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ChangeConfigSecretRequest | ✔️ | The request object to use for the request. |
operations.ChangeConfigSecretResponse
Error Type | Status Code | Content Type |
---|---|---|
errors.WebhooksErrorResponse | default | application/json |
errors.SDKError | 4XX, 5XX | */* |
Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint.
import sdk
from sdk.models import operations, shared
s = sdk.SDK(
security=shared.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
)
res = s.webhooks.v1.deactivate_config(request=operations.DeactivateConfigRequest(
id='4997257d-dfb6-445b-929c-cbe2ab182818',
))
if res.config_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeactivateConfigRequest | ✔️ | The request object to use for the request. |
operations.DeactivateConfigResponse
Error Type | Status Code | Content Type |
---|---|---|
errors.WebhooksErrorResponse | default | application/json |
errors.SDKError | 4XX, 5XX | */* |
Delete a webhooks config by ID.
import sdk
from sdk.models import operations, shared
s = sdk.SDK(
security=shared.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
)
res = s.webhooks.v1.delete_config(request=operations.DeleteConfigRequest(
id='4997257d-dfb6-445b-929c-cbe2ab182818',
))
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeleteConfigRequest | ✔️ | The request object to use for the request. |
operations.DeleteConfigResponse
Error Type | Status Code | Content Type |
---|---|---|
errors.WebhooksErrorResponse | default | application/json |
errors.SDKError | 4XX, 5XX | */* |
Sorted by updated date descending
import sdk
from sdk.models import operations, shared
s = sdk.SDK(
security=shared.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
)
res = s.webhooks.v1.get_many_configs(request=operations.GetManyConfigsRequest(
endpoint='https://example.com',
id='4997257d-dfb6-445b-929c-cbe2ab182818',
))
if res.configs_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetManyConfigsRequest | ✔️ | The request object to use for the request. |
operations.GetManyConfigsResponse
Error Type | Status Code | Content Type |
---|---|---|
errors.WebhooksErrorResponse | default | application/json |
errors.SDKError | 4XX, 5XX | */* |
Insert a new webhooks config.
The endpoint should be a valid https URL and be unique.
The secret is the endpoint's verification secret. If not passed or empty, a secret is automatically generated. The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding)
All eventTypes are converted to lower-case when inserted.
import sdk
from sdk.models import shared
s = sdk.SDK(
security=shared.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
)
res = s.webhooks.v1.insert_config(request=shared.ConfigUser(
endpoint='https://example.com',
event_types=[
'TYPE1',
],
name='customer_payment',
secret='V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3',
))
if res.config_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
shared.ConfigUser | ✔️ | The request object to use for the request. |
operations.InsertConfigResponse
Error Type | Status Code | Content Type |
---|---|---|
errors.WebhooksErrorResponse | default | application/json |
errors.SDKError | 4XX, 5XX | */* |
Test a config by sending a webhook to its endpoint.
import sdk
from sdk.models import operations, shared
s = sdk.SDK(
security=shared.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
)
res = s.webhooks.v1.test_config(request=operations.TestConfigRequest(
id='4997257d-dfb6-445b-929c-cbe2ab182818',
))
if res.attempt_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.TestConfigRequest | ✔️ | The request object to use for the request. |
Error Type | Status Code | Content Type |
---|---|---|
errors.WebhooksErrorResponse | default | application/json |
errors.SDKError | 4XX, 5XX | */* |