/**
* Docusign eSignature REST API
* The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign.
*
* OpenAPI spec version: v2.1
* Contact: devcenter@docusign.com
*
* NOTE: This class is auto generated. Do not edit the class manually and submit a new issue instead.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/FormDataItem', 'model/PrefillFormData', 'model/RecipientFormData'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./FormDataItem'), require('./PrefillFormData'), require('./RecipientFormData'));
} else {
// Browser globals (root is window)
if (!root.Docusign) {
root.Docusign = {};
}
root.Docusign.EnvelopeFormData = factory(root.Docusign.ApiClient, root.Docusign.FormDataItem, root.Docusign.PrefillFormData, root.Docusign.RecipientFormData);
}
}(this, function(ApiClient, FormDataItem, PrefillFormData, RecipientFormData) {
'use strict';
/**
* The EnvelopeFormData model module.
* @module model/EnvelopeFormData
*/
/**
* Constructs a new <code>EnvelopeFormData</code>.
* Describes the form data of the envelope.
* @alias module:model/EnvelopeFormData
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>EnvelopeFormData</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/EnvelopeFormData} obj Optional instance to populate.
* @return {module:model/EnvelopeFormData} The populated <code>EnvelopeFormData</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('emailSubject')) {
obj['emailSubject'] = ApiClient.convertToType(data['emailSubject'], 'String');
}
if (data.hasOwnProperty('envelopeId')) {
obj['envelopeId'] = ApiClient.convertToType(data['envelopeId'], 'String');
}
if (data.hasOwnProperty('formData')) {
obj['formData'] = ApiClient.convertToType(data['formData'], [FormDataItem]);
}
if (data.hasOwnProperty('prefillFormData')) {
obj['prefillFormData'] = PrefillFormData.constructFromObject(data['prefillFormData']);
}
if (data.hasOwnProperty('recipientFormData')) {
obj['recipientFormData'] = ApiClient.convertToType(data['recipientFormData'], [RecipientFormData]);
}
if (data.hasOwnProperty('sentDateTime')) {
obj['sentDateTime'] = ApiClient.convertToType(data['sentDateTime'], 'String');
}
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
}
}
return obj;
}
/**
* Specifies the subject of the email that is sent to all recipients. See [ML:Template Email Subject Merge Fields] for information about adding merge field information to the email subject.
* @member {String} emailSubject
*/
exports.prototype['emailSubject'] = undefined;
/**
* The envelope ID of the envelope status that failed to post.
* @member {String} envelopeId
*/
exports.prototype['envelopeId'] = undefined;
/**
*
* @member {Array.<module:model/FormDataItem>} formData
*/
exports.prototype['formData'] = undefined;
/**
* An array of `formDataItem` objects for [prefill tabs](/docs/esign-rest-api/reference/envelopes/envelopedocumenttabs/create/#definition__tabs_prefilltabs).
* @member {module:model/PrefillFormData} prefillFormData
*/
exports.prototype['prefillFormData'] = undefined;
/**
*
* @member {Array.<module:model/RecipientFormData>} recipientFormData
*/
exports.prototype['recipientFormData'] = undefined;
/**
* The date and time the envelope was sent.
* @member {String} sentDateTime
*/
exports.prototype['sentDateTime'] = undefined;
/**
* Indicates the envelope status. Valid values are: * sent - The envelope is sent to the recipients. * created - The envelope is saved as a draft and can be modified and sent later.
* @member {String} status
*/
exports.prototype['status'] = undefined;
return exports;
}));