From 9686e404113e93f1f586513f54396db382a29ee6 Mon Sep 17 00:00:00 2001 From: Vasyl Kravets Date: Tue, 5 Aug 2025 22:15:56 +0300 Subject: [PATCH] Release v3.5.0 --- examples/DocumentGroupRecipientsExample.java | 91 ++++++++ .../EmbeddedSendingDocumentGroupExample.java | 2 +- .../DocumentGroupRecipientsPutRequest.java | 101 +++++++++ .../request/data/CcCollection.java | 18 ++ .../request/data/recipient/Attribute.java | 196 ++++++++++++++++++ .../data/recipient/Authentication.java | 129 ++++++++++++ .../request/data/recipient/Document.java | 112 ++++++++++ .../data/recipient/DocumentCollection.java | 22 ++ .../request/data/recipient/EmailGroup.java | 74 +++++++ .../request/data/recipient/Recipient.java | 164 +++++++++++++++ .../data/recipient/RecipientCollection.java | 24 +++ .../request/data/recipient/Reminder.java | 112 ++++++++++ .../DocumentGroupRecipientsPutResponse.java | 45 ++++ .../response/data/data/Attribute.java | 2 + .../response/data/data/EmailGroup.java | 2 + .../response/data/data/Recipient.java | 2 + .../response/data/data/Reminder.java | 2 + .../response/data/invite/Action.java | 2 + .../response/data/invite/Invite.java | 2 + .../DocumentGroupTemplatePostResponse.java | 4 +- .../request/data/invite/Signer.java | 25 ++- ...ntGroupEmbeddedSendingLinkPostRequest.java | 33 ++- .../com/signnow/mock/faker/SignNowFaker.java | 4 +- .../update_document_group_recipients_put.json | 13 ++ 24 files changed, 1174 insertions(+), 7 deletions(-) create mode 100644 examples/DocumentGroupRecipientsExample.java create mode 100644 src/main/java/com/signnow/api/documentgroup/request/DocumentGroupRecipientsPutRequest.java create mode 100644 src/main/java/com/signnow/api/documentgroup/request/data/CcCollection.java create mode 100644 src/main/java/com/signnow/api/documentgroup/request/data/recipient/Attribute.java create mode 100644 src/main/java/com/signnow/api/documentgroup/request/data/recipient/Authentication.java create mode 100644 src/main/java/com/signnow/api/documentgroup/request/data/recipient/Document.java create mode 100644 src/main/java/com/signnow/api/documentgroup/request/data/recipient/DocumentCollection.java create mode 100644 src/main/java/com/signnow/api/documentgroup/request/data/recipient/EmailGroup.java create mode 100644 src/main/java/com/signnow/api/documentgroup/request/data/recipient/Recipient.java create mode 100644 src/main/java/com/signnow/api/documentgroup/request/data/recipient/RecipientCollection.java create mode 100644 src/main/java/com/signnow/api/documentgroup/request/data/recipient/Reminder.java create mode 100644 src/main/java/com/signnow/api/documentgroup/response/DocumentGroupRecipientsPutResponse.java create mode 100644 src/test/resources/wiremock/mappings/update_document_group_recipients_put.json diff --git a/examples/DocumentGroupRecipientsExample.java b/examples/DocumentGroupRecipientsExample.java new file mode 100644 index 0000000..1780ef4 --- /dev/null +++ b/examples/DocumentGroupRecipientsExample.java @@ -0,0 +1,91 @@ +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.signnow.api.documentgroup.request.DocumentGroupRecipientsGetRequest; +import com.signnow.api.documentgroup.request.DocumentGroupRecipientsPutRequest; +import com.signnow.api.documentgroup.request.data.CcCollection; +import com.signnow.api.documentgroup.request.data.recipient.Recipient; +import com.signnow.api.documentgroup.request.data.recipient.RecipientCollection; +import com.signnow.api.documentgroup.response.DocumentGroupRecipientsGetResponse; +import com.signnow.api.documentgroup.response.DocumentGroupRecipientsPutResponse; +import com.signnow.core.ApiClient; +import com.signnow.core.exception.SignNowApiException; +import com.signnow.core.factory.SdkFactory; + +public class DocumentGroupRecipientsExample { + public static void main(String[] args) { + // Set your actual input data here + // Note: following values are dummy, just for example + // ---------------------------------------------------- + // if it is not specified here, a new Bearer token will be created automatically + String bearerToken = ""; + String documentGroupId = "5d66ca4accdd4ab28f8b2c71001093b5cb3bcb8a"; + + try { + ApiClient client = SdkFactory.createApiClientWithBearerToken(bearerToken); + + // Get recipient + DocumentGroupRecipientsGetRequest request = new DocumentGroupRecipientsGetRequest() + .withDocumentGroupId(documentGroupId); + DocumentGroupRecipientsGetResponse response = (DocumentGroupRecipientsGetResponse) client.send(request) + .getResponse(); + + // Convert to request model and replace email + RecipientCollection recipientCollection = new RecipientCollection(); + for (com.signnow.api.documentgroup.response.data.data.Recipient responseRecipient : response.getData() + .getRecipients()) { + Recipient reqRecipient = convertRecipient(responseRecipient); + if (reqRecipient == null) continue; + + System.out.println("Original name: " + responseRecipient.getName()); + System.out.println("Original email: " + responseRecipient.getEmail()); + + if (reqRecipient.getName().equals("Recipient 1")) { + // Replace email + Recipient updated = new Recipient( + reqRecipient.getName(), + "new.email@example.com", + reqRecipient.getOrder(), + reqRecipient.getDocuments(), + reqRecipient.getEmailGroup(), + reqRecipient.getAttributes()); + recipientCollection.add(updated); + } else { + recipientCollection.add(reqRecipient); + } + } + + // Send PUT request + DocumentGroupRecipientsPutRequest putRequest = new DocumentGroupRecipientsPutRequest( + recipientCollection, + new CcCollection()).withDocumentGroupId(documentGroupId); + + DocumentGroupRecipientsPutResponse putResponse = (DocumentGroupRecipientsPutResponse) client.send(putRequest) + .getResponse(); + System.out.println("Updated email: " + putResponse.getData().getRecipients().get(0).getEmail()); + + } catch (SignNowApiException e) { + System.out.println("ERROR: " + e.getMessage()); + } + } + + private static Recipient convertRecipient( + com.signnow.api.documentgroup.response.data.data.Recipient responseRecipient) { + ObjectMapper mapper = new ObjectMapper(); + try { + String json = mapper.writeValueAsString(responseRecipient); + Recipient recipient = mapper.readValue(json, Recipient.class); + + return new Recipient( + recipient.getName(), + recipient.getEmail(), + recipient.getOrder(), + recipient.getDocuments(), + recipient.getEmailGroup(), + recipient.getAttributes()); + + } catch (JsonProcessingException e) { + e.printStackTrace(); + return null; + } + } +} diff --git a/examples/EmbeddedSendingDocumentGroupExample.java b/examples/EmbeddedSendingDocumentGroupExample.java index ab20a90..22ea4fb 100644 --- a/examples/EmbeddedSendingDocumentGroupExample.java +++ b/examples/EmbeddedSendingDocumentGroupExample.java @@ -49,7 +49,7 @@ public static void main(String[] args) { /** Create an embedded sending link for the created document group. */ DocumentGroupEmbeddedSendingLinkPostRequest embeddedSendingRequest = - new DocumentGroupEmbeddedSendingLinkPostRequest("https://example.com", 15, "blank"); + new DocumentGroupEmbeddedSendingLinkPostRequest("https://example.com", 15, "self", "manage"); embeddedSendingRequest.withDocumentGroupId(groupId); DocumentGroupEmbeddedSendingLinkPostResponse embeddedSendingResponse = (DocumentGroupEmbeddedSendingLinkPostResponse) diff --git a/src/main/java/com/signnow/api/documentgroup/request/DocumentGroupRecipientsPutRequest.java b/src/main/java/com/signnow/api/documentgroup/request/DocumentGroupRecipientsPutRequest.java new file mode 100644 index 0000000..f0efb75 --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/request/DocumentGroupRecipientsPutRequest.java @@ -0,0 +1,101 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.request; + +import com.signnow.core.request.ApiEndpoint; +import com.signnow.core.request.RequestInterface; +import com.signnow.api.documentgroup.request.data.recipient.RecipientCollection; +import com.signnow.api.documentgroup.request.data.CcCollection; +import java.util.HashMap; +import java.util.Map; + +/** + * This class represents a request to update document group recipients. + * It implements the RequestInterface with Object type. + */ +@ApiEndpoint( + name = "updateDocumentGroupRecipients", + url = "/v2/document-groups/{document_group_id}/recipients", + method = "put", + auth = "bearer", + namespace = "documentGroup", + entity = "documentGroupRecipients", + type = "application/json") +public final class DocumentGroupRecipientsPutRequest implements RequestInterface { + + private final RecipientCollection recipients; + + private final CcCollection cc; + + private final HashMap uriParams = new HashMap<>(); + + /** + * Constructs a new DocumentGroupRecipientsPutRequest with the specified recipients and cc. + * + * @param recipients the collection of recipients + * @param cc the collection of cc + */ + public DocumentGroupRecipientsPutRequest(RecipientCollection recipients, CcCollection cc) { + this.recipients = recipients; + this.cc = cc; + } + + /** + * Returns the collection of recipients. + * + * @return the collection of recipients + */ + public RecipientCollection getRecipients() { + return this.recipients; + } + + /** + * Returns the collection of cc. + * + * @return the collection of cc + */ + public CcCollection getCc() { + return this.cc; + } + + /** + * Sets the document group ID in the URI parameters. + * + * @param documentGroupId the document group ID + * @return the current instance of DocumentGroupRecipientsPutRequest + */ + public DocumentGroupRecipientsPutRequest withDocumentGroupId(String documentGroupId) { + this.uriParams.put("document_group_id", documentGroupId); + return this; + } + + /** + * Returns a HashMap containing the URI parameters as key-value pairs. + * + * @return a HashMap containing the URI parameters + */ + @Override + public HashMap uriParams() { + return this.uriParams; + } + + /** + * Returns a Map with the payload of the request. + * + * @return a Map with the payload of the request + */ + @Override + public Map payload() { + Map map = new HashMap<>(); + map.put("recipients", this.getRecipients().toArray()); + map.put("cc", this.getCc().toArray()); + return map; + } +} diff --git a/src/main/java/com/signnow/api/documentgroup/request/data/CcCollection.java b/src/main/java/com/signnow/api/documentgroup/request/data/CcCollection.java new file mode 100644 index 0000000..0c0bbde --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/request/data/CcCollection.java @@ -0,0 +1,18 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.request.data; + +import com.signnow.core.collection.StringCollection; + +/** + * Represents a collection of strings for use in the signNow SDK API client. + * This class extends the functionality of the StringCollection class. + */ +public class CcCollection extends StringCollection {} diff --git a/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Attribute.java b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Attribute.java new file mode 100644 index 0000000..b09bb4a --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Attribute.java @@ -0,0 +1,196 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.request.data.recipient; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.signnow.core.data.ApiData; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * Represents the attributes of a recipient in a document group request. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public final class Attribute extends ApiData { + + @JsonProperty("allow_forwarding") + private final boolean allowForwarding; + + @JsonProperty("show_decline_button") + private final boolean showDeclineButton; + + @JsonProperty("i_am_recipient") + private final boolean iAmRecipient; + + @JsonProperty("message") + private final String message; + + @JsonProperty("subject") + private final String subject; + + @JsonProperty("expiration_days") + private final Integer expirationDays; + + @JsonProperty("reminder") + private final Reminder reminder; + + @JsonProperty("authentication") + private final Authentication authentication; + + /** + * Constructs an instance of Attribute. + * + * @param allowForwarding whether forwarding is allowed + * @param showDeclineButton whether the decline button is shown + * @param iAmRecipient whether the recipient is the current user + * @param message the message for the recipient + * @param subject the subject for the recipient + * @param expirationDays the expiration days for the recipient + * @param reminder the reminder for the recipient + * @param authentication the authentication for the recipient + */ + @JsonCreator + public Attribute( + @JsonProperty("allow_forwarding") boolean allowForwarding, + @JsonProperty("show_decline_button") boolean showDeclineButton, + @JsonProperty("i_am_recipient") boolean iAmRecipient, + @JsonProperty("message") String message, + @JsonProperty("subject") String subject, + @JsonProperty("expiration_days") Integer expirationDays, + @JsonProperty("reminder") Reminder reminder, + @JsonProperty("authentication") Authentication authentication) { + this.allowForwarding = allowForwarding; + this.showDeclineButton = showDeclineButton; + this.iAmRecipient = iAmRecipient; + this.message = message; + this.subject = subject; + this.expirationDays = expirationDays; + this.reminder = reminder; + this.authentication = authentication; + } + + /** + * Gets the message for the recipient. + * + * @return the message + */ + public String getMessage() { + return this.message; + } + + /** + * Gets the subject for the recipient. + * + * @return the subject + */ + public String getSubject() { + return this.subject; + } + + /** + * Gets the expiration days for the recipient. + * + * @return the expiration days + */ + public Integer getExpirationDays() { + return this.expirationDays; + } + + /** + * Gets the reminder for the recipient. + * + * @return the reminder + */ + public Reminder getReminder() { + return this.reminder; + } + + /** + * Checks if forwarding is allowed. + * + * @return true if forwarding is allowed, false otherwise + */ + public boolean isAllowForwarding() { + return this.allowForwarding; + } + + /** + * Checks if the decline button is shown. + * + * @return true if the decline button is shown, false otherwise + */ + public boolean isShowDeclineButton() { + return this.showDeclineButton; + } + + /** + * Checks if the recipient is the current user. + * + * @return true if the recipient is the current user, false otherwise + */ + public boolean isIAmRecipient() { + return this.iAmRecipient; + } + + /** + * Gets the authentication for the recipient. + * + * @return the authentication + */ + public Authentication getAuthentication() { + return this.authentication; + } + + /** + * Converts the attributes to a map. + * + * @return a map representation of the attributes + */ + @NotNull + @Override + public Map toMap() { + Map map = new LinkedHashMap<>(); + map.put("message", this.getMessage()); + map.put("subject", this.getSubject()); + map.put("expiration_days", this.getExpirationDays()); + map.put("reminder", this.getReminder()); + map.put("allow_forwarding", this.isAllowForwarding()); + map.put("show_decline_button", this.isShowDeclineButton()); + map.put("i_am_recipient", this.isIAmRecipient()); + map.put("authentication", this.getAuthentication()); + return map; + } + + /** + * Creates an instance of Attribute from a map. + * + * @param data the map containing attribute data + * @return an instance of Attribute + */ + @NotNull + @Contract("_ -> new") + public static Attribute fromMap(@NotNull Map data) { + return new Attribute( + (boolean) data.getOrDefault("allow_forwarding", false), + (boolean) data.getOrDefault("show_decline_button", false), + (boolean) data.getOrDefault("i_am_recipient", false), + (String) data.getOrDefault("message", ""), + (String) data.getOrDefault("subject", ""), + (Integer) data.get("expiration_days"), + (Reminder) data.get("reminder"), + (Authentication) data.get("authentication") + ); + } +} diff --git a/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Authentication.java b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Authentication.java new file mode 100644 index 0000000..da901b1 --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Authentication.java @@ -0,0 +1,129 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.request.data.recipient; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.signnow.core.data.ApiData; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * Represents the authentication data for a recipient. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public final class Authentication extends ApiData { + + @JsonProperty("type") + private final String type; + + @JsonProperty("value") + private final String value; + + @JsonProperty("phone") + private final String phone; + + @JsonProperty("method") + private final String method; + + /** + * Constructs an Authentication instance with the specified parameters. + * + * @param type the type of authentication + * @param value the value of the authentication + * @param phone the phone number associated with the authentication + * @param method the method of authentication + */ + @JsonCreator + public Authentication( + @JsonProperty("type") String type, + @JsonProperty("value") String value, + @JsonProperty("phone") String phone, + @JsonProperty("method") String method + ) { + this.type = type; + this.value = value; + this.phone = phone; + this.method = method; + } + + /** + * Gets the type of authentication. + * + * @return the type of authentication + */ + public String getType() { + return this.type; + } + + /** + * Gets the value of the authentication. + * + * @return the value of the authentication + */ + public String getValue() { + return this.value; + } + + /** + * Gets the phone number associated with the authentication. + * + * @return the phone number + */ + public String getPhone() { + return this.phone; + } + + /** + * Gets the method of authentication. + * + * @return the method of authentication + */ + public String getMethod() { + return this.method; + } + + /** + * Converts the authentication data to a map. + * + * @return a map representation of the authentication data + */ + @NotNull + @Override + public Map toMap() { + Map map = new LinkedHashMap<>(); + map.put("type", this.getType()); + map.put("value", this.getValue()); + map.put("phone", this.getPhone()); + map.put("method", this.getMethod()); + return map; + } + + /** + * Creates an Authentication instance from a map. + * + * @param data the map containing authentication data + * @return a new Authentication instance + */ + @NotNull + @Contract("_ -> new") + public static Authentication fromMap(@NotNull Map data) { + return new Authentication( + (String) data.get("type"), + (String) data.get("value"), + (String) data.getOrDefault("phone", ""), + (String) data.getOrDefault("method", "") + ); + } +} diff --git a/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Document.java b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Document.java new file mode 100644 index 0000000..af8ffff --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Document.java @@ -0,0 +1,112 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.request.data.recipient; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.signnow.core.data.ApiData; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * Represents a document with an ID, role, and action. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public final class Document extends ApiData { + + @JsonProperty("id") + private final String id; + + @JsonProperty("role") + private final String role; + + @JsonProperty("action") + private final String action; + + /** + * Constructs a new Document instance. + * + * @param id the document ID + * @param role the role associated with the document + * @param action the action associated with the document + */ + @JsonCreator + public Document( + @JsonProperty("id") String id, + @JsonProperty("role") String role, + @JsonProperty("action") String action + ) { + this.id = id; + this.role = role; + this.action = action; + } + + /** + * Gets the document ID. + * + * @return the document ID + */ + public String getId() { + return this.id; + } + + /** + * Gets the role associated with the document. + * + * @return the role + */ + public String getRole() { + return this.role; + } + + /** + * Gets the action associated with the document. + * + * @return the action + */ + public String getAction() { + return this.action; + } + + /** + * Converts the document to a map representation. + * + * @return a map containing the document's properties + */ + @NotNull + @Override + public Map toMap() { + Map map = new LinkedHashMap<>(); + map.put("id", this.getId()); + map.put("role", this.getRole()); + map.put("action", this.getAction()); + return map; + } + + /** + * Creates a Document instance from a map. + * + * @param data the map containing document properties + * @return a new Document instance + */ + @NotNull + @Contract("_ -> new") + public static Document fromMap(@NotNull Map data) { + return new Document( + (String) data.get("id"), + (String) data.get("role"), + (String) data.get("action") + ); + } +} diff --git a/src/main/java/com/signnow/api/documentgroup/request/data/recipient/DocumentCollection.java b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/DocumentCollection.java new file mode 100644 index 0000000..5021302 --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/DocumentCollection.java @@ -0,0 +1,22 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.request.data.recipient; + +import com.signnow.core.collection.TypedCollection; + +/** + * Represents a collection of Document objects. + * + *

This class extends the TypedCollection class to provide a collection specifically for Document + * objects. It ensures that only Document instances are added to the collection. + * + * @see com.signnow.core.collection.TypedCollection + */ +public class DocumentCollection extends TypedCollection {} diff --git a/src/main/java/com/signnow/api/documentgroup/request/data/recipient/EmailGroup.java b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/EmailGroup.java new file mode 100644 index 0000000..3187b87 --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/EmailGroup.java @@ -0,0 +1,74 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.request.data.recipient; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.signnow.core.data.ApiData; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * Represents an EmailGroup with an ID. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public final class EmailGroup extends ApiData { + + @JsonProperty("id") + private final String id; + + /** + * Constructs an EmailGroup with the specified ID. + * + * @param id the ID of the email group + */ + @JsonCreator + public EmailGroup(@JsonProperty("id") String id) { + this.id = id; + } + + /** + * Returns the ID of the email group. + * + * @return the ID + */ + public String getId() { + return this.id; + } + + /** + * Converts the EmailGroup to a map representation. + * + * @return a map containing the email group data + */ + @NotNull + @Override + public Map toMap() { + Map map = new LinkedHashMap<>(); + map.put("id", this.getId()); + return map; + } + + /** + * Creates an EmailGroup from a map representation. + * + * @param data the map containing the email group data + * @return a new EmailGroup instance + */ + @NotNull + @Contract("_ -> new") + public static EmailGroup fromMap(@NotNull Map data) { + return new EmailGroup((String) data.getOrDefault("id", "")); + } +} diff --git a/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Recipient.java b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Recipient.java new file mode 100644 index 0000000..caeda67 --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Recipient.java @@ -0,0 +1,164 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.request.data.recipient; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.signnow.core.data.ApiData; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * Represents a recipient in the document group request. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public final class Recipient extends ApiData { + + @JsonProperty("name") + private final String name; + + @JsonProperty("email") + private final String email; + + @JsonProperty("order") + private final int order; + + @JsonProperty("documents") + private final DocumentCollection documents; + + @JsonProperty("email_group") + private final EmailGroup emailGroup; + + @JsonProperty("attributes") + private final Attribute attributes; + + /** + * Constructs a new Recipient instance. + * + * @param name the name of the recipient + * @param email the email of the recipient + * @param order the order of the recipient + * @param documents the document collection associated with the recipient + * @param emailGroup the email group associated with the recipient + * @param attributes the attributes associated with the recipient + */ + @JsonCreator + public Recipient( + @JsonProperty("name") String name, + @JsonProperty("email") String email, + @JsonProperty("order") int order, + @JsonProperty("documents") DocumentCollection documents, + @JsonProperty("email_group") EmailGroup emailGroup, + @JsonProperty("attributes") Attribute attributes) { + this.name = name; + this.email = email; + this.order = order; + this.documents = documents; + this.emailGroup = emailGroup; + this.attributes = attributes; + } + + /** + * Gets the name of the recipient. + * + * @return the name of the recipient + */ + public String getName() { + return this.name; + } + + /** + * Gets the email of the recipient. + * + * @return the email of the recipient + */ + public String getEmail() { + return this.email; + } + + /** + * Gets the email group associated with the recipient. + * + * @return the email group associated with the recipient + */ + public EmailGroup getEmailGroup() { + return this.emailGroup; + } + + /** + * Gets the order of the recipient. + * + * @return the order of the recipient + */ + public int getOrder() { + return this.order; + } + + /** + * Gets the attributes associated with the recipient. + * + * @return the attributes associated with the recipient + */ + public Attribute getAttributes() { + return this.attributes; + } + + /** + * Gets the document collection associated with the recipient. + * + * @return the document collection associated with the recipient + */ + public DocumentCollection getDocuments() { + return this.documents; + } + + /** + * Converts the recipient data to a map. + * + * @return a map representation of the recipient data + */ + @NotNull + @Override + public Map toMap() { + Map map = new LinkedHashMap<>(); + map.put("name", this.getName()); + map.put("email", this.getEmail()); + map.put("email_group", this.getEmailGroup() != null ? this.getEmailGroup().toMap() : null); + map.put("order", this.getOrder()); + map.put("attributes", this.getAttributes() != null ? this.getAttributes().toMap() : null); + map.put("documents", this.getDocuments()); + return map; + } + + /** + * Creates a Recipient instance from a map. + * + * @param data the map containing recipient data + * @return a new Recipient instance + */ + @NotNull + @Contract("_ -> new") + public static Recipient fromMap(@NotNull Map data) { + return new Recipient( + (String) data.get("name"), + (String) data.get("email"), + (int) data.get("order"), + (DocumentCollection) data.get("documents"), + data.containsKey("email_group") ? EmailGroup.fromMap((Map) data.get("email_group")) : null, + data.containsKey("attributes") ? Attribute.fromMap((Map) data.get("attributes")) : null + ); + } + + +} diff --git a/src/main/java/com/signnow/api/documentgroup/request/data/recipient/RecipientCollection.java b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/RecipientCollection.java new file mode 100644 index 0000000..0d16105 --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/RecipientCollection.java @@ -0,0 +1,24 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.request.data.recipient; + +import com.signnow.core.collection.TypedCollection; + +/** + * Represents a collection of Recipient objects. + *

+ * This class extends the TypedCollection class, specifically for handling + * Recipient objects. + *

+ * + * @see com.signnow.core.collection.TypedCollection + */ +public class RecipientCollection extends TypedCollection { +} diff --git a/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Reminder.java b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Reminder.java new file mode 100644 index 0000000..d6929f5 --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/request/data/recipient/Reminder.java @@ -0,0 +1,112 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.request.data.recipient; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.signnow.core.data.ApiData; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * Represents a reminder with specific time intervals. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public final class Reminder extends ApiData { + + @JsonProperty("remind_after") + private final int remindAfter; + + @JsonProperty("remind_before") + private final int remindBefore; + + @JsonProperty("remind_repeat") + private final int remindRepeat; + + /** + * Constructs a new Reminder instance. + * + * @param remindAfter the time after which to remind + * @param remindBefore the time before which to remind + * @param remindRepeat the repeat interval for reminders + */ + @JsonCreator + public Reminder( + @JsonProperty("remind_after") int remindAfter, + @JsonProperty("remind_before") int remindBefore, + @JsonProperty("remind_repeat") int remindRepeat + ) { + this.remindAfter = remindAfter; + this.remindBefore = remindBefore; + this.remindRepeat = remindRepeat; + } + + /** + * Gets the time after which to remind. + * + * @return the remind after time + */ + public int getRemindAfter() { + return this.remindAfter; + } + + /** + * Gets the time before which to remind. + * + * @return the remind before time + */ + public int getRemindBefore() { + return this.remindBefore; + } + + /** + * Gets the repeat interval for reminders. + * + * @return the remind repeat interval + */ + public int getRemindRepeat() { + return this.remindRepeat; + } + + /** + * Converts the reminder data to a map. + * + * @return a map representation of the reminder data + */ + @NotNull + @Override + public Map toMap() { + Map map = new LinkedHashMap<>(); + map.put("remind_after", this.getRemindAfter()); + map.put("remind_before", this.getRemindBefore()); + map.put("remind_repeat", this.getRemindRepeat()); + return map; + } + + /** + * Creates a Reminder instance from a map. + * + * @param data the map containing reminder data + * @return a new Reminder instance + */ + @NotNull + @Contract("_ -> new") + public static Reminder fromMap(@NotNull Map data) { + return new Reminder( + (int) data.getOrDefault("remind_after", 0), + (int) data.getOrDefault("remind_before", 0), + (int) data.getOrDefault("remind_repeat", 0) + ); + } +} diff --git a/src/main/java/com/signnow/api/documentgroup/response/DocumentGroupRecipientsPutResponse.java b/src/main/java/com/signnow/api/documentgroup/response/DocumentGroupRecipientsPutResponse.java new file mode 100644 index 0000000..d396e9e --- /dev/null +++ b/src/main/java/com/signnow/api/documentgroup/response/DocumentGroupRecipientsPutResponse.java @@ -0,0 +1,45 @@ +/* + * This file is a part of signNow SDK API client. + * + * (с) Copyright © 2011-present airSlate Inc. (https://www.signnow.com) + * + * For more details on copyright, see LICENSE.md file + * that was distributed with this source code. + */ + +package com.signnow.api.documentgroup.response; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.signnow.api.documentgroup.response.data.data.Data; + +/** + * This class represents the response for putting document group recipients. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class DocumentGroupRecipientsPutResponse { + + /** + * The data associated with the document group recipients. + */ + @JsonProperty("data") + private final Data data; + + /** + * Constructs a new DocumentGroupRecipientsPutResponse with the specified data. + * + * @param data the data associated with the document group recipients. + */ + public DocumentGroupRecipientsPutResponse(@JsonProperty("data") Data data) { + this.data = data; + } + + /** + * Returns the data associated with the document group recipients. + * + * @return the data associated with the document group recipients. + */ + public Data getData() { + return this.data; + } +} diff --git a/src/main/java/com/signnow/api/documentgroup/response/data/data/Attribute.java b/src/main/java/com/signnow/api/documentgroup/response/data/data/Attribute.java index 950b5ed..9e08225 100644 --- a/src/main/java/com/signnow/api/documentgroup/response/data/data/Attribute.java +++ b/src/main/java/com/signnow/api/documentgroup/response/data/data/Attribute.java @@ -10,6 +10,7 @@ package com.signnow.api.documentgroup.response.data.data; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.signnow.core.data.ApiData; import java.util.LinkedHashMap; @@ -20,6 +21,7 @@ /** * This class represents the attributes of a document group. */ +@JsonIgnoreProperties(ignoreUnknown = true) public final class Attribute extends ApiData { /** diff --git a/src/main/java/com/signnow/api/documentgroup/response/data/data/EmailGroup.java b/src/main/java/com/signnow/api/documentgroup/response/data/data/EmailGroup.java index 231d0d4..3678646 100644 --- a/src/main/java/com/signnow/api/documentgroup/response/data/data/EmailGroup.java +++ b/src/main/java/com/signnow/api/documentgroup/response/data/data/EmailGroup.java @@ -10,6 +10,7 @@ package com.signnow.api.documentgroup.response.data.data; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.signnow.core.data.ApiData; import java.util.LinkedHashMap; @@ -20,6 +21,7 @@ /** * This class represents an EmailGroup which extends ApiData. */ +@JsonIgnoreProperties(ignoreUnknown = true) public final class EmailGroup extends ApiData { /** diff --git a/src/main/java/com/signnow/api/documentgroup/response/data/data/Recipient.java b/src/main/java/com/signnow/api/documentgroup/response/data/data/Recipient.java index 64244fb..70c279d 100644 --- a/src/main/java/com/signnow/api/documentgroup/response/data/data/Recipient.java +++ b/src/main/java/com/signnow/api/documentgroup/response/data/data/Recipient.java @@ -10,6 +10,7 @@ package com.signnow.api.documentgroup.response.data.data; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.signnow.core.data.ApiData; import java.util.LinkedHashMap; @@ -21,6 +22,7 @@ * Recipient class extends ApiData. * Represents a recipient of a document group. */ +@JsonIgnoreProperties(ignoreUnknown = true) public final class Recipient extends ApiData { /** diff --git a/src/main/java/com/signnow/api/documentgroup/response/data/data/Reminder.java b/src/main/java/com/signnow/api/documentgroup/response/data/data/Reminder.java index bc49013..455e857 100644 --- a/src/main/java/com/signnow/api/documentgroup/response/data/data/Reminder.java +++ b/src/main/java/com/signnow/api/documentgroup/response/data/data/Reminder.java @@ -10,6 +10,7 @@ package com.signnow.api.documentgroup.response.data.data; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.signnow.core.data.ApiData; import java.util.LinkedHashMap; @@ -21,6 +22,7 @@ * Reminder class extends ApiData. * It represents the reminder data in the document group response. */ +@JsonIgnoreProperties(ignoreUnknown = true) public final class Reminder extends ApiData { /** diff --git a/src/main/java/com/signnow/api/documentgroupinvite/response/data/invite/Action.java b/src/main/java/com/signnow/api/documentgroupinvite/response/data/invite/Action.java index 43f971b..17a6f8c 100644 --- a/src/main/java/com/signnow/api/documentgroupinvite/response/data/invite/Action.java +++ b/src/main/java/com/signnow/api/documentgroupinvite/response/data/invite/Action.java @@ -10,6 +10,7 @@ package com.signnow.api.documentgroupinvite.response.data.invite; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.signnow.core.data.ApiData; import java.util.LinkedHashMap; @@ -20,6 +21,7 @@ /** * This class represents an Action in the signNow API. */ +@JsonIgnoreProperties(ignoreUnknown = true) public final class Action extends ApiData { /** diff --git a/src/main/java/com/signnow/api/documentgroupinvite/response/data/invite/Invite.java b/src/main/java/com/signnow/api/documentgroupinvite/response/data/invite/Invite.java index 98b076b..d6a6397 100644 --- a/src/main/java/com/signnow/api/documentgroupinvite/response/data/invite/Invite.java +++ b/src/main/java/com/signnow/api/documentgroupinvite/response/data/invite/Invite.java @@ -10,6 +10,7 @@ package com.signnow.api.documentgroupinvite.response.data.invite; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.signnow.core.data.ApiData; import java.util.LinkedHashMap; @@ -20,6 +21,7 @@ /** * This class represents an Invite which extends ApiData. */ +@JsonIgnoreProperties(ignoreUnknown = true) public final class Invite extends ApiData { /** diff --git a/src/main/java/com/signnow/api/documentgrouptemplate/response/DocumentGroupTemplatePostResponse.java b/src/main/java/com/signnow/api/documentgrouptemplate/response/DocumentGroupTemplatePostResponse.java index aaa0671..2d232f6 100644 --- a/src/main/java/com/signnow/api/documentgrouptemplate/response/DocumentGroupTemplatePostResponse.java +++ b/src/main/java/com/signnow/api/documentgrouptemplate/response/DocumentGroupTemplatePostResponse.java @@ -9,6 +9,7 @@ package com.signnow.api.documentgrouptemplate.response; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.signnow.api.documentgrouptemplate.response.data.data.Data; @@ -31,7 +32,8 @@ public class DocumentGroupTemplatePostResponse { * * @param data the data associated with the document group template post response. */ - public DocumentGroupTemplatePostResponse(Data data) { + @JsonCreator + public DocumentGroupTemplatePostResponse(@JsonProperty("data") Data data) { this.data = data; } diff --git a/src/main/java/com/signnow/api/embeddedgroupinvite/request/data/invite/Signer.java b/src/main/java/com/signnow/api/embeddedgroupinvite/request/data/invite/Signer.java index 9a3a134..9795498 100644 --- a/src/main/java/com/signnow/api/embeddedgroupinvite/request/data/invite/Signer.java +++ b/src/main/java/com/signnow/api/embeddedgroupinvite/request/data/invite/Signer.java @@ -82,6 +82,12 @@ public final class Signer extends ApiData { @JsonProperty("redirect_target") private final String redirectTarget; + /** + * The delivery type of the signer (link, email). + */ + @JsonProperty("delivery_type") + private final String deliveryType; + /** * Constructor for the Signer class. * @@ -95,6 +101,7 @@ public final class Signer extends ApiData { * @param redirectUri The redirect URI of the signer. * @param declineRedirectUri The decline redirect URI of the signer. * @param redirectTarget The redirect target of the signer. + * @param deliveryType The delivery type of the signer (link, email). */ @JsonCreator public Signer( @@ -107,7 +114,8 @@ public Signer( @JsonProperty("required_preset_signature_name") String requiredPresetSignatureName, @JsonProperty("redirect_uri") String redirectUri, @JsonProperty("decline_redirect_uri") String declineRedirectUri, - @JsonProperty("redirect_target") String redirectTarget) { + @JsonProperty("redirect_target") String redirectTarget, + @JsonProperty("delivery_type") String deliveryType) { this.email = email; this.authMethod = authMethod; this.documents = documents; @@ -118,6 +126,7 @@ public Signer( this.redirectUri = redirectUri; this.declineRedirectUri = declineRedirectUri; this.redirectTarget = redirectTarget; + this.deliveryType = deliveryType; } /** @@ -145,6 +154,7 @@ public Signer( this.redirectUri = null; this.declineRedirectUri = null; this.redirectTarget = null; + this.deliveryType = null; } /** @@ -217,6 +227,13 @@ public String getRedirectTarget() { return this.redirectTarget; } + /** + * @return The delivery type of the signer (link, email). + */ + public String getDeliveryType() { + return this.deliveryType; + } + /** * Converts the Signer object to a Map. * @@ -236,6 +253,7 @@ public Map toMap() { map.put("redirect_uri", this.getRedirectUri()); map.put("decline_redirect_uri", this.getDeclineRedirectUri()); map.put("redirect_target", this.getRedirectTarget()); + map.put("delivery_type", this.getDeliveryType()); return map; } @@ -258,6 +276,7 @@ public static Signer fromMap(@NotNull Map data) { (String) data.getOrDefault("required_preset_signature_name", ""), (String) data.getOrDefault("redirect_uri", ""), (String) data.getOrDefault("decline_redirect_uri", ""), - (String) data.getOrDefault("redirect_target", "")); + (String) data.getOrDefault("redirect_target", ""), + (String) data.getOrDefault("delivery_type", "")); } -} \ No newline at end of file +} diff --git a/src/main/java/com/signnow/api/embeddedsending/request/DocumentGroupEmbeddedSendingLinkPostRequest.java b/src/main/java/com/signnow/api/embeddedsending/request/DocumentGroupEmbeddedSendingLinkPostRequest.java index b584395..507ef43 100644 --- a/src/main/java/com/signnow/api/embeddedsending/request/DocumentGroupEmbeddedSendingLinkPostRequest.java +++ b/src/main/java/com/signnow/api/embeddedsending/request/DocumentGroupEmbeddedSendingLinkPostRequest.java @@ -39,12 +39,15 @@ public final class DocumentGroupEmbeddedSendingLinkPostRequest implements Reques /** The redirect target for the request. */ private final String redirectTarget; + /** The type of the embedded link: manage (default), edit, send-invite. */ + private final String type; + /** The URI parameters for the request. */ private final HashMap uriParams = new HashMap<>(); /** * Constructs a new DocumentGroupEmbeddedSendingLinkPostRequest with the specified redirect URI, - * link expiration, and redirect target. + * link expiration, and redirect target, using default type 'manage'. * * @param redirectUri the redirect URI for the request * @param linkExpiration the link expiration time for the request @@ -55,6 +58,24 @@ public DocumentGroupEmbeddedSendingLinkPostRequest( this.redirectUri = redirectUri; this.linkExpiration = linkExpiration; this.redirectTarget = redirectTarget; + this.type = "manage"; + } + + /** + * Constructs a new DocumentGroupEmbeddedSendingLinkPostRequest with the specified redirect URI, + * link expiration, redirect target, and type. + * + * @param redirectUri the redirect URI for the request + * @param linkExpiration the link expiration time for the request + * @param redirectTarget the redirect target for the request + * @param type the type of the embedded link: manage (default), edit, send-invite + */ + public DocumentGroupEmbeddedSendingLinkPostRequest( + String redirectUri, int linkExpiration, String redirectTarget, String type) { + this.redirectUri = redirectUri; + this.linkExpiration = linkExpiration; + this.redirectTarget = redirectTarget; + this.type = type; } /** @@ -84,6 +105,15 @@ public String getRedirectTarget() { return this.redirectTarget; } + /** + * Returns the type for the request. + * + * @return the type for the request + */ + public String getType() { + return this.type; + } + /** * Adds the document group ID to the URI parameters. * @@ -118,6 +148,7 @@ public Map payload() { map.put("redirect_uri", this.getRedirectUri()); map.put("link_expiration", this.getLinkExpiration()); map.put("redirect_target", this.getRedirectTarget()); + map.put("type", this.getType()); return map; } } diff --git a/src/test/java/com/signnow/mock/faker/SignNowFaker.java b/src/test/java/com/signnow/mock/faker/SignNowFaker.java index eec7e29..0618388 100644 --- a/src/test/java/com/signnow/mock/faker/SignNowFaker.java +++ b/src/test/java/com/signnow/mock/faker/SignNowFaker.java @@ -897,7 +897,9 @@ public CompletionEmailCollection documentGroupInviteGroupInviteCompletionEmails( var signers = new com.signnow.api.embeddedgroupinvite.request.data.invite.SignerCollection(); signers.add( new com.signnow.api.embeddedgroupinvite.request.data.invite.Signer( - this.email(), this.authMethod(), documents, this.firstName(), this.lastName())); + this.email(), this.authMethod(), documents, this.firstName(), this.lastName(), + this.language(), this.string(), this.redirectUri(), this.declineRedirectUri(), + this.redirectTarget(), this.string())); var embeddedGroupInvites = new com.signnow.api.embeddedgroupinvite.request.data.invite.InviteCollection(); diff --git a/src/test/resources/wiremock/mappings/update_document_group_recipients_put.json b/src/test/resources/wiremock/mappings/update_document_group_recipients_put.json new file mode 100644 index 0000000..b7b2925 --- /dev/null +++ b/src/test/resources/wiremock/mappings/update_document_group_recipients_put.json @@ -0,0 +1,13 @@ +{ + "request": { + "method": "PUT", + "urlPathPattern": "/v2/document-groups/[0-9a-z]{40}/recipients" + }, + "response": { + "status": 200, + "body": "{\"data\":{\"recipients\":[{\"name\":\"molestiae\",\"email\":\"udaugherty@gmail.com\",\"email_group\":{\"id\":\"02c9bc5e05f7e83897b324bba9f6665a4b9b671e\"},\"order\":86425,\"attributes\":{\"message\":\"qui\",\"subject\":\"nihil\",\"expiration_days\":8556,\"reminder\":{\"remind_after\":95281,\"remind_before\":6116,\"remind_repeat\":91025},\"allow_forwarding\":false,\"show_decline_button\":true,\"i_am_recipient\":true,\"authentication\":{\"type\":\"consequatur\",\"value\":\"vel\",\"phone\":\"voluptas\",\"method\":\"explicabo\"}},\"documents\":[{\"id\":\"b667c03e2551fead0d0f2af5d6aeb681058cf5a2\",\"role\":\"fuga\",\"action\":\"in\"}]}],\"unmapped_documents\":[{\"id\":\"f03e83b3f3aa56e94f7a658eb1c3b9fde7959881\",\"role\":\"maiores\",\"action\":\"dolorem\"}],\"allowed_unmapped_sign_documents\":[{\"id\":\"f7872e68c3079f03bcc12f1f284def5cdb566d26\",\"role\":\"labore\",\"recipient\":\"quaerat\"}],\"cc\":[\"omnis\"]}}", + "headers": { + "Content-Type": "application/json" + } + } +}