docusign

package module
v0.0.0-...-d3390cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2017 License: BSD-3-Clause Imports: 15 Imported by: 0

README

Docusign Rest Api version 2 in Go

Examples may be found in the example_test.go file.

Documentation

Overview

docusign implements a service to use the version 2 Docusign rest api. Api documentation may be found at: https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm

Index

Examples

Constants

View Source
const ReturnUrlTypeCancel = "cancel"
View Source
const ReturnUrlTypeDecline = "decline"
View Source
const ReturnUrlTypeError = "error"
View Source
const ReturnUrlTypeException = "exception"
View Source
const ReturnUrlTypeFaxPending = "fax_pending"
View Source
const ReturnUrlTypeIdCheckFailed = "id_check_failed"
View Source
const ReturnUrlTypeSave = "save"
View Source
const ReturnUrlTypeSend = "send"
View Source
const ReturnUrlTypeSessionEnd = "sessionEnd"
View Source
const ReturnUrlTypeSessionTimeout = "session_timeout"
View Source
const ReturnUrlTypeSigningComplete = "signing_complete"
View Source
const ReturnUrlTypeTTLExpired = "ttl_expired"
View Source
const ReturnUrlTypeViewComplete = "view_complete"
View Source
const (
	Version = "0.5"
)

Variables

View Source
var CallLogger ctxKeyLogger
View Source
var DefaultCtx = context.Background()

DefaultCtx is the default context you should supply if not using your own context.Context (see https://golang.org/x/net/context).

View Source
var EnvelopeDocumentCombinedShowChanges = EnvelopeDocumentsCombinedParam{
	Name:  "show_changes",
	Value: "true",
}
View Source
var EnvelopeDocumentShowChanges = EnvelopeDocumentParam{
	Name:  "show_changes",
	Value: "true",
}
View Source
var EnvelopeDocumentsCombinedCert = EnvelopeDocumentsCombinedParam{
	Name:  "certificate",
	Value: "true",
}
View Source
var EnvelopeDocumentsCombinedWatermark = EnvelopeDocumentsCombinedParam{
	Name:  "watermark",
	Value: "true",
}
View Source
var EnvelopeSearchIncludeRecipients = SearchFolderParam{
	Name:  "include_recipients",
	Value: "true",
}
View Source
var EnvelopeSearchOrderAsc = SearchFolderParam{
	Name:  "order",
	Value: "asc",
}
View Source
var EnvelopeSearchOrderByActionRequired = SearchFolderParam{
	Name:  "order_by",
	Value: "action_required",
}
View Source
var EnvelopeSearchOrderByCompleted = SearchFolderParam{
	Name:  "order_by",
	Value: "completed",
}
View Source
var EnvelopeSearchOrderByCreated = SearchFolderParam{
	Name:  "order_by",
	Value: "created",
}
View Source
var EnvelopeSearchOrderBySent = SearchFolderParam{
	Name:  "order_by",
	Value: "sent",
}
View Source
var EnvelopeSearchOrderBySignerList = SearchFolderParam{
	Name:  "order_by",
	Value: "signer_list",
}
View Source
var EnvelopeSearchOrderByStatus = SearchFolderParam{
	Name:  "order_by",
	Value: "status",
}
View Source
var EnvelopeSearchOrderBySubject = SearchFolderParam{
	Name:  "order_by",
	Value: "subject",
}
View Source
var EnvelopeSearchOrderDesc = SearchFolderParam{
	Name:  "order",
	Value: "desc",
}
View Source
var FolderTemplatesInclude = FolderTemplateParam{Name: "template", Value: "include"}
View Source
var FolderTemplatesOnly = FolderTemplateParam{Name: "template", Value: "only"}
View Source
var HTTPClient ctxKeyHTTPClient

HTTPClient is the context key to use with golang.org/x/net/context's WithValue function to associate an *http.Client value with a context.

View Source
var LoginInformationAcctGUID = LoginInfoParam{
	Name:  "include_account_id_guid",
	Value: "true",
}
View Source
var LoginInformationIncludeApiPassword = LoginInfoParam{
	Name:  "api_password",
	Value: "true",
}
View Source
var LoginInformationSettingsAll = LoginInfoParam{
	Name:  "login_settings",
	Value: "all",
}
View Source
var LoginInformationSettingsNone = LoginInfoParam{
	Name:  "login_settings",
	Value: "none",
}
View Source
var RecipientsIncludeAnchorTabs = RecipientsParam{
	Name:  "include_anchor_tab_locations",
	Value: "true",
}
View Source
var RecipientsIncludeExtended = RecipientsParam{
	Name:  "include_extended",
	Value: "true",
}
View Source
var RecipientsIncludeTabs = RecipientsParam{
	Name:  "include_tabs",
	Value: "true",
}
View Source
var RecipientsResend = RecipientsParam{
	Name:  "resend_envelope",
	Value: "true",
}
View Source
var TemplateSearchFilterAll = TemplateSearchParam{
	Name:  "user_filter",
	Value: "all",
}
View Source
var TemplateSearchFilterOwned = TemplateSearchParam{
	Name:  "user_filter",
	Value: "owned_by_me",
}
View Source
var TemplateSearchFilterSharedWithMe = TemplateSearchParam{
	Name:  "user_filter",
	Value: "shared_with_me",
}
View Source
var TemplateSearchNotSharedByMe = TemplateSearchParam{
	Name:  "shared_by_me",
	Value: "false",
}
View Source
var TemplateSearchOrderAsc = TemplateSearchParam{
	Name:  "order",
	Value: "asc",
}
View Source
var TemplateSearchOrderByModified = TemplateSearchParam{
	Name:  "orderby",
	Value: "modified",
}
View Source
var TemplateSearchOrderByName = TemplateSearchParam{
	Name:  "orderby",
	Value: "name",
}
View Source
var TemplateSearchOrderByUsed = TemplateSearchParam{
	Name:  "orderby",
	Value: "used",
}
View Source
var TemplateSearchOrderDesc = TemplateSearchParam{
	Name:  "order",
	Value: "desc",
}
View Source
var TemplateSearchSharedByMe = TemplateSearchParam{
	Name:  "shared_by_me",
	Value: "true",
}

Functions

func DsQueryTimeFormat

func DsQueryTimeFormat(t time.Time) string

DsQueryTimeFormat returns a string in the correct format for a querystring format

Types

type AddressInformation

type AddressInformation struct {
	Street1  string `json:"street1,omitempty"`
	Street2  string `json:"street2,omitempty"`
	City     string `json:"city,omitempty"`
	State    string `json:"state,omitempty"`
	Zip      string `json:"zip,omitempty"`
	ZipPlus4 string `json:"zipPlus4,omitempty"`
}

type AddressInformationInput

type AddressInformationInput struct {
	InformationInput
	AddressInformation *AddressInformation `json:"addressInformation,omitempty"`
}

type Agent

type Agent struct {
	EmailRecipient
	CanEditRecipientEmails DSBool `json:"canEditRecipientEmails,omitempty"`
	CanEditRecipientNames  DSBool `json:"canEditRecipientNames,omitempty"`
}

Agent can add name and email information for recipients that appear after the recipient in routing order. RestApi Documetation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Recipients/Agent%20Recipient.htm

type ApproveTab

type ApproveTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ButtonText string `json:"buttonText,omitempty"`
	Height     int    `json:"height,omitempty"`
	Width      int    `json:"width,omitempty"`
}

Approve button tab

type AuditEvent

type AuditEvent struct {
	EventFields []NmVal `json:"eventFields,omitempty"`
}

type AuditEventList

type AuditEventList struct {
	AuditEvents []AuditEvent `json:"auditEvents,omitempty"`
}

type BaseConditionalTab

type BaseConditionalTab struct {
	ConditionalParentLabel string `json:"conditionalParentLabel,omitempty"`
	ConditionalParentValue string `json:"conditionalParentValue,omitempty"`
}

Conditional value fields

type BasePosTab

type BasePosTab struct {
	AnchorIgnoreIfNotPresent string `json:"anchorIgnoreIfNotPresent,omitempty"`
	AnchorString             string `json:"anchorString,omitempty"`
	AnchorUnits              string `json:"anchorUnits,omitempty"`
	AnchorXOffset            string `json:"anchorXOffset,omitempty"`
	AnchorYOffset            string `json:"anchorYOffset,omitempty"`
	PageNumber               string `json:"pageNumber,omitempty"`
	XPosition                string `json:"xPosition,omitempty"`
	YPosition                string `json:"yPosition,omitempty"`
	TabId                    string `json:"tabId,omitempty"`
}

BasePosTab contains positioning fields for tabs

type BaseSigner

type BaseSigner struct {
	AutoNavigation     string `json:"autoNavigation,omitempty"`
	DefaultRecipient   string `json:"defaultRecipient,omitempty"`
	SignInEachLocation string `json:"signInEachLocation,omitempty"`
	SignerEmail        string `json:"signerEmail,omitempty"`
	SignerName         string `json:"signerName,omitempty"`
	Tabs               *Tabs  `json:"tabs,omitempty"`
}

BaseSigner contains common fields of all signer types

type BaseStyleTab

type BaseStyleTab struct {
	Bold      DSBool `json:"bold,omitempty"`
	Font      string `json:"font,omitempty"`
	FontColor string `json:"fontColor,omitempty"`
	FontSize  string `json:"fontSize,omitempty"`
	Italic    DSBool `json:"italic,omitempty"`
	Name      string `json:"name,omitempty"`
	Underline DSBool `json:"underline,omitempty"`
}

Style fields

type BaseTab

type BaseTab struct {
	DocumentID   string         `json:"documentID,omitempty"`
	TabLabel     string         `json:"tabLabel,omitempty"`
	ErrorDetails *ResponseError `json:"errorDetails,omitempty"`
}

BaseTab fields

type BaseTemplateTab

type BaseTemplateTab struct {
	RecipientID      string `json:"recipientID,omitempty"`
	TemplateLocked   DSBool `json:"templateLocked,omitempty"`
	TemplateRequired DSBool `json:"templaterequired,omitempty"`
}

template related fields

type BccEmail

type BccEmail struct {
	BccEmailAddressId string `json:"bccEmailAddressId,omitempty"`
	Email             string `json:"email,omitempty"`
}

type Call

type Call struct {
	Method string

	Payload interface{}
	// Result may be either
	Result interface{}
	// uploaded files for a call
	Files []*UploadFile
	// relative url for the call
	URL *url.URL
}

Call provides all needed fields to make a call. To debug a call simply set the Result to an **http.Response.

func (Call) Do

func (c Call) Do(ctx context.Context, s *Service) error

Do executes the call. Response data is encoded into the call's Result. If Result is a **http.Response, the response is returned without processing.

type CarbonCopy

type CarbonCopy struct {
	EmailRecipient
}

CarbonCopy receives a copy of the envelope when the envelope reaches the recipient’s order in the process flow and when the envelope is completed. RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Recipients/Carbon%20Copies%20Recipient.htm

type CertifiedDelivery

type CertifiedDelivery struct {
	EmailRecipient
	CanEditRecipientEmails DSBool `json:"canEditRecipientEmails,omitempty"`
	CanEditRecipientNames  DSBool `json:"canEditRecipientNames,omitempty"`
}

CertifiedDeliveryr receives the completed documents for the envelope to be completed RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Recipients/Certified%20Deliveries%20Recipient.htm

type CheckboxTab

type CheckboxTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	Locked                          DSBool `json:"locked"`
	MergeFieldXml                   string `json:"mergeFieldXml,omitempty"`
	RequireInitialOnSharedTabChange DSBool `json:"requireInitialOnSharedTabChange,omitempty"`
	Selected                        DSBool `json:"selected,omitempty"`
	Shared                          DSBool `json:"shared,omitempty"`
}

Checkbox

func (CheckboxTab) NmVal

func (c CheckboxTab) NmVal() NmVal

type CompanyTab

type CompanyTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ConcealValueOnDocument DSBool `json:"concealValueOnDocument,omitempty"`
	DisableAutoSize        DSBool `json:"disableAutoSize,omitempty"`
	Locked                 DSBool `json:"locked"`
	Required               DSBool `json:"required"`
	Value                  string `json:"value,omitempty"`
	Width                  int    `json:"width,omitempty"`
}

Company information tab - just a stylized text tab

func (CompanyTab) NmVal

func (c CompanyTab) NmVal() NmVal

type CompositeTemplate

type CompositeTemplate struct {
	CompositeTemplateId         string           `json:"compositeTemplateId,omitempty"`
	ServerTemplates             []ServerTemplate `json:"serverTemplates,omitempty"`
	InlineTemplates             []InlineTemplate `json:"inlineTemplates,omitempty"`
	PdfMetaDataTemplateSequence string           `json:"pdfMetaDataTemplateSequence,omitempty"`
	Document                    Document         `json:"document,omitempty"`
}

type Config

type Config struct {
	// The docusign account used by the login user.  This may be
	// found using the LoginInformation call.
	AccountId     string `json:"acctId,omitempty"`
	IntegratorKey string `json:"key"`
	UserName      string `json:"user"`
	Password      string `json:"pwd"`
	Host          string `json:"host,omitempty"`
}

Config provides methods to authenticate via a user/password combination. It may also be used to generate an OauthCredential. Documentation: https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#SOBO/Send On Behalf Of Functionality in the DocuSign REST API.htm

Example
package main

import (
	"fmt"
	"log"

	"github.com/Wealthforge-Technologies/docusign"
	"golang.org/x/net/context"
)

func main() {
	ctx := context.Background()
	config := &docusign.Config{
		UserName:      "YOUR_USER_NAME",
		Password:      "YOUR_PASSWORD",
		IntegratorKey: "YOUR_INTEGRATOR_KEY",
		AccountId:     "YOUR_ACCOUNT_ID",
		Host:          "YOUR_HOST", // NOTE: set to 'demo.docusign.net' for non-prod tests
	}

	// create service using config as credential
	sv := docusign.New(config, "")

	folderList, err := sv.FolderList(ctx, docusign.FolderTemplatesInclude)
	if err != nil {
		log.Fatal(err)
	}
	for _, fld := range folderList.Folders {
		fmt.Printf("%s: %s\n", fld.FolderId, fld.Name)
	}

	// obtain a new oauth credential
	token, err := config.OauthCredential(ctx)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("Token: %s\n", token.AccessToken)
}
Output:

func (Config) Authorize

func (c Config) Authorize(req *http.Request, onBehalfOf string)

Authorize adds authorization headers to a rest request using user/password functionality.

func (*Config) OauthCredential

func (c *Config) OauthCredential(ctx context.Context) (*OauthCredential, error)

OauthCredential retrieves an OauthCredential from docusign using the username and password from Config. The returned token does not have a expiration although it may be revoked via

func (*Config) OauthCredentialOnBehalfOf

func (c *Config) OauthCredentialOnBehalfOf(ctx context.Context, oauthCred OauthCredential, nm string) (*OauthCredential, error)

OauthCredentialOnBehalfOf returns an *OauthCredential for the user name specied by nm. oauthCred must be a credential for a user with administrative rights on the account.

type ConnectData

type ConnectData struct {
	EnvelopeStatus EnvelopeStatusXml `xml:"EnvelopeStatus" json:"envelopeStatus,omitempty"`
	DocumentPdfs   []DocumentPdfXml  `xml:"DocumentPDFs>DocumentPDF" json:"documentPdfs,omitempty"`
}

Connect Data is the top level struct for a Connect status message.

type Credential

type Credential interface {
	// Authorize attaches an authorization header to a request and
	// and fixes the URL to the appropriate host.
	Authorize(*http.Request, string)
}

Credential add an authorization header(s) for a rest http request

type CustomDocumentField

type CustomDocumentField struct {
	NmVal
	ErrorDetails *ResponseError `json:errorDetails,omitempty"`
}

type CustomField

type CustomField struct {
	Id           string         `json:"fieldId,omitempty"`
	Name         string         `json:"name,omitempty"`
	Required     string         `json:"required,omitempty"`
	Show         string         `json:"show,omitempty"`
	Value        string         `json:"value,omitempty"`
	ErrorDetails *ResponseError `json:"errorDetails,omitempty"`
}

type CustomFieldList

type CustomFieldList struct {
	ListCustomFields []ListCustomField `json:"listCustomFields,omitempty"`
	TextCustomFields []CustomField     `json:"textCustomFields,omitempty"`
}

type CustomFieldXml

type CustomFieldXml struct {
	Name     string `xml:"Name" json:"name,omitempty"`
	Value    string `xml:"Value" json:"value,omitempty"`
	Show     bool   `xml:"Show" json:"show,omitempty"`
	Required bool   `xml:"Required" json:"required,omitempty"`
}

type DSBool

type DSBool bool

DSBool is used to fix problem of capitalized DSBooleans in json. Unmarshals "True" and "true" as true, any other value returns false

func (*DSBool) UnmarshalJSON

func (d *DSBool) UnmarshalJSON(b []byte) error

type DSTime

type DSTime string

DSTime handles the multiple datetime formats that DS returns in the Connect service.

func (DSTime) Time

func (d DSTime) Time() (tm time.Time)

type DateSignedTab

type DateSignedTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	Value string `json:"value,omitempty"`
}

Auto filled date tab

type DateTab

type DateTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ConcealValueOnDocument          DSBool `json:"concealValueOnDocument,omitempty"`
	DisableAutoSize                 DSBool `json:"disableAutoSize,omitempty"`
	Height                          string `json:"height,omitempty"`
	Locked                          DSBool `json:"locked"`
	MergeFieldXml                   string `json:"mergeFieldXml,omitempty"`
	Required                        DSBool `json:"required"`
	RequireInitialOnSharedTabChange DSBool `json:"requireInitialOnSharedTabChange,omitempty"`
	Shared                          DSBool `json:"shared,omitempty"`
	Value                           string `json:"value,omitempty"`
	Width                           int    `json:"width,omitempty"`
}

User updateable date value tab

func (DateTab) NmVal

func (d DateTab) NmVal() NmVal

type DeclineTab

type DeclineTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ButtonText string `json:"buttonText,omitempty"`
	Height     int    `json:"height,omitempty"`
	Width      int    `json:"width,omitempty"`
}

Decline button tab

type DobInformationInput

type DobInformationInput struct {
	InformationInput
	DateOfBirth string `json:"dateOfBirth,omitempty"`
}

type Document

type Document struct {
	Name                    string     `json:"name,omitempty"`
	DocumentId              string     `json:"documentId,omitempty"`
	RemoteUrl               string     `json:"remoteUrl,omitempty"`
	Order                   string     `json:"order,omitempty"`
	TransformPdfFields      string     `json:"transformPdfFields,omitempty"`
	DocumentFields          []NmVal    `json:"documentFields,omitempty"`
	EncryptedWithKeyManager string     `json:"encryptedWithKeyManager,omitempty"`
	Pages                   string     `json:"pages,omitempty"`
	FileExtension           string     `json:"fileExtension,omitempty"`
	DocumentBase64          []byte     `json:"documentBase64,omitempty"`
	Matchboxes              []Matchbox `json:"matchboxes,omitempty"`
}

RestApi documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Document%20Parameters.htm

type DocumentAsset

type DocumentAsset struct {
	Name         string         `json:"name,omitempty"`
	Type         string         `json:"type,omitempty"`
	DocumentId   string         `json:"documentId,omitempty"`
	Order        string         `json:"order,omitempty"`
	Pages        string         `json:"pages,omitempty"`
	Uri          string         `json:"uri:omitempty"`
	ErrorDetails *ResponseError `json:errorDetails,omitempty"`
}

type DocumentAssetList

type DocumentAssetList struct {
	EnvelopeId        string          `json:"EnvelopeId,omitempty"`
	EnvelopeDocuments []DocumentAsset `json:"envelopeDocuments,omitempty"`
}

type DocumentFieldList

type DocumentFieldList struct {
	DocumentFields []CustomDocumentField `json:documentFields,omitempty"`
}

type DocumentList

type DocumentList struct {
	//EnvelopeId string     `json:"envelopeId,omitempty"`
	Documents []Document `json:"documents,omitempty"`
}

type DocumentPdfXml

type DocumentPdfXml struct {
	Name     string `xml:"Name" json:"name,omitempty"`
	PDFBytes string `xml:"PDFBytes" json:"pdfBytes,omitempty"`
}

DocumentPdfXML contains the base64 enocded pdf files.

type DocumentStatusXml

type DocumentStatusXml struct {
	ID           string `xml:"ID" json:"id,omitempty"`
	Name         string `xml:"Name"RecipientAttachment json:"name,omitempty"`
	TemplateName string `xml:"TemplateName" json:"templateName,omitempty"`
	Sequence     string `xml:"Sequence" json:"sequence,omitempty"`
}

DocumentStatusXml describes each document in the envelope.

type Editor

type Editor struct {
	EmailRecipient
	CanEditRecipientEmails DSBool `json:"canEditRecipientEmails,omitempty"`
	CanEditRecipientNames  DSBool `json:"canEditRecipientNames,omitempty"`
}

Editor can add name and email information, add or change the routing order and set authentication options for the remaining recipients. RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Recipients/Editors%20Recipient.htm

type EmailAddressTab

User updateable email address

type EmailNotification

type EmailNotification struct {
	EmailBody         string `json:"emailBody,omitempty"`
	EmailSubject      string `json:"emailSubject,omitempty"`
	SupportedLanguage string `json:"supportedLanguage,omitempty"`
}

EmailNotification contains the email message sent to a recipient. If not set, the envelopes EmailBlurb and EmailSubject are used.

type EmailRecipient

type EmailRecipient struct {
	Recipient
	Email string `json:"email,omitempty"`
}

EmailRecipient adds email field to base recipient structure

type EmailSetting

type EmailSetting struct {
	ReplyEmailAddressOverride string `json:"replyEmailAddressOverride,omitempty"`
	ReplyEmailNameOverride    string `json:"replyEmailNameOverride,omitempty"`
	BccEmailAddresses         string `json:"bccEmailAddresses,omitempty"`
}

Documentation: https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Add%20Email%20Setting%20Overrides%20to%20an%20Envelope.htm

type EmailTab

type EmailTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ConcealValueOnDocument          DSBool `json:"concealValueOnDocument,omitempty"`
	DisableAutoSize                 DSBool `json:"disableAutoSize,omitempty"`
	Height                          int    `json:"height,omitempty"`
	Locked                          DSBool `json:"locked"`
	MergeFieldXml                   string `json:"mergeFieldXml,omitempty"`
	Required                        DSBool `json:"required"`
	RequireInitialOnSharedTabChange DSBool `json:"requireInitialOnSharedTabChange,omitempty"`
	Shared                          DSBool `json:"shared,omitempty"`
	Value                           string `json:"value,omitempty"`
	Width                           int    `json:"width,omitempty"`
}

User email display tab

func (EmailTab) NmVal

func (e EmailTab) NmVal() NmVal

type EnvRecipientView

type EnvRecipientView struct {
	ClientUserId          string        `json:"clientUserId,omitempty"`
	AuthenticationMethod  string        `json:"authenticationMethod,omitempty"`
	AssertionId           string        `json:"assertionId,omitempty"`
	AuthenticationInstant time.Time     `json:"authenticationInstant,omitempty"`
	SecurityDomain        string        `json:"securityDomain,omitempty"`
	Email                 string        `json:"email,omitempty"`
	UserId                string        `json:"userId,omitempty"`
	UserName              string        `json:"userName,omitempty"`
	ReturnUrl             ReturnUrlType `json:"returnUrl,omitempty"`
}

EnvRecipientView is used to create a url for a recipient. See PostRecipientView

type EnvUrl

type EnvUrl struct {
	Url string `json:"url,omitempty"`
}

EnvUrl is a url for an envelope view.

type Envelope

type Envelope struct {
	Accessibility           string              `json:"accessibility,omitempty"`
	AllowMarkup             string              `json:"allowMarkup,omitempty"`
	AllowReassign           string              `json:"allowReassign,omitempty"`
	AllowRecipientRecursion string              `json:"allowRecipientRecursion,omitempty"`
	Asynchronous            string              `json:"asynchronous,omitempty"`
	AuthoritativeCopy       string              `json:"authoritativeCopy,omitempty"`
	AutoNavigation          string              `json:"autoNavigation,omitempty"`
	BrandId                 string              `json:"brandId,omitempty"`
	EmailBlurb              string              `json:"emailBlurb,omitempty"`
	EmailSubject            string              `json:"emailSubject,omitempty"`
	EnableWetSign           string              `json:"enableWetSign,omitempty"`
	EnforceSignerVisibility string              `json:"enforceSignerVisibility,omitempty"`
	EnvelopeIdStamping      string              `json:"envelopeIdStamping,omitempty"`
	MessageLock             string              `json:"messageLock,omitempty"`
	Notification            *Notification       `json:"notification,omitempty"`
	RecipientsLock          string              `json:"recipientsLock,omitempty"`
	SigningLocation         string              `json:"signingLocation,omitempty"`
	Status                  string              `json:"status,omitempty"`
	TransactionId           string              `json:"transactionId,omitempty"`
	UseDisclosure           bool                `json:"useDisclosure,omitempty"`
	CustomFields            *CustomFieldList    `json:"customFields,omitempty"`
	Documents               []Document          `json:"documents,omitempty"`
	Recipients              *RecipientList      `json:"recipients,omitempty"`
	EventNotification       *EventNotification  `json:"eventNotification,omitempty"`
	EmailSettings           *EmailSetting       `json:"emailSettings,omitempty"`
	TemplateId              string              `json:"templateId,omitempty"`
	TemplateRoles           []TemplateRole      `json:"templateRoles,omitempty"`
	CompositeTemplates      []CompositeTemplate `json:"compositeTemplates,omitempty"`
}

https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Send%20an%20Envelope.htm

type EnvelopeDocumentParam

type EnvelopeDocumentParam NmVal

type EnvelopeDocumentsCombinedParam

type EnvelopeDocumentsCombinedParam NmVal

type EnvelopeEvent

type EnvelopeEvent struct {
	StatusCode       string `json:"envelopeEventStatusCode,omitempty"`
	IncludeDocuments string `json:"includeDocuments,omitempty"`
}

type EnvelopeIdTab

type EnvelopeIdTab struct {
	BaseTab
	BasePosTab
}

Id display tab

type EnvelopeList

type EnvelopeList struct {
	Envelopes []EnvelopeUris `json:"envelopes"`
}

type EnvelopeResponse

type EnvelopeResponse struct {
	EnvelopeId     string    `json:"envelopeId,omitempty"`
	Status         string    `json:"status,omitempty"`
	StatusDateTime time.Time `json:"statusDateTime,omitempty"`
	Uri            string    `json:"uri,omitempty"`
}

type EnvelopeStatusChangesParam

type EnvelopeStatusChangesParam NmVal

func StatusChangeCustomField

func StatusChangeCustomField(fldName, fldValue string) EnvelopeStatusChangesParam

func StatusChangeEnvelope

func StatusChangeEnvelope(envId string) EnvelopeStatusChangesParam

func StatusChangeFromDate

func StatusChangeFromDate(t time.Time) EnvelopeStatusChangesParam

func StatusChangeFromToStatus

func StatusChangeFromToStatus(status string) EnvelopeStatusChangesParam

func StatusChangeStatusCode

func StatusChangeStatusCode(status string) EnvelopeStatusChangesParam

func StatusChangeToDate

func StatusChangeToDate(t time.Time) EnvelopeStatusChangesParam

func StatusChangeTransactionId

func StatusChangeTransactionId(transactionIds ...string) EnvelopeStatusChangesParam

type EnvelopeStatusXml

type EnvelopeStatusXml struct {
	TimeGenerated      DSTime               `xml:"TimeGenerated" json:"timeGenerated,omitempty"`
	EnvelopeID         string               `xml:"EnvelopeID" json:"envelopeID,omitempty"`
	Subject            string               `xml:"Subject" json:"subject,omitempty"`
	UserName           string               `xml:"UserName" json:"userName,omitempty"`
	Email              string               `xml:"Email" json:"email,omitempty"`
	Status             string               `xml:"Status" json:"status,omitempty"`
	Created            DSTime               `xml:"Created" json:"created,omitempty"`
	Sent               DSTime               `xml:"Sent" json:"sent,omitempty"`
	Delivered          DSTime               `xml:"Delivered" json:"delivered,omitempty"`
	Signed             DSTime               `xml:"Signed" json:"signed,omitempty"`
	Completed          DSTime               `xml:"Completed" json:"completed,omitempty"`
	ACStatus           string               `xml:"ACStatus" json:"acStatus,omitempty"`
	ACStatusDate       string               `xml:"ACStatusDate" json:"acStatusDate,omitempty"`
	ACHolder           string               `xml:"ACHolder" json:"acHolder,omitempty"`
	ACHolderEmail      string               `xml:"ACHolderEmail" json:"acHolderEmail,omitempty"`
	ACHolderLocation   string               `xml:"ACHolderLocation" json:"acHolderLocation,omitempty"`
	SigningLocation    string               `xml:"SigningLocation" json:"signingLocation,omitempty"`
	SenderIPAddress    string               `xml:"SenderIPAddress" json:"senderIPAddress,omitempty"`
	EnvelopePDFHash    string               `xml:"EnvelopePDFHash" json:"envelopePDFHash,omitempty"`
	AutoNavigation     bool                 `xml:"AutoNavigation" json:"autoNavigation,omitempty"`
	EnvelopeIdStamping bool                 `xml:"EnvelopeIdStamping" json:"envelopeIdStamping,omitempty"`
	AuthoritativeCopy  bool                 `xml:"AuthoritativeCopy" json:"authoritativeCopy,omitempty"`
	VoidReason         string               `xml:"VoidReason" json:"voidReason,omitempty"`
	RecipientStatuses  []RecipientStatusXml `xml:"RecipientStatuses>RecipientStatus" json:"recipientStatuses,omitempty"`
	CustomFields       []CustomFieldXml     `xml:"CustomFields>CustomField" json:"customFields,omitempty"`
	DocumentStatuses   []DocumentStatusXml  `xml:"DocumentStatuses>DocumentStatus" json:"documentStatuses,omitempty"`
}

EnvelopeStatusXML contains envelope information.

type EnvelopeUris

type EnvelopeUris struct {
	AllowReassign         string    `json:"allowReassign,omitempty"`
	CertificateUri        string    `json:"certificateUri,omitempty"`
	CreatedDateTime       time.Time `json:"createdDateTime,omitempty"`
	CustomFieldsUri       string    `json:"customFieldsUri,omitempty"`
	DocumentsCombinedUri  string    `json:"documentsCombinedUri,omitempty"`
	DocumentsUri          string    `json:"documentsUri,omitempty"`
	EmailBlurb            string    `json:"emailBlurb,omitempty"`
	EmailSubject          string    `json:"emailSubject,omitempty"`
	EnableWetSign         string    `json:"enableWetSign,omitempty"`
	EnvelopeId            string    `json:"envelopeId,omitempty"`
	EnvelopeUri           string    `json:"envelopeUri,omitempty"`
	LastModifiedDateTime  time.Time `json:"lastModifiedDateTime,omitempty"`
	NotificationUri       string    `json:"notificationUri,omitempty"`
	PurgeState            string    `json:"purgeState,omitempty"`
	RecipientsUri         string    `json:"recipientsUri,omitempty"`
	Status                string    `json:"status,omitempty"`
	StatusChangedDateTime time.Time `json:"statusChangedDateTime,omitempty"`
	TemplatesUri          string    `json:"templatesUri,omitempty"`
}

type EventNotification

type EventNotification struct {
	Url                               string           `json:"url,omitempty"`
	LoggingEnabled                    string           `json:"loggingEnabled,omitempty"`
	RequireAcknowledgment             string           `json:"requireAcknowledgment,omitempty"`
	UseSoapInterface                  string           `json:"useSoapInterface,omitempty"`
	SoapNameSpace                     string           `json:"soapNameSpace,omitempty"`
	IncludeCertificateWithSoap        string           `json:"includeCertificateWithSoap,omitempty"`
	SignMessageWithX509Cert           string           `json:"signMessageWithX509Cert,omitempty"`
	IncludeDocuments                  string           `json:"includeDocuments,omitempty"`
	IncludeEnvelopeVoidReason         string           `json:"includeEnvelopeVoidReason,omitempty"`
	IncludeTimeZone                   string           `json:"includeTimeZone,omitempty"`
	IncludeSenderAccountAsCustomField string           `json:"includeSenderAccountAsCustomField,omitempty"`
	IncludeDocumentFields             string           `json:"includeDocumentFields,omitempty"`
	IncludeCertificateOfCompletion    string           `json:"includeCertificateOfCompletion,omitempty"`
	EnvelopeEvents                    []EnvelopeEvent  `json:"envelopeEvents,omitempty"`
	RecipientEvents                   []RecipientEvent `json:"recipientEvents,omitempty"`
}

type Expiration

type Expiration struct {
	ExpireEnabled string `json:"expireEnabled,omitempty"`
	ExpireAfter   string `json:"expireAfter,omitempty"` // Number of days until expiration
	ExpireWarn    string `json:"expireWarn,omitempty"`  // Number of days until warning
}

type Folder

type Folder struct {
	OwnerUserName   string            `json:"ownerUserName,omitempty"`
	OwnerEmail      string            `json:"ownerEmail,omitempty"`
	OwnerUserId     string            `json:"ownerUserId,omitempty"`
	Type            string            `json:"type,omitempty"`
	Name            string            `json:"name,omitempty"`
	Uri             string            `json:"uri,omitempty"`
	ParentFolderId  string            `json:"parentFolderId,omitempty"`
	ParentFolderUri string            `json:"parentFolderUri,omitempty"`
	FolderId        string            `json:"folderId,omitempty"`
	Folders         []Folder          `json:"folders,omitempty"`
	Filter          map[string]string `json:"filter,omitempty"`
}

Folder Definition and list of Child Folders

type FolderEnvList

type FolderEnvList struct {
	EndPosition   string       `json:"endPosition,omitempty"`
	ResultSetSize string       `json:"resultSetSize,omitempty"`
	StartPosition string       `json:"startPosition,omitempty"`
	TotalSetSize  string       `json:"totalSetSize,omitempty"`
	TotalRows     string       `json:"totalRows,omitempty"`
	NextUri       string       `json:"nextUri,omitempty"`
	PreviousUri   string       `json:"previousUri,omitempty"`
	FolderItems   []FolderItem `json:"folderItems,omitempty"`
}

FolderEnvList is the response struct for Serivice.GetFolderEnvList() and contains a list of envelopes in the folder

type FolderEnvSearchParam

type FolderEnvSearchParam NmVal

func FolderEnvSearchFromDate

func FolderEnvSearchFromDate(tm time.Time) FolderEnvSearchParam

func FolderEnvSearchOwnerEmail

func FolderEnvSearchOwnerEmail(email string) FolderEnvSearchParam

func FolderEnvSearchOwnerName

func FolderEnvSearchOwnerName(nm string) FolderEnvSearchParam

func FolderEnvSearchStartPosition

func FolderEnvSearchStartPosition(pos int) FolderEnvSearchParam

func FolderEnvSearchStatus

func FolderEnvSearchStatus(status string) FolderEnvSearchParam

func FolderEnvSearchText

func FolderEnvSearchText(searchText string) FolderEnvSearchParam

func FolderEnvSearchToDate

func FolderEnvSearchToDate(tm time.Time) FolderEnvSearchParam

type FolderItem

type FolderItem struct {
	Name            string        `json:"name,omitempty"`
	CreatedDateTime time.Time     `json:"createdDateTime,omitempty"`
	EnvelopeId      string        `json:"envelopeId,omitempty"`
	EnvelopeUri     string        `json:"envelopeUri,omitempty"`
	OwnerName       string        `json:"ownerName,omitempty"`
	SenderEmail     string        `json:"senderEmail,omitempty"`
	SenderName      string        `json:"senderName,omitempty"`
	SentDateTime    time.Time     `json:"sentDateTime,omitempty"`
	Status          string        `json:"status,omitempty"`
	Subject         string        `json:"subject,omitempty"`
	Recipients      RecipientList `json:"recipients,omitempty"`
}

FolderItem describes an envelope in a FolderEnvList

type FolderList

type FolderList struct {
	Folders []Folder `json:"folders,omitempty"`
	XX      string   `json:"-"`
}

FolderList is the response struct for GetFolderList()

type FolderTemplateList

type FolderTemplateList struct {
	FolderEnvList
	EnvelopeTemplates []TemplateItem `json:"EnvelopeTemplates,omitempty"`
}

FolderTemplateList is the response struct for Service.GetTemplateList

type FolderTemplateParam

type FolderTemplateParam NmVal

type FormulaTab

type FormulaTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	ConcealValueOnDocument DSBool `json:"concealValueOnDocument,omitempty"`
	DisableAutoSize        DSBool `json:"disableAutoSize,omitempty"`
	Formula                string `json:"formula,omitempty"`
	Height                 int    `json:"height,omitempty"`
	IsPaymentAmount        DSBool `json:"isPaymentAmount,omitempty"`
	Locked                 DSBool `json:"locked"`
	MergeFieldXml          string `json:"mergeFieldXml,omitempty"`
	Required               DSBool `json:"required"`
	RoundDecimalPlaces     string `json:"roundDecimalPlaces,omitempty"`
	Value                  string `json:"value,omitempty"`
	Width                  int    `json:"width,omitempty"`
}

func (FormulaTab) NmVal

func (f FormulaTab) NmVal() NmVal

type IDCheckInformationInput

type IDCheckInformationInput struct {
	AddressInformationInput *AddressInformationInput `json:"addressInformationInput,omitempty"`
	DobInformationInput     *DobInformationInput     `json:"dobInformationInput,omitempty"`
	Ssn4InformationInput    *Ssn4InformationInput    `json:"ssn4InformationInput,omitempty"`
	Ssn9InformationInput    *Ssn9InformationInput    `json:"ssn9InformationInput,omitempty"`
}

IDCheckInformationInput specifies authentication check by name. See api documentation for specific values.

type InPersonSigner

type InPersonSigner struct {
	Recipient
	BaseSigner
	HostEmail string `json:"hostEmail,omitempty"`
	HostName  string `json:"hostName,omitempty"`
}

RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Recipients/In%20Person%20Signers%20Recipient.htm

type InformationInput

type InformationInput struct {
	DisplayLevelCode  string `json:"displayLevelCode,omitempty"`
	ReceiveInResponse string `json:"receiveInResponse,omitempty"`
}

type InitialHereTab

type InitialHereTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	Optional   DSBool  `json:"optional,omitempty"`
	ScaleValue float64 `json:"scaleValue,omitempty"`
}

type InlineTemplate

type InlineTemplate struct {
	Sequence   string         `json:"sequence,omitempty"`
	Documents  []Document     `json:"documents,omitempty"`
	Recipients *RecipientList `json:"recipients,omitempty"`
}

type Intermediary

type Intermediary struct {
	EmailRecipient
	CanEditRecipientEmails DSBool `json:"canEditRecipientEmails,omitempty"`
	CanEditRecipientNames  DSBool `json:"canEditRecipientNames,omitempty"`
}

This recipient can, but is not required to, add name and email information for recipients at the same or subsequent level in the routing order

RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Recipients/Intermediaries%20Recipient.htm

type ListCustomField

type ListCustomField struct {
	CustomField
	ListItems []string `json:"listItems,omitempty"`
}

type ListItem

type ListItem struct {
	Selected DSBool `json:"selected,omitempty"`
	Text     string `json:"text,omitempty"`
	Value    string `json:"value,omitempty"`
}

type ListTab

type ListTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ListItems                       []ListItem `json:"listItems,omitempty"`
	Locked                          DSBool     `json:"locked"`
	MergeFieldXml                   string     `json:"mergeFieldXml,omitempty"`
	Required                        DSBool     `json:"required"`
	RequireInitialOnSharedTabChange DSBool     `json:"requireInitialOnSharedTabChange,omitempty"`

	Shared DSBool `json:"shared,omitempty"`
	Value  string `json:"value,omitempty"`
	Width  int    `json:"width,omitempty"`
	// contains filtered or unexported fields
}

func (ListTab) NmVal

func (l ListTab) NmVal() NmVal

type Logger

type Logger interface {
	LogRequest(cxt context.Context, payload interface{}, req *http.Request)
	// Log Response needs to return a duplicate io.Reader of the res.Body.
	LogResponse(ctx context.Context, res *http.Response) io.Reader
}

Logger provides a mechanism to log call made via a Service. If a context has the docusign.CallLogger value set to a Logger, any service call will log requests using the interfaces functions.

type LoginAccount

type LoginAccount struct {
	AccountId            string  `json:"accountId,omitempty"`
	AccountIdGuid        string  `json:"accountIdGuid,omitempty"`
	BaseUrl              string  `json:"baseUrl,omitempty"`
	Email                string  `json:"email,omitempty"`
	IsDefault            string  `json:"isDefault,omitempty"`
	LoginAccountSettings []NmVal `json:"loginAccountSettings,omitempty"`
	LoginUserSettings    []NmVal `json:"loginUserSettings,omitempty"`
	Name                 string  `json:"Name,omitempty"`
	SiteDescription      string  `json:"siteDescription,omitempty"`
	UserId               string  `json:"userId,omitempty"`
	UserName             string  `json:"userName,omitempty"`
}

type LoginInfo

type LoginInfo struct {
	ApiPassword   string         `json:"apiPassword,omitempty"`
	LoginAccounts []LoginAccount `json:"loginAccounts"`
}

type LoginInfoParam

type LoginInfoParam NmVal

type Matchbox

type Matchbox struct {
	PageNumber string `json:"pageNumber,omitempty"`
	XPosition  string `json:"xPosition,omitempty"`
	YPosition  string `json:"yPosition,omitempty"`
	Width      string `json:"width,omitempty"`
	Height     string `json:"height,omitempty"`
}

Matchbox describes the area used for template matching

type NmVal

type NmVal struct {
	Name  string `json:"name,omitempty" xml:"name,attr"`
	Value string `json:"value,omitempty" xml:",chardata"`
}

NmVal is a generic name value pair struct used throughout the api.

type NmValXml

type NmValXml struct {
	Name  string `xml:"name,attr" json:"name,omitempty"`
	Value string `xml:"value" json:"value,omitempty"`
}

NmValXml contains the key/value pair for the form values.

type NoteTab

type NoteTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	Height int    `json:"height,omitempty"`
	Shared DSBool `json:"shared,omitempty"`
	Value  string `json:"value,omitempty"`
	Width  int    `json:"width,omitempty"`
}

func (NoteTab) NmVal

func (n NoteTab) NmVal() NmVal

type Notification

type Notification struct {
	UseAccountDefaults string      `json:"useAccountDefaults,omitempty"`
	Reminders          *Reminder   `json:"reminders,omitempty"`
	Expirations        *Expiration `json:"expirations,omitempty"`
}

Notificaton is the response struct for GetEnvelopeNotification

type NumberTab

type NumberTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ConcealValueOnDocument          DSBool `json:"concealValueOnDocument,omitempty"`
	DisableAutoSize                 DSBool `json:"disableAutoSize,omitempty"`
	Height                          int    `json:"height,omitempty"`
	Locked                          DSBool `json:"locked"`
	MergeFieldXml                   string `json:"mergeFieldXml,omitempty"`
	Required                        DSBool `json:"required"`
	RequireInitialOnSharedTabChange DSBool `json:"requireInitialOnSharedTabChange,omitempty"`
	Shared                          DSBool `json:"shared,omitempty"`
	Value                           string `json:"value,omitempty"`
	Width                           int    `json:"width,omitempty"`
}

func (NumberTab) NmVal

func (n NumberTab) NmVal() NmVal

type OauthCredential

type OauthCredential struct {
	// The docusign account used by the login user.  This may be
	// found using the LoginInformation call.
	AccountId   string `json:"account_id,omitempty"`
	AccessToken string `json:"access_token,omitempty"`
	Scope       string `json:"scope,omitempty"`
	TokenType   string `json:"token_type,omitempty"`
	Host        string `json:"host,omitempty"`
}

OauthCredential provides authorization for rest request via docusign's oauth protocol

Documentation: https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#OAuth2/OAuth2 Authentication Support in DocuSign REST API.htm

Example
package main

import (
	"fmt"
	"log"
	"time"

	"github.com/Wealthforge-Technologies/docusign"
	"golang.org/x/net/context"
)

func main() {
	ctx := context.Background()
	cred := &docusign.OauthCredential{
		AccessToken: "SAVED_ACCESS_TOKEN",
		AccountId:   "YOUR_ACCOUNT_ID",
		TokenType:   "bearer",
	}

	sv := docusign.New(cred, "")

	results, err := sv.EnvelopeSearch(ctx, docusign.SearchFolderCompleted,
		docusign.EnvelopeSearchFromDate(time.Now().Add(-time.Hour*72)),
		docusign.EnvelopeSearchIncludeRecipients)
	if err != nil {
		log.Fatal(err)
	}
	for _, env := range results.FolderItems {
		fmt.Printf("%s: %s\n", env.Name, env.EnvelopeId)
	}
}
Output:

func (OauthCredential) Authorize

func (o OauthCredential) Authorize(req *http.Request, onBehalfOf string)

Authorize update request with authorization parameters

func (OauthCredential) Revoke

func (o OauthCredential) Revoke(ctx context.Context) error

Revoke invalidates the token ensuring that an error will occur on an subsequent uses.

type PhoneAuthentication

type PhoneAuthentication struct {
	RecipMayProvideNumber       string   `json:"recipMayProvideNumber,omitempty"`
	ValidateRecipProvidedNumber string   `json:"validateRecipProvidedNumber,omitempty"`
	RecordVoicePrint            string   `json:"recordVoicePrint,omitempty"`
	SenderProvidedNumbers       []string `json:"senderProvidedNumbers,omitempty"`
}

type Radio

type Radio struct {
	BasePosTab
	Locked   DSBool `json:"locked"`
	Required DSBool `json:"required"`
	Selected DSBool `json:"selected,omitempty"`
	Value    string `json:"value,omitempty"`
}

type RadioGroupTab

type RadioGroupTab struct {
	ConditionalParentLabel          string  `json:"conditionalParentLabel,omitempty"`
	ConditionalParentValue          string  `json:"conditionalParentValue,omitempty"`
	DocumentID                      string  `json:"documentID,omitempty"`
	GroupName                       string  `json:"groupName,omitempty"`
	Radios                          []Radio `json:"radios,omitempty"`
	RecipientID                     string  `json:"recipientID,omitempty"`
	RequireInitialOnSharedTabChange DSBool  `json:"requireInitialOnSharedTabChange,omitempty"`
	Shared                          DSBool  `json:"shared,omitempty"`
	TemplateLocked                  DSBool  `json:"templateLocked,omitempty"`
	TemplateRequired                DSBool  `json:"templaterequired"`
}

func (RadioGroupTab) NmVal

func (rg RadioGroupTab) NmVal() NmVal

type Recipient

type Recipient struct {
	Name                                  string               `json:"name,omitempty"`
	AccessCode                            string               `json:"accessCode,omitempty"`
	AddAccessCodeToEmail                  DSBool               `json:"addAccessCodeToEmail,omitempty"`
	ClientUserId                          string               `json:"clientUserId,omitempty"`
	EmbeddedRecipientStartURL             string               `json:"embeddedRecipientStartURL,omitempty"`
	CustomFields                          string               `json:"customFields,omitempty"`
	EmailNotification                     *EmailNotification   `json:"emailNotification,omitempty"`
	ExcludedDocuments                     string               `json:"excludedDocuments,omitempty"`
	IdCheckConfigurationName              string               `json:"idCheckConfigurationName,omitempty"`
	IDCheckInformationInput               string               `json:"iDCheckInformationInput,omitempty"`
	InheritEmailNotificationConfiguration DSBool               `json:"inheritEmailNotificationConfiguration,omitempty"`
	Note                                  string               `json:"note,omitempty"`
	PhoneAuthentication                   *PhoneAuthentication `json:"phoneAuthentication,omitempty"`
	RecipientAttachments                  *RecipientAttachment `json:"recipientAttachment,omitempty"`
	RecipientCaptiveInfo                  string               `json:"recipientCaptiveInfo,omitempty"`
	RecipientId                           string               `json:"recipientId,omitempty"`
	RequireIdLookup                       DSBool               `json:"requireIdLookup,omitempty"`
	RoleName                              string               `json:"roleName,omitempty"`
	RoutingOrder                          string               `json:"routingOrder,omitempty"`
	SamlAuthentication                    *SamlAuthentication  `json:"samlAuthentication,omitempty"`
	SmsAuthentication                     *SmsAuthentication   `json:"smsAuthentication,omitempty"`
	SocialAuthentications                 DSBool               `json:"socialAuthentications,omitempty"`
	TemplateAccessCodeRequired            DSBool               `json:"templateAccessCodeRequired,omitempty"`
	TemplateLocked                        DSBool               `json:"templateLocked,omitempty"`
	TemplateRequired                      DSBool               `json:"templateRequired,omitempty"`
	ErrorDetails                          *ResponseError       `json:"errorDetails,omitempty"`
}

Recipient contains the common fields for all recipient types

type RecipientAttachment

type RecipientAttachment struct {
	Label          string `json:"label,omitempty"`
	AttachmentType string `json:"attachmentType,omitempty"`
	Data           string `json:"label,omitempty"`
}

RecipientAttachement will be used to a specific file attachment for a recipient.

type RecipientAttachmentXml

type RecipientAttachmentXml struct {
	Data  string `xml:"Data" json:"data,omitempty"`
	Label string `xml:"Label" json:"label,omitempty"`
}

type RecipientEvent

type RecipientEvent struct {
	StatusCode       string `json:"recipientEventStatusCode,omitempty"`
	IncludeDocuments string `json:"includeDocuments,omitempty"`
}

type RecipientList

type RecipientList struct {
	Agents              []Agent             `json:"agents,omitempty"`
	CarbonCopies        []CarbonCopy        `json:"carbonCopies,omitempty"`
	CertifiedDeliveries []CertifiedDelivery `json:"certifiedDeliveries,omitempty"`
	Editors             []Editor            `json:"editors,omitempty"`
	InPersonSigners     []InPersonSigner    `json:"inPersonSigners,omitempty"`
	Intermediaries      []Intermediary      `json:"intermediaries,omitempty"`
	Signers             []Signer            `json:"signers,omitempty"`
	RecipientCount      string              `json:"recipientCount,omitempty"`
}

RecipientList defines the recipients for an envelope RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Recipient%20Parameter.htm

func (RecipientList) Values

func (r RecipientList) Values() []NmVal

Values returns a NmVal slice contiaing the tabLabel and value for each tab in the RecipientList.

type RecipientStatusXml

type RecipientStatusXml struct {
	Type                string                 `xml:"Type" json:"type,omitempty"`
	Email               string                 `xml:"Email" json:"email,omitempty"`
	UserName            string                 `xml:"UserName" json:"userName,omitempty"`
	RoutingOrder        string                 `xml:"RoutingOrder" json:"routingOrder,omitempty"`
	Sent                DSTime                 `xml:"Sent" json:"sent,omitempty"`
	Delivered           DSTime                 `xml:"Delivered" json:"delivered,omitempty"`
	Signed              DSTime                 `xml:"Signed" json:"signed,omitempty"`
	DeclineReason       string                 `xml:"DeclineReason" json:"declineReason,omitempty"`
	Status              string                 `xml:"Status" json:"status,omitempty"`
	RecipientIPAddress  string                 `xml:"RecipientIPAddress" json:"recipientIPAdress,omitempty"`
	CustomFields        []CustomFieldXml       `xml:"CustomFields>CustomField" json:"customFields,omitempty"`
	AccountStatus       string                 `xml:"AccountStatus" json:"accountStatus,omitempty"`
	RecipientId         string                 `xml:"RecipientId" json:"recipientId,omitempty"`
	TabStatuses         []TabStatusXml         `xml:"TabStatuses>TabStatus" json:"tabStatuses,omitempty"`
	FormData            []NmValXml             `xml:"FormData>xfdf>fields>field" json:"formData,omitempty"`
	RecipientAttachment RecipientAttachmentXml `xml:"RecipientAttachment>Attachment" json:"recipientAttachment,omitempty"`
}

RecipientStatusXml contains data describing each recipient for an envelope.

type RecipientUpdateResult

type RecipientUpdateResult struct {
	// contains filtered or unexported fields
}

RecipeintUpdateResult is returned via the RecipientsModify call and returns a list of recipient ids and a corresponding error detail for each modification.

type RecipientsParam

type RecipientsParam NmVal

type Reminder

type Reminder struct {
	ReminderEnabled   string `json:"reminderEnabled,omitempty"`
	ReminderDelay     string `json:"reminderDelay,omitempty"`     // Number of days
	ReminderFrequency string `json:"reminderFrequency,omitempty"` // Number of intervals
}

type ResponseError

type ResponseError struct {
	Err         string `json:"errorCode,omitempty"`
	Description string `json:"message,omitempty"`
	Status      int    `json:"-"`
}

ResponseError is generated when docusign returns an http error.

Documentation: https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#Error Code/Error Code Information.htm

func (ResponseError) Error

func (r ResponseError) Error() string

func (*ResponseError) UnmarshalJSON

func (r *ResponseError) UnmarshalJSON(b []byte) error

UnmarshalJSON allows different versions of response error to be unmarshalled.

type ReturnUrlType

type ReturnUrlType string

ReturnUrlType is used to generate url for user signing see PostSenderView, PostRecipientView, PostEditView, PostCorrection

type SamlAuthentication

type SamlAuthentication struct {
	SamlAssertionAttributes []NmVal `json:"samlAssertionAttributes,omitempty"`
}

type SearchFolder

type SearchFolder string

SearchFolder specifies strings describing the the type of available search folders

var SearchFolderAwaitingSig SearchFolder = "awaiting_my_signature"
var SearchFolderCompleted SearchFolder = "completed"
var SearchFolderDrafts SearchFolder = "drafts"
var SearchFolderOutForSig SearchFolder = "out_for_signature"

type SearchFolderParam

type SearchFolderParam NmVal

func EnvelopeSearchCount

func EnvelopeSearchCount(cnt int) SearchFolderParam

func EnvelopeSearchFromDate

func EnvelopeSearchFromDate(tm time.Time) SearchFolderParam

func EnvelopeSearchStartPosition

func EnvelopeSearchStartPosition(pos int) SearchFolderParam

func EnvelopeSearchToDate

func EnvelopeSearchToDate(tm time.Time) SearchFolderParam

type ServerTemplate

type ServerTemplate struct {
	Sequence   string `json:"sequence,omitempty"`
	TemplateId string `json:"templateId,omitempty"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service contains all rest methods and stores authorization

func New

func New(credential Credential, onBehalfOf string) *Service

New intializes a new rest api service. If client is nil then http.DefaultClient is assumed. func New(ctx context.Context, accountId string, credential Credential) *Service {

func (*Service) AccountCustomFields

func (s *Service) AccountCustomFields(ctx context.Context) (*CustomFieldList, error)

AccountCustomFields retrieves a list of envelope custom fields associated with the account.

RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get List of Account Custom Fields.htm

func (*Service) DocumentAddCustomFields

func (s *Service) DocumentAddCustomFields(ctx context.Context, envId, docId string, dfl *DocumentFieldList) (*DocumentFieldList, error)

DocumentAddCustomFields creates new custom fields on a specific document. Errors are returned in the DocumentFieldList ErrorDetails field. RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Add%20Custom%20Document%20Fields%20to%20an%20Envelope%20Document.htm

func (*Service) DocumentModifyCustomFields

func (s *Service) DocumentModifyCustomFields(ctx context.Context, envId, docId string, dfl *DocumentFieldList) (*DocumentFieldList, error)

DocumentModifyCustomFields modifies existing custom document fields for an existing envelope. Errors are returned in the DocumentFieldList ErrorDetails field. RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Modify%20Custom%20Document%20Fields%20for%20an%20Envelope%20Document.htm

func (*Service) DocumentRemoveCustomFields

func (s *Service) DocumentRemoveCustomFields(ctx context.Context, envId, docId string, dfl *DocumentFieldList) (*DocumentFieldList, error)

DocumentRemoveCustomFields delete existing custom document fields for an existing envelope. Errors are returned in the DocumentFieldList ErrorDetails field. RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Delete%20Custom%20Document%20Fields%20from%20an%20Envelope%20Document.htm

func (*Service) EditView

func (s *Service) EditView(ctx context.Context, envId string, retType ReturnUrlType) (*EnvUrl, error)

EditView returns a URL to start the edit view of the DocuSign UI.

RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Post%20Edit%20View.htm

func (*Service) EnvelopeAddCustomFields

func (s *Service) EnvelopeAddCustomFields(ctx context.Context, envId string, l *CustomFieldList) (*CustomFieldList, error)

EnvelopeAddCustomFields adds custom fields to an existing envelope. Duplicates will return error in the ErrorDetails struct of the CustomField or ListCustomField item. RestApi documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Add%20Envelope%20Custom%20Fields%20to%20an%20Envelope.htm

func (*Service) EnvelopeAuditEvents

func (s *Service) EnvelopeAuditEvents(ctx context.Context, envId string) (*AuditEventList, error)

EnvelopeAuditEvents returns the events for this envelope.

RestApi documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Envelope%20Audit%20Events.htm

func (*Service) EnvelopeCorrection

func (s *Service) EnvelopeCorrection(ctx context.Context, envId string, retUrlType ReturnUrlType, suppressNavigation bool) (*EnvUrl, error)

EnvelopeCorrection returns a URL to start the correction view of the DocuSign UI.

RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Post%20Envelope%20Correction.htm

func (*Service) EnvelopeCreate

func (s *Service) EnvelopeCreate(ctx context.Context, env *Envelope, files ...*UploadFile) (*EnvelopeResponse, error)

EnvelopeCreate adds an envelope. The Status field determines whether the envelope is saved as a Draft or sent. RestApi Documentation

func (*Service) EnvelopeCustomFields

func (s *Service) EnvelopeCustomFields(ctx context.Context, envId string) (*CustomFieldList, error)

EnvelopeCustomFields returns all custom field info in a Custom Field List RestApi documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Envelope%20Custom%20Field%20Information.htm

func (*Service) EnvelopeDocument

func (s *Service) EnvelopeDocument(ctx context.Context, envId string, docId string, args ...EnvelopeDocumentParam) (*http.Response, error)

EnvelopeDocument returns the pdf of a specific document from an envelope. The returned response will either have a status code of 200. Any other status code for a response will result in a nil response with a ResponseError detailing the http status code and docusign's error message. Developer is expected to close the http.Response when finished processing. Only possible arg is show_changes={true/false}

RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Document%20from%20Envelope.htm

func (*Service) EnvelopeDocuments

func (s *Service) EnvelopeDocuments(ctx context.Context, envId string) (*DocumentAssetList, error)

EnvelopeDocuments returns a Document Asset List for an envelope RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20List%20of%20Envelope%20Documents.htm

func (*Service) EnvelopeDocumentsCombined

func (s *Service) EnvelopeDocumentsCombined(ctx context.Context, envId string, args ...EnvelopeDocumentsCombinedParam) (*http.Response, error)

EnvelopeDocumentsCombined retrieves a PDF containing the combined content of all documents and the certificate via an http.Response. If the account has the Highlight Data Changes feature enabled,there is an option to request that any changes in the envelope be highlighted. The returned response will either have a status code of 200. Any other status code for a response will result in a nil response with a ResponseError detailing the http status code and docusign's error message. Developer is expected to close the http.Response when finished processing. Optional additions: certificate={true or false}, show_changes={true}, watermark={true or false}

RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Envelope%20Documents%20and%20Certificate.htm

func (*Service) EnvelopeModifyCustomFields

func (s *Service) EnvelopeModifyCustomFields(ctx context.Context, envId string, l *CustomFieldList) (*CustomFieldList, error)

EnvelopeModifyCustomFields modifies custom fields in CustomFieldList structure. Id's are mandatory and errors are found in ErrorDetails struct of CustomField or ListCustomField items. Nil ErrorDetails means success RestApi documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Modify%20Envelope%20Custom%20Fields%20for%20an%20Envelope.htm

func (*Service) EnvelopeMove

func (s *Service) EnvelopeMove(ctx context.Context, toFolderId string, envIds ...string) error

EnvelopeMove move the specified envelope to the folder specified int toFolderId

RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Move%20Envelope.htm

func (*Service) EnvelopeNotification

func (s *Service) EnvelopeNotification(ctx context.Context, envId string) (*Notification, error)

EnvelopeNotification returns the reminder and expiration information for the envelope.

RestApi documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Envelope%20Notification%20Information.htm

func (*Service) EnvelopeRemoveCustomFields

func (s *Service) EnvelopeRemoveCustomFields(ctx context.Context, envId string, l *CustomFieldList) (*CustomFieldList, error)

EnvelopeRemoveCustomFields deletes Custom Fields using the Id field in CustomField items. RestApi documentatiion https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Remove%20Envelope%20Custom%20Fields%20from%20an%20Envelope.htm

func (*Service) EnvelopeRemoveDocuments

func (s *Service) EnvelopeRemoveDocuments(ctx context.Context, envId string, dl *DocumentList) (*DocumentAssetList, error)

func (*Service) EnvelopeSearch

func (s *Service) EnvelopeSearch(ctx context.Context, searchFld SearchFolder, args ...SearchFolderParam) (*FolderEnvList, error)

EnvelopeSearch returns a list of envelopes that match the criteria specified in the query parameters. Query Parameters: start_position is the starting value for the list. count is the number of records to return in the cache. The number must be greater than 1 and less than or equal to 100. from_date is the start of the date range. If no value is provided, the default search is the previous 30 days. to_date is the end of the date range. order_by Column used to sort the list. Valid values are listed EnvelopeSearchOrderBy* variables order sets the direction of the sort. Valid values are EnvelopeSearchAsc or EnvelopeSearchDesc. include_recipients returns the recipient information when true.

RestApi documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST API References/Get List of Envelopes in Folders.htm

func (*Service) EnvelopeSetDocuments

func (s *Service) EnvelopeSetDocuments(ctx context.Context, envId string, dl *DocumentList, files ...*UploadFile) (*DocumentAssetList, error)

func (*Service) EnvelopeStatus

func (s *Service) EnvelopeStatus(ctx context.Context, envId string) (res *EnvelopeUris, err error)

EnvelopeStatus returns returns the overall status for a single envelope.

RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST API References/Get Envelope Status for One Envelope.htm

func (*Service) EnvelopeStatusChanges

func (s *Service) EnvelopeStatusChanges(ctx context.Context, args ...EnvelopeStatusChangesParam) (*EnvelopeList, error)

EnvelopeStatusChanges returns envelope status changes for all envelopes. The information returned can be modified by adding query strings to limit the request to check between certain dates and times, or for certain envelopes, or for certain status codes. It is recommended that you use one or more of the query strings in order to limit the size of the response.

RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST API References/Get Envelope Status Changes.htm

Optional query strings: from_date={dateTime}, to_date={dateTime}, status={status code}, from_to_status={changed or any or list of statuses}, envelopeId={envelopeId}, custom_field={envelope custom field name}={envelope custom field value}, transaction_ids={transactionIds (comma separated)}

Use DsQueryTimeFormat to formate dateTime query arguments

func (*Service) EnvelopeStatusMulti

func (s *Service) EnvelopeStatusMulti(ctx context.Context, envIds ...string) ([]EnvelopeUris, error)

EnvelopeStatusMulti returns the status for the requested envelopes.

RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Envelope%20Status%20for%20more%20than%20one%20envelope.htm

func (*Service) EnvelopeTemplates

func (s *Service) EnvelopeTemplates(ctx context.Context, envId string) (*TemplateList, error)

EnvelopeTemplates returns a list of templates used by an envelope

RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20List%20of%20Templates%20used%20in%20an%20Envelope.htm

func (*Service) FolderEnvSearch

func (s *Service) FolderEnvSearch(ctx context.Context, folderId string, args ...FolderEnvSearchParam) (*FolderEnvList, error)

FolderEnvSearch returns a list of the envelopes in the specified folder. You can narrow the query by adding some optional items. additions: start_position={ integer}, from_date = {date/time}, to_date= {date/time}, search_text={text}, status={envelope status}, owner_name={username}, owner_email={email}

RestApi documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Folder%20Envelope%20List.htm

func (*Service) FolderList

func (s *Service) FolderList(ctx context.Context, args ...FolderTemplateParam) (*FolderList, error)

FolderList returns a list of the folders for the account, including the folder hierarchy. Optional query string: template={string} include or only

RestApi documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Folder%20List.htm

func (*Service) GetTemplate

func (s *Service) GetTemplate(ctx context.Context, id string) (*Template, error)

GetTemplate returns field data for the specified template

RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get Template.htm

func (*Service) LoginInformation

func (s *Service) LoginInformation(ctx context.Context, args ...LoginInfoParam) (*LoginInfo, error)

LoginInformation determine if a user is authenticated and to choose the account to be used for other operations. Each account associated with the login credentials is listed. optional paramenters: api_password Boolean include_account_id_guid Boolean login_settings string [all,none]

func (Service) OnBehalfOf

func (s Service) OnBehalfOf(onBehalfOf string) *Service

OnBehalfOf returns a new Service set to authenticate then onBehalfOf userId (email address). The original Service credential must be an administrator.

func (*Service) RecipientTabsAdd

func (s *Service) RecipientTabsAdd(ctx context.Context, envId string, recipId string, tb *Tabs) (*Tabs, error)

RecipientTabsAdd adds tabs to a recipient The response returns the success or failure of each document being added to the envelope and the envelope ID. Failed operations will add the ErrorDetails structure containing an error code and message. If ErrorDetails is nil, then the operation was successful for that item. RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Add%20Tabs%20for%20a%20Recipient.htm

func (*Service) RecipientTabsModify

func (s *Service) RecipientTabsModify(ctx context.Context, envId string, recipId string, tb *Tabs) (*Tabs, error)

RecipientTabsModify The parameters used to modify tabs are the same as those used in an envelope, but you can only modify existing tabs and the tabId must be included. RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Modify%20Tabs%20for%20a%20Recipient.htm

func (*Service) RecipientTabsRemove

func (s *Service) RecipientTabsRemove(ctx context.Context, envId string, recipId string, tb *Tabs) (*Tabs, error)

RecipientTabsRemove If an error occurred during the DELETE operation for any of the recipients, that recipient will contain an error node with an errorCode and message. RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Delete%20Recipients%20from%20an%20Envelope.htm

func (*Service) RecipientView

func (s *Service) RecipientView(ctx context.Context, envId string, er *EnvRecipientView) (*EnvUrl, error)

RecipientView returns a URL to start a Recipient view of the DocuSign UI.

RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Post%20Recipient%20View.htm

func (*Service) Recipients

func (s *Service) Recipients(ctx context.Context, envId string, args ...RecipientsParam) (*RecipientList, error)

Recipients Optional query strings: include_tabs={true or false}, include_extended={true or false} RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Envelope%20Recipient%20Status.htm

func (*Service) RecipientsAdd

func (s *Service) RecipientsAdd(ctx context.Context, envId string, rl *RecipientList, args ...RecipientsParam) (*RecipientList, error)

RecipientsAdd If an error occurred during the operation, recipient struct will contain an ErrorDetail Optional addition: resend_envelope {true or false} RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Modify%20or%20Correct%20and%20Resend%20Recipient%20Information.htm

func (*Service) RecipientsModify

func (s *Service) RecipientsModify(ctx context.Context, envId string, rl *RecipientList, args ...RecipientsParam) (*RecipientUpdateResult, error)

ModifyRecipients Optional addition: resend_envelope {true or false} RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20Envelope%20Recipient%20Status.htm

func (*Service) RecipientsRemove

func (s *Service) RecipientsRemove(ctx context.Context, envId string, rl *RecipientList) (res *RecipientList, err error)

RecipientsRemove Optional addition: resend_envelope {true or false} RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Delete%20Recipients%20from%20an%20Envelope.htm

func (*Service) Remind

func (s *Service) Remind(ctx context.Context, envId string, rl *RecipientList) error

Remind sends a reminder to an envelope recipient.

RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References//Void Envelope.htm

func (*Service) SenderView

func (s *Service) SenderView(ctx context.Context, envId string, retType ReturnUrlType) (*EnvUrl, error)

SenderView returns a URL to start the sender view of the DocuSign UI.

RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Post%20Sender%20View.htm

func (*Service) TemplateSearch

func (s *Service) TemplateSearch(ctx context.Context, args ...TemplateSearchParam) (*FolderTemplateList, error)

TemplateSearch retrieves the list of templates for the specified account Optional query strings: folder={string}, folder_ids={GUID, GUID}, include={string}, count={integer}, start_position={integer}, from_date={date/time}, to_date={date/time}, used_from_date={date/time}, used_to_date={date/time}, search_text={string}, order={string}, order_by={string}, user_filter={string}, shared_by_me={true/false} RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Get%20List%20of%20Templates.htm

func (*Service) Void

func (s *Service) Void(ctx context.Context, envId string, reason string) error

VoidEnvelope voids and existing envelope.

RestApiDocumentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Void Envelope.htm

type SignHereTab

type SignHereTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	Optional   DSBool  `json:"optional,omitempty"`
	ScaleValue float64 `json:"scaleValue,omitempty"`
}

type Signer

type Signer struct {
	EmailRecipient
	BaseSigner
	IsBulkRecipient   string            `json:"isBulkRecipient,omitempty"`
	BulkRecipientsUri string            `json:"bulkRecipientsUri,omitempty"`
	DeliveryMethod    string            `json:"deliveryMethod,omitempty"`
	DeliveredDateTime string            `json:"deliveredDateTime,omitempty"`
	SignedDateTime    string            `json:"signedDateTime,omitempty"`
	OfflineAttributes map[string]string `json:"offlineAttributes,omitempty"`
}

Use this action if your recipient must sign, initial, date or add data to form fields on the documents in the envelope.

RestApi Documentation https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Recipients/Signers%20Recipient.htm

type SignerAttachmentTab

type SignerAttachmentTab struct {
	BaseTab
	BasePosTab
	BaseTemplateTab
	BaseConditionalTab
	Optional DSBool `json:"optional,omitempty"`
}

type SimpleLogger

type SimpleLogger struct{}

func (SimpleLogger) LogRequest

func (s SimpleLogger) LogRequest(ctx context.Context, payload interface{}, req *http.Request)

func (SimpleLogger) LogResponse

func (s SimpleLogger) LogResponse(ctx context.Context, res *http.Response) io.Reader

type SmsAuthentication

type SmsAuthentication struct {
	SenderProvidedNumbers []string `json:"smsAuthentication,omitempty"`
}

type Ssn4InformationInput

type Ssn4InformationInput struct {
	InformationInput
	Ssn4 string `json:"ssn4,omitempty"`
}

type Ssn9InformationInput

type Ssn9InformationInput struct {
	InformationInput
	Ssn9 string `json:"ssn9,omitempty"`
}

type SsnTab

type SsnTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ConcealValueOnDocument          DSBool `json:"concealValueOnDocument,omitempty"`
	DisableAutoSize                 DSBool `json:"disableAutoSize,omitempty"`
	Height                          int    `json:"height,omitempty"`
	Locked                          DSBool `json:"locked"`
	MergeFieldXml                   string `json:"mergeFieldXml,omitempty"`
	Required                        DSBool `json:"required"`
	RequireInitialOnSharedTabChange DSBool `json:"requireInitialOnSharedTabChange,omitempty"`
	Shared                          DSBool `json:"shared,omitempty"`
	Value                           string `json:"value,omitempty"`
	Width                           int    `json:"width,omitempty"`
}

func (SsnTab) NmVal

func (s SsnTab) NmVal() NmVal

type TabStatusXml

type TabStatusXml struct {
	TabType           string `xml:"TabType" json:"tabType,omitempty"`
	Status            string `xml:"Status" json:"status,omitempty"`
	XPosition         string `xml:"XPosition" json:"xPosition,omitempty"`
	YPosition         string `xml:"YPosition" json:"yPosition,omitempty"`
	TabLabel          string `xml:"TabLabel" json:"tabLabel,omitempty"`
	TabName           string `xml:"TabName" json:"tabName,omitempty"`
	TabValue          string `xml:"TabValue" json:"tabValue,omitempty"`
	DocumentID        string `xml:"DocumentID" json:"documentID,omitempty"`
	PageNumber        string `xml:"PageNumber" json:"pageNumber,omitempty"`
	OriginalValue     string `xml:"OriginalValue" json:"originalValue,omitempty"`
	ValidationPattern string `xml:"ValidationPattern" json:"validationPattern,omitempty"`
	ListValues        string `xml:"ListValues" json:"listValues,omitempty"`
	ListSelectedValue string `xml:"ListSelectedValue" json:"listSelectedValue,omitempty"`
	CustomTabType     string `xml:"CustomTabType" json:"customTabType,omitempty"`
}

TabStatusXML describes the properties of each recipient tab

type Tabs

type Tabs struct {
	ApproveTabs          []ApproveTab          `json:"ApproveTabs,omitempty"`
	CheckboxTabs         []CheckboxTab         `json:"checkboxTabs,omitempty"`
	CompanyTabs          []CompanyTab          `json:"companyTabs,omitempty"`
	DateSignedTabs       []DateSignedTab       `json:"dateSignedTabs,omitempty"`
	DateTabs             []DateTab             `json:"dateTabs,omitempty"`
	DeclineTabs          []DeclineTab          `json:"declineTabs,omitempty"`
	EmailTabs            []EmailTab            `json:"emailTabs,omitempty"`
	EnvelopeIdTabs       []EnvelopeIdTab       `json:"envelopeIdTabs,omitempty"`
	FullNameTabs         []FullNameTab         `json:"fullNameTabs,omitempty"`
	InitialHereTabs      []InitialHereTab      `json:"initialHereTabs,omitempty"`
	ListTabs             []ListTab             `json:"listTabs,omitempty"`
	NoteTabs             []NoteTab             `json:"noteTabs,omitempty"`
	NumberTabs           []NumberTab           `json:"numberTabs,omitempty"`
	RadioGroupTabs       []RadioGroupTab       `json:"radioGroupTabs,omitempty"`
	SignHereTabs         []SignHereTab         `json:"signHereTabs,omitempty"`
	SignerAttachmentTabs []SignerAttachmentTab `json:"signerAttachmentTabs,omitempty"`
	SsnTabs              []SsnTab              `json:"ssnTabs,omitempty"`
	TextTabs             []TextTab             `json:"textTabs,omitempty"`
	TitleTabs            []TitleTab            `json:"titleTabs,omitempty"`
	ZipTabs              []ZipTab              `json:"zipTabs,omitempty"`
}

Tabs describes the data tabs for a recipient

func (Tabs) Values

func (t Tabs) Values() []NmVal

type Template

type Template struct {
	EnvelopeTemplateDefinition TemplateDefinition `json:"envelopeTemplateDefinition,omitempty"`
	Accessibility              string             `json:"accessibility,omitempty"`
	AllowMarkup                string             `json:"allowMarkup,omitempty"`
	AllowReassign              string             `json:"allowReassign,omitempty"`
	AllowRecipientRecursion    string             `json:"allowRecipientRecursion,omitempty"`
	Asynchronous               string             `json:"asynchronous,omitempty"`
	AuthoritativeCopy          string             `json:"authoritativeCopy,omitempty"`
	AutoNavigation             string             `json:"autoNavigation,omitempty"`
	BrandId                    string             `json:"brandId,omitempty"`
	EmailBlurb                 string             `json:"emailBlurb,omitempty"`
	EmailSubject               string             `json:"emailSubject,omitempty"`
	EnableWetSign              string             `json:"enableWetSign,omitempty"`
	EnforceSignerVisibility    string             `json:"enforceSignerVisibility,omitempty"`
	EnvelopeIdStamping         string             `json:"envelopeIdStamping,omitempty"`
	MessageLock                string             `json:"messageLock,omitempty"`
	Name                       string             `json:"name,omitempty"`
	Notification               *Notification      `json:"notification,omitempty"`
	Owner                      *TemplateOwner     `json:"owner,omitempty"`
	RecipientsLock             string             `json:"recipientsLock,omitempty"`
	SigningLocation            string             `json:"signingLocation,omitempty"`
	CustomFields               *CustomFieldList   `json:"customFields,omitempty"`
	Documents                  []Document         `json:"documents,omitempty"`
	Recipients                 *RecipientList     `json:"recipients,omitempty"`
	EventNotification          *EventNotification `json:"eventNotification,omitempty"`
}

type TemplateDefinition

type TemplateDefinition struct {
	TemplateId     string             `json:"templateId,omitempty"`
	Name           string             `json:"name,omitempty"`
	Shared         string             `json:"shared,omitempty"`
	Password       string             `json:"password,omitempty"`
	Description    string             `json:"description,omitempty"`
	LastModified   time.Time          `json:"lastModified,omitempty"`
	LastModifiedBy TemplateModifiedBy `json:"lastModifiedBy,omitempty"`
	PageCount      int                `json:"pageCount,omitempty"`
	FolderName     string             `json:"folderName,omitempty"`
	FolderId       string             `json:"folderId,omitempty"`
	Owner          TemplateOwner      `json:"owner,omitempty"`
}

type TemplateItem

type TemplateItem struct {
	Name       string `json:"name,omitempty"`
	TemplateId string `json:"templateId,omitempty"`
	Uri        string `json:"uri,omitempty"`
}

type TemplateList

type TemplateList struct {
	Templates []TemplateItem `json:"templates,omitempty"`
}

Return structure for GetEnvelopeTemplate call

type TemplateModifiedBy

type TemplateModifiedBy struct {
	UserName string `json:"userName,omitempty"`
	UserId   string `json:"userId,omitempty"`
	Email    string `json:"email,omitempty"`
	URI      string `json:"uri,omitempty"`
}

type TemplateOwner

type TemplateOwner struct {
	UserName   string `json:"userName,omitempty"`
	UserId     string `json:"userId,omitempty"`
	Email      string `json:"email,omitempty"`
	URI        string `json:"uri,omitempty"`
	UserType   string `json:"userType,omitempty"`
	UserStatus string `json:"userStatus,omitempty"`
}

type TemplateRole

type TemplateRole struct {
	Email              string             `json:"email,omitempty"`
	Name               string             `json:"name,omitempty"`
	RoleName           string             `json:"roleName,omitempty"`
	ClientUserId       string             `json:"clientUserId,omitempty"`
	DefaultRecipient   string             `json:"defaultRecipient,omitempty"`
	RoutingOrder       string             `json:"routingOrder,omitempty"`
	AccessCode         string             `json:"accessCode,omitempty"`
	InPersonSignerName string             `json:"inPersonSignerName,omitempty"`
	EmailNotification  *EmailNotification `json:"emailNotification,omitempty"`
	Tabs               *Tabs              `json:"tabs,omitempty"`
}

type TemplateSearchParam

type TemplateSearchParam NmVal

func TemplateSearchCount

func TemplateSearchCount(count int) TemplateSearchParam

func TemplateSearchFolder

func TemplateSearchFolder(folder string) TemplateSearchParam

func TemplateSearchFolderIds

func TemplateSearchFolderIds(folder ...string) TemplateSearchParam

func TemplateSearchFromDate

func TemplateSearchFromDate(t time.Time) TemplateSearchParam

func TemplateSearchInclude

func TemplateSearchInclude(recipients, folders, documents, customFields, notifications bool) TemplateSearchParam

func TemplateSearchSearch

func TemplateSearchSearch(searchText string) TemplateSearchParam

func TemplateSearchStartPosition

func TemplateSearchStartPosition(pos int) TemplateSearchParam

func TemplateSearchToDate

func TemplateSearchToDate(t time.Time) TemplateSearchParam

func TemplateSearchUsedFromDate

func TemplateSearchUsedFromDate(t time.Time) TemplateSearchParam

func TemplateSearchUsedToDate

func TemplateSearchUsedToDate(t time.Time) TemplateSearchParam

type TextTab

type TextTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ConcealValueOnDocument          DSBool `json:"concealValueOnDocument,omitempty"`
	DisableAutoSize                 DSBool `json:"disableAutoSize,omitempty"`
	Height                          int    `json:"height,omitempty"`
	IsPaymentAmount                 DSBool `json:"isPaymentAmount,omitempty"`
	Locked                          DSBool `json:"locked"`
	MergeFieldXml                   string `json:"mergeFieldXml,omitempty"`
	Required                        DSBool `json:"required"`
	RequireInitialOnSharedTabChange DSBool `json:"requireInitialOnSharedTabChange,omitempty"`

	Shared            DSBool `json:"shared,omitempty"`
	ValidationMessage string `json:"validationMessage,omitempty"`
	ValidationPattern string `json:"validationPattern,omitempty"`
	Value             string `json:"value,omitempty"`
	Width             int    `json:"width,omitempty"`
	// contains filtered or unexported fields
}

func (TextTab) NmVal

func (t TextTab) NmVal() NmVal

type TitleTab

type TitleTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ConcealValueOnDocument          DSBool `json:"concealValueOnDocument,omitempty"`
	DisableAutoSize                 DSBool `json:"disableAutoSize,omitempty"`
	Height                          int    `json:"height,omitempty"`
	Locked                          DSBool `json:"locked"`
	MergeFieldXml                   string `json:"mergeFieldXml,omitempty"`
	Required                        DSBool `json:"required"`
	RequireInitialOnSharedTabChange DSBool `json:"requireInitialOnSharedTabChange,omitempty"`

	Shared            DSBool `json:"shared,omitempty"`
	ValidationMessage string `json:"validationMessage,omitempty"`
	ValidationPattern string `json:"validationPattern,omitempty"`
	Value             string `json:"value,omitempty"`
	Width             int    `json:"width,omitempty"`
	// contains filtered or unexported fields
}

func (TitleTab) NmVal

func (t TitleTab) NmVal() NmVal

type UploadFile

type UploadFile struct {
	// mime type of content
	ContentType string
	// file name to display in envelope
	FileName string
	// envelope documentId
	Id string
	// document order for envelope
	Order string
	// reader for creating file
	Data io.Reader
}

Upload file describes an a document attachment for uploading

type ValueTab

type ValueTab interface {
	NmVal() NmVal
}

type ZipTab

type ZipTab struct {
	BaseTab
	BasePosTab
	BaseStyleTab
	BaseTemplateTab
	BaseConditionalTab
	ConcealValueOnDocument          DSBool `json:"concealValueOnDocument,omitempty"`
	DisableAutoSize                 DSBool `json:"disableAutoSize,omitempty"`
	Height                          int    `json:"height,omitempty"`
	Locked                          DSBool `json:"locked"`
	MergeFieldXml                   string `json:"mergeFieldXml,omitempty"`
	Required                        DSBool `json:"required"`
	RequireInitialOnSharedTabChange DSBool `json:"requireInitialOnSharedTabChange,omitempty"`
	Shared                          DSBool `json:"shared,omitempty"`
	Value                           string `json:"value,omitempty"`
	Width                           int    `json:"width,omitempty"`
}

func (ZipTab) NmVal

func (z ZipTab) NmVal() NmVal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL