jfcote87 / esign Goto Github PK
View Code? Open in Web Editor NEWDocuSign REST API
License: BSD 3-Clause "New" or "Revised" License
DocuSign REST API
License: BSD 3-Clause "New" or "Revised" License
Using v2.1 of the esign library, the "omitempty" portion of Locked DSBool `json:"locked,omitempty"`
at
Line 13620 in 5064b2f
Per the docs https://pkg.go.dev/encoding/json, "The 'omitempty' option specifies that the field should be omitted from encoding if the field has an empty value, defined as false, ..."
Using v2.1 of the library, the problem arises when setting TabValue.Value in model.Text
when creating an editable text tab (model.Text) for a signer and setting a non-empty string value (TabValue.Value).
I cannot find this explicitly stated in DocuSign docs, but based off the API behavior, when the json values for a request to Docusign contains a non-empty string for model.Text.TabValue.Value
and model.Text.Locked
is not set in the request, model.Text.Locked
defaults to true
in DocuSign's end of the API. Essentially, the 'omitempty' part of Locked DSBool `json:"locked,omitempty"`
prevents one from setting a non-empty string value for model.Text.TabValue.Value
and model.Text.Locked = false
to allow a signer to edit a text tab (since the json form of model.Text.Locked = false
is excluded from the request due to "omitempty"). Removing "omitempty" from Locked DSBool
json:"locked,omitempty"`` resolves the problem.
From Go docs https://pkg.go.dev/encoding/json:
Hi,
Thank you for the library. When I try to run the func Example_create_envelope() I get the following error. How do I fix it or I am missing something here? I already added the library as part of my module and don't get any other error. Thanks!!
cannot find package "." in:
/vendor/github.com/jfcote87/esign/v2/envelopes
cannot find package "." in:
vendor/github.com/jfcote87/esign/v2/model
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
}
I'm thinking about making a breaking change by moving the model package and service packages (accounts, authentication, envelopes, etc.) to a v2 directory. When the v2.1 swagger file is released, I will generate packages in a v2.1 directory allowing developers to use either version or even mix them.
The fix will be simple, just change the import statements to:
import github.com/jfcote87/esign/v2/model
import github.com/jfcote87/esign/v2/{service name}
@jfcote87 - I am also trying to implement the same, got the envelopeID but stuck at this step Request a Recipient View URL (the Signing Ceremony URL). Is this functionality supported?
Hi @jfcote87 ,
Thanks for this awesome library. It made my job much easier.
When trying to update an existing envelope(in the created state) which is equivalent to
PUT https://demo.docusign.net/restapi/v2/accounts/10150368/envelopes/e24941f6-8c68-4e78-ab54-f79e206f57ae/recipients/1/tabs Request Body: { "textTabs": [ { "documentId": "1", "pageNumber": "1", "tabLabel": "Name", "value": "Jon snow", "xPosition": "195", "yPosition": "1600" } ] }
I see an error at (
Line 262 in 471db20
error updaing document: json: cannot unmarshal string into Go struct field Text.tabUpdateResults.textTabs.width of type int32
It means the response body contains width and height has string type but the model.Text.Widht and model.Text.Height are of type int32.
hi jfcote87,
it's me (again), seem you havent implemented this api yet?
https://demo.docusign.net/restapi/v2.1/accounts/%s/envelopes/%s/views/recipient
could you plz take a look? thanks
Thanks for the library.
I am trying to run your examples_test.go ExampleJWTConfig() function and have an error:
create credential error: private key should be a PEM or plain PKSC1 or PKCS8; parse error: asn1: structure error: tags don't match (16 vs {class:0 tag:13 length:45 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2 exit status 1
hello jfcote87,
thank for writing a good sdk, but when I try to use, it said that:
e87/esign/oauth2.go:219:14: undefined: jwt.ExpirationSetting
could you please take a look?
I can only find remote usage(by email) in examples_test.go
, is embeded usage supported?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.