-
Notifications
You must be signed in to change notification settings - Fork 22
Description
After sending request for create new Webhook subscription with:
"notificationScope":"SELF"
2025-02-17 13:56:27.5195 CyberSource.Api.CreateNewWebhooksApi.CreateWebhookSubscriptionAsyncWithHttpInfo Debug: HTTP Request Body :
{"name":"RunPay Invoice WebHook","organizationId":"cybfinalinca_1737469483","productId":"customerInvoicing","eventTypes":["invoicing.customer.invoice.cancel","invoicing.customer.invoice.paid","invoicing.customer.invoice.send"],"webhookUrl":"https://playkeys-server.internetbar.keenetic.pro/api/callback/cybersource","healthCheckUrl":"https://playkeys-server.internetbar.keenetic.pro/api/Settings/HealthCheck","notificationScope":"SELF","retryPolicy":{"algorithm":"ARITHMETIC","firstRetry":1,"interval":1,"numberOfRetries":3,"deactivateFlag":"false","repeatSequenceCount":0,"repeatSequenceWaitTime":0},"securityPolicy":{"securityType":"KEY","proxyType":"external"}}
I received an correct response from API:
2025-02-17 13:56:28.1505 CyberSource.Client.ApiClient.CallApiAsync Debug: HTTP Response Body :
{"organizationId":"cybfinalinca_1737469483","productId":"customerInvoicing","eventTypes":["invoicing.customer.invoice.cancel","invoicing.customer.invoice.paid","invoicing.customer.invoice.send"],"webhookId":"2e556066-d69a-3465-e063-a0588e0a1a76","name":"RunPay Invoice WebHook","webhookUrl":"https://playkeys-server.internetbar.keenetic.pro:443/api/callback/cybersource","healthCheckUrl":"https://playkeys-server.internetbar.keenetic.pro:443/api/Settings/HealthCheck","createdOn":"2025-02-17T10:56:29.737Z","status":"INACTIVE","retryPolicy":{"algorithm":"ARITHMETIC","firstRetry":1,"interval":1,"numberOfRetries":3,"deactivateFlag":false,"repeatSequenceCount":0,"repeatSequenceWaitTime":0},"securityPolicy":{"securityType":"KEY","proxyType":"external","digitalSignatureEnabled":"yes"},"version":"3","deliveryType":"nrtdCentral","notificationScope":"SELF"}
But while deserialization it will catch an exception:
SocketAsyncEventArgs.OnCompletedInternal => AwaitableSocketAsyncEventArgs.OnCompleted => AwaitableSocketAsyncEventArgs.InvokeContinuation
2025-02-17 13:56:28.2415 CyberSource.Client.ApiClient.Deserialize Error: JSON Deserialization Exception : Error converting value "SELF" to type 'CyberSource.Model.Notificationsubscriptionsv1webhooksNotificationScope'. Path 'notificationScope', line 1, position 854. ExecutionContext.RunInternal => <CreateWebhookSubscriptionAsyncWithHttpInfo>d__21.MoveNext => ApiClient.Deserialize
In response there is nothing but "notificationScope":"SELF"
. Why it isn't deserialize to Notificationsubscriptionsv1webhooksNotificationScope
?
I can't receive an deserialized object Notificationsubscriptionsv1webhooksNotificationScope in answer from calling this method CreateWebhookSubscriptionAsyncWithHttpInfo. I get an exception while deserialization.