4242import com .groupdocs .sdk .model .SignatureTemplateFieldsResponse ;
4343import com .groupdocs .sdk .model .SignatureEnvelopeFieldSettingsInfo ;
4444import com .groupdocs .sdk .model .SignatureEnvelopeFieldResponse ;
45+ import com .groupdocs .sdk .model .SignatureDocumentFieldsResponse ;
4546import com .groupdocs .sdk .model .SignatureContactsResponse ;
4647import com .groupdocs .sdk .model .SignatureFormsResponse ;
4748import com .groupdocs .sdk .model .SignatureTemplateDocumentResponse ;
@@ -98,6 +99,46 @@ public String getBasePath(){
9899return basePath ;
99100 }
100101
102+ public SignatureTemplateRecipientResponse AddSignatureTemplateRecipient (String userId , String templateGuid , String nickname , String roleGuid , Integer order ) throws ApiException {
103+ // verify required params are set
104+ if (userId == null || templateGuid == null || nickname == null || roleGuid == null ){
105+ throw new ApiException (400 , "missing required params" );
106+ }
107+ String resourcePath = "/signature/{userId}/templates/{templateGuid}/recipient?nickname={nickname}&role={roleGuid}&order={order}" .replace ("*" , "" );
108+ int pos = resourcePath .indexOf ("?" );
109+ if (pos > -1 ){
110+ resourcePath = resourcePath .substring (0 , pos );
111+ }
112+ // create path and map variables
113+ resourcePath = resourcePath .replace ("{format}" ,"json" ).replace ("{" + "userId" + "}" , String .valueOf (userId )).replace ("{" + "templateGuid" + "}" , String .valueOf (templateGuid ));
114+
115+ // query params
116+ Map <String , String > queryParams = new HashMap <String , String >();
117+ Map <String , String > headerParams = new HashMap <String , String >();
118+
119+ if (!"null" .equals (String .valueOf (nickname )))
120+ queryParams .put ("nickname" , String .valueOf (nickname ));
121+ if (!"null" .equals (String .valueOf (roleGuid )))
122+ queryParams .put ("role" , String .valueOf (roleGuid ));
123+ if (!"null" .equals (String .valueOf (order )))
124+ queryParams .put ("order" , String .valueOf (order ));
125+ try {
126+ String response = apiInvoker .invokeAPI (basePath , resourcePath , "POST" , queryParams , null , headerParams , String .class );
127+ if (response != null ){
128+ return (SignatureTemplateRecipientResponse ) ApiInvoker .deserialize (response , "" , SignatureTemplateRecipientResponse .class );
129+ }
130+ else {
131+ return null ;
132+ }
133+ } catch (ApiException ex ){
134+ if (ex .getCode () == 404 ){
135+ return null ;
136+ }
137+ else {
138+ throw ex ;
139+ }
140+ }
141+ }
101142public SignatureTemplateRecipientsResponse GetSignatureTemplateRecipients (String userId , String templateGuid ) throws ApiException {
102143// verify required params are set
103144if (userId == null || templateGuid == null ){
@@ -580,12 +621,12 @@ public SignatureTemplateDocumentResponse RenameSignatureTemplateDocument (String
580621 }
581622 }
582623 }
583- public SignatureContactsResponse GetContacts (String userId , Integer page , Integer records , String firstName , String lastName , String email ) throws ApiException {
624+ public SignatureContactsResponse GetContacts (String userId , Integer page , Integer records , String firstName , String lastName , String email , Boolean useAnd ) throws ApiException {
584625// verify required params are set
585626if (userId == null ){
586627throw new ApiException (400 , "missing required params" );
587628 }
588- String resourcePath = "/signature/{userId}/contacts?firstName={firstName}&lastName={lastName}&email={email}&records={records}&page={page}" .replace ("*" , "" );
629+ String resourcePath = "/signature/{userId}/contacts?firstName={firstName}&lastName={lastName}&email={email}&records={records}&page={page}&useAnd={useAnd} " .replace ("*" , "" );
589630int pos = resourcePath .indexOf ("?" );
590631if (pos > -1 ){
591632resourcePath = resourcePath .substring (0 , pos );
@@ -607,6 +648,8 @@ public SignatureContactsResponse GetContacts (String userId, Integer page, Integ
607648queryParams .put ("lastName" , String .valueOf (lastName ));
608649if (!"null" .equals (String .valueOf (email )))
609650queryParams .put ("email" , String .valueOf (email ));
651+ if (!"null" .equals (String .valueOf (useAnd )))
652+ queryParams .put ("useAnd" , String .valueOf (useAnd ));
610653try {
611654String response = apiInvoker .invokeAPI (basePath , resourcePath , "GET" , queryParams , null , headerParams , String .class );
612655if (response != null ){
@@ -1992,6 +2035,36 @@ public SignatureStatusResponse RetrySignEnvelope (String userId, String envelope
19922035 }
19932036 }
19942037 }
2038+ public SignatureEnvelopeResponse UpdateEnvelopeFromTemplate (String userId , String envelopeGuid , String templateGuid ) throws ApiException {
2039+ // verify required params are set
2040+ if (userId == null || envelopeGuid == null || templateGuid == null ){
2041+ throw new ApiException (400 , "missing required params" );
2042+ }
2043+ String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/templates/{templateGuid}" .replace ("*" , "" );
2044+ // create path and map variables
2045+ resourcePath = resourcePath .replace ("{format}" ,"json" ).replace ("{" + "userId" + "}" , String .valueOf (userId )).replace ("{" + "envelopeGuid" + "}" , String .valueOf (envelopeGuid )).replace ("{" + "templateGuid" + "}" , String .valueOf (templateGuid ));
2046+
2047+ // query params
2048+ Map <String , String > queryParams = new HashMap <String , String >();
2049+ Map <String , String > headerParams = new HashMap <String , String >();
2050+
2051+ try {
2052+ String response = apiInvoker .invokeAPI (basePath , resourcePath , "POST" , queryParams , null , headerParams , String .class );
2053+ if (response != null ){
2054+ return (SignatureEnvelopeResponse ) ApiInvoker .deserialize (response , "" , SignatureEnvelopeResponse .class );
2055+ }
2056+ else {
2057+ return null ;
2058+ }
2059+ } catch (ApiException ex ){
2060+ if (ex .getCode () == 404 ){
2061+ return null ;
2062+ }
2063+ else {
2064+ throw ex ;
2065+ }
2066+ }
2067+ }
19952068public SignatureFieldsResponse GetFieldsList (String userId , String fieldGuid ) throws ApiException {
19962069// verify required params are set
19972070if (userId == null ){
@@ -2916,7 +2989,7 @@ public SignaturePredefinedListResponse AddPredefinedList (String userId, Signatu
29162989 }
29172990 }
29182991 }
2919- public SignaturePredefinedListResponse DeletePredefinedList (String userId , String listGuid ) throws ApiException {
2992+ public SignaturePredefinedListsResponse DeletePredefinedList (String userId , String listGuid ) throws ApiException {
29202993// verify required params are set
29212994if (userId == null || listGuid == null ){
29222995throw new ApiException (400 , "missing required params" );
@@ -2932,7 +3005,7 @@ public SignaturePredefinedListResponse DeletePredefinedList (String userId, Stri
29323005try {
29333006String response = apiInvoker .invokeAPI (basePath , resourcePath , "DELETE" , queryParams , null , headerParams , String .class );
29343007if (response != null ){
2935- return (SignaturePredefinedListResponse ) ApiInvoker .deserialize (response , "" , SignaturePredefinedListResponse .class );
3008+ return (SignaturePredefinedListsResponse ) ApiInvoker .deserialize (response , "" , SignaturePredefinedListsResponse .class );
29363009 }
29373010else {
29383011return null ;
@@ -3164,7 +3237,7 @@ public SignatureTemplateResponse GetSignatureTemplate (String userId, String tem
31643237 }
31653238public SignatureTemplateResponse CreateSignatureTemplate (String userId , String name , String templateGuid , String envelopeGuid , SignatureTemplateSettingsInfo body ) throws ApiException {
31663239// verify required params are set
3167- if (userId == null ){
3240+ if (userId == null || name == null ){
31683241throw new ApiException (400 , "missing required params" );
31693242 }
31703243String resourcePath = "/signature/{userId}/template?name={name}&templateId={templateGuid}&envelopeId={envelopeGuid}" .replace ("*" , "" );
@@ -3298,46 +3371,6 @@ public SignatureStatusResponse DeleteSignatureTemplate (String userId, String te
32983371 }
32993372 }
33003373 }
3301- public SignatureTemplateRecipientResponse AddSignatureTemplateRecipient (String userId , String templateGuid , String nickname , String roleGuid , Integer order ) throws ApiException {
3302- // verify required params are set
3303- if (userId == null || templateGuid == null || nickname == null || roleGuid == null ){
3304- throw new ApiException (400 , "missing required params" );
3305- }
3306- String resourcePath = "/signature/{userId}/templates/{templateGuid}/recipient?nickname={nickname}&role={roleGuid}&order={order}" .replace ("*" , "" );
3307- int pos = resourcePath .indexOf ("?" );
3308- if (pos > -1 ){
3309- resourcePath = resourcePath .substring (0 , pos );
3310- }
3311- // create path and map variables
3312- resourcePath = resourcePath .replace ("{format}" ,"json" ).replace ("{" + "userId" + "}" , String .valueOf (userId )).replace ("{" + "templateGuid" + "}" , String .valueOf (templateGuid ));
3313-
3314- // query params
3315- Map <String , String > queryParams = new HashMap <String , String >();
3316- Map <String , String > headerParams = new HashMap <String , String >();
3317-
3318- if (!"null" .equals (String .valueOf (nickname )))
3319- queryParams .put ("nickname" , String .valueOf (nickname ));
3320- if (!"null" .equals (String .valueOf (roleGuid )))
3321- queryParams .put ("role" , String .valueOf (roleGuid ));
3322- if (!"null" .equals (String .valueOf (order )))
3323- queryParams .put ("order" , String .valueOf (order ));
3324- try {
3325- String response = apiInvoker .invokeAPI (basePath , resourcePath , "POST" , queryParams , null , headerParams , String .class );
3326- if (response != null ){
3327- return (SignatureTemplateRecipientResponse ) ApiInvoker .deserialize (response , "" , SignatureTemplateRecipientResponse .class );
3328- }
3329- else {
3330- return null ;
3331- }
3332- } catch (ApiException ex ){
3333- if (ex .getCode () == 404 ){
3334- return null ;
3335- }
3336- else {
3337- throw ex ;
3338- }
3339- }
3340- }
33413374public SignatureEnvelopeFieldResponse PublicFillEnvelopeField (String envelopeGuid , String documentGuid , String recipientGuid , String fieldGuid , String body ) throws ApiException {
33423375// verify required params are set
33433376if (envelopeGuid == null || documentGuid == null || recipientGuid == null || fieldGuid == null ){
@@ -3894,6 +3927,36 @@ public SignatureSignDocumentStatusResponse PublicGetSignDocumentStatus (String j
38943927 }
38953928 }
38963929 }
3930+ public SignatureDocumentFieldsResponse PublicGetDocumentFields (String documentGuid ) throws ApiException {
3931+ // verify required params are set
3932+ if (documentGuid == null ){
3933+ throw new ApiException (400 , "missing required params" );
3934+ }
3935+ String resourcePath = "/signature/public/documents/{documentGuid}/fields" .replace ("*" , "" );
3936+ // create path and map variables
3937+ resourcePath = resourcePath .replace ("{format}" ,"json" ).replace ("{" + "documentGuid" + "}" , String .valueOf (documentGuid ));
3938+
3939+ // query params
3940+ Map <String , String > queryParams = new HashMap <String , String >();
3941+ Map <String , String > headerParams = new HashMap <String , String >();
3942+
3943+ try {
3944+ String response = apiInvoker .invokeAPI (basePath , resourcePath , "GET" , queryParams , null , headerParams , String .class );
3945+ if (response != null ){
3946+ return (SignatureDocumentFieldsResponse ) ApiInvoker .deserialize (response , "" , SignatureDocumentFieldsResponse .class );
3947+ }
3948+ else {
3949+ return null ;
3950+ }
3951+ } catch (ApiException ex ){
3952+ if (ex .getCode () == 404 ){
3953+ return null ;
3954+ }
3955+ else {
3956+ throw ex ;
3957+ }
3958+ }
3959+ }
38973960public FileStream GetSignatureEnvelopeFieldData (String envelopeGuid , String recipientGuid , String fieldGuid ) throws ApiException {
38983961// verify required params are set
38993962if (envelopeGuid == null || recipientGuid == null || fieldGuid == null ){
0 commit comments