How do you assign a NumberTab using .Net API

2019-08-02 16:59发布

问题:

I'm using the .Net API via DocuSign.eSign.dll and I'm trying to assign a DocuSign.eSign.Model.Number object to the signer, however, I don't see a method to assign it to the DocuSign.eSign.Model.Signer.

According to some other resources, using the REST API one can assign a Number Tab using the following syntax:

{

   "signers": [
        {
            "tabs": {
                "numberTabs": [
                    {
                        "validationPattern": "",
                        "validationMessage": "",
...

However, using the .Net API via the provided DocuSign.eSign.dll - the assignment method of Tabs is via the DocuSign.eSign.Model.Signer.Tabs container. This object appears to have the ability to assign tabs, however the NumberTabs definition on this object is as follows:

[DataMember(Name = "numberTabs", EmitDefaultValue = false)]
public List<double?> NumberTabs { get; set; }

In order to assign a list of DocuSign.eSign.Model.Number objects, I would have expected that the above data member should be set-up like the following:

[DataMember(Name = " numberTabs ", EmitDefaultValue = false)]
public List<Number> NumberTabs { get; set; }

Since this isn't the case, can you let me know how I can assign the Number tab using the .Net API?

回答1:

Looks like this is a bug with the latest DocuSign.eSign Nuget Package version (2.1.0)

The C# SDK does list the Number tabs as follows. Documentation here

 [DataMember(Name="numberTabs", EmitDefaultValue=false)]
 public List<Number> NumberTabs { get; set; }

You can either switch back to previous version (2.0.6) of the DocuSign.eSign nuget package or directly compile the C# SDK and use it.

Install-Package DocuSign.eSign.dll -Version 2.0.6

Update:

This issue has been fixed with Nuget package 2.1.2