jfcote87 / esign

DocuSign REST API
BSD 3-Clause "New" or "Revised" License
23 stars 27 forks source link

Allow JSON webhook notifications #13

Open aesadde opened 3 years ago

aesadde commented 3 years ago

Hi @jfcote87 quick question about webhook events.

I've been testing the client but the webhook response always comes as XML but according to DocuSign docs it should be possible to get the response in JSON

Is this something that the library currently supports?

For reference, this is how I build an envelope notification

envelope.EventNotification = &model.EventNotification{
        EnvelopeEvents: []model.EnvelopeEvent{
            {EnvelopeEventStatusCode: "Sent"},
            {EnvelopeEventStatusCode: "Completed"},
            {EnvelopeEventStatusCode: "Declined"},
            {EnvelopeEventStatusCode: "Voided"},
        },
        LoggingEnabled:        true,
        RequireAcknowledgment: true,
        URL:                   webhook
    }
aesadde commented 3 years ago

Reading the code I think it's just a matter of running thegen-esign against the updated Swagger file.

Let me know if you accepted PRs for this, should be simple :)