Class: DocuSign_eSign::EventNotification
- Inherits:
-
Object
- Object
- DocuSign_eSign::EventNotification
- Defined in:
- lib/docusign_esign/models/event_notification.rb
Overview
This optional complex element allows a message to be sent a specified URL when the envelope or recipient changes status. It is similar to DocuSign Connect. For example, if an envelope changes from "Sent" to "Delivered", a message containing the updated envelope status and optionally the documents is sent to the URL. When an eventNotification is attached to an envelope using the API, it only applies to the envelope (treating the envelope as the sender). This is different from envelopes created through the console user interface, where the user is treated as the sender.
Instance Attribute Summary collapse
-
#delivery_mode ⇒ Object
Returns the value of attribute delivery_mode.
-
#envelope_events ⇒ Object
A list of envelope-level event statuses that will trigger Connect to send updates to the endpoint specified in the `url` property.
-
#event_data ⇒ Object
Allows you to specify the format of the information the Connect webhooks returns.
-
#events ⇒ Object
Returns the value of attribute events.
-
#include_certificate_of_completion ⇒ Object
When set to *true*, the Connect Service includes the Certificate of Completion with completed envelopes.
-
#include_certificate_with_soap ⇒ Object
When set to *true*, this tells the Connect service to send the DocuSign signedby certificate as part of the outgoing SOAP xml.
-
#include_document_fields ⇒ Object
When set to *true*, the Document Fields associated with envelope documents are included in the data.
-
#include_documents ⇒ Object
When set to *true*, the PDF documents are included in the message along with the updated XML.
-
#include_envelope_void_reason ⇒ Object
When set to *true*, this tells the Connect Service to include the void reason, as entered by the person that voided the envelope, in the message.
-
#include_hmac ⇒ Object
Returns the value of attribute include_hmac.
-
#include_sender_account_as_custom_field ⇒ Object
When set to *true*, the sender account ID is included as a envelope custom field in the data.
-
#include_time_zone ⇒ Object
When set to *true*, the envelope time zone information is included in the message.
-
#logging_enabled ⇒ Object
When set to *true*, logging is turned on for envelope events on the Web Console Connect page.
-
#recipient_events ⇒ Object
A list of recipient event statuses that will trigger Connect to send updates to the endpoint specified in the url property.
-
#require_acknowledgment ⇒ Object
When set to *true*, the DocuSign Connect service checks that the message was received and retries on failures.
-
#sign_message_with_x509_cert ⇒ Object
When set to *true*, messages are signed with an X509 certificate.
-
#soap_name_space ⇒ Object
This lists the namespace in the SOAP listener provided.
-
#url ⇒ Object
Specifies the endpoint to which envelope updates are sent.
-
#use_soap_interface ⇒ Object
When set to *true*, this tells the Connect service that the user's endpoint has implemented a SOAP interface.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ EventNotification
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ EventNotification
Initializes the object
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/docusign_esign/models/event_notification.rb', line 126 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'deliveryMode') self.delivery_mode = attributes[:'deliveryMode'] end if attributes.has_key?(:'envelopeEvents') if (value = attributes[:'envelopeEvents']).is_a?(Array) self.envelope_events = value end end if attributes.has_key?(:'eventData') self.event_data = attributes[:'eventData'] end if attributes.has_key?(:'events') if (value = attributes[:'events']).is_a?(Array) self.events = value end end if attributes.has_key?(:'includeCertificateOfCompletion') self.include_certificate_of_completion = attributes[:'includeCertificateOfCompletion'] end if attributes.has_key?(:'includeCertificateWithSoap') self.include_certificate_with_soap = attributes[:'includeCertificateWithSoap'] end if attributes.has_key?(:'includeDocumentFields') self.include_document_fields = attributes[:'includeDocumentFields'] end if attributes.has_key?(:'includeDocuments') self.include_documents = attributes[:'includeDocuments'] end if attributes.has_key?(:'includeEnvelopeVoidReason') self.include_envelope_void_reason = attributes[:'includeEnvelopeVoidReason'] end if attributes.has_key?(:'includeHMAC') self.include_hmac = attributes[:'includeHMAC'] end if attributes.has_key?(:'includeSenderAccountAsCustomField') self.include_sender_account_as_custom_field = attributes[:'includeSenderAccountAsCustomField'] end if attributes.has_key?(:'includeTimeZone') self.include_time_zone = attributes[:'includeTimeZone'] end if attributes.has_key?(:'loggingEnabled') self.logging_enabled = attributes[:'loggingEnabled'] end if attributes.has_key?(:'recipientEvents') if (value = attributes[:'recipientEvents']).is_a?(Array) self.recipient_events = value end end if attributes.has_key?(:'requireAcknowledgment') self.require_acknowledgment = attributes[:'requireAcknowledgment'] end if attributes.has_key?(:'signMessageWithX509Cert') self. = attributes[:'signMessageWithX509Cert'] end if attributes.has_key?(:'soapNameSpace') self.soap_name_space = attributes[:'soapNameSpace'] end if attributes.has_key?(:'url') self.url = attributes[:'url'] end if attributes.has_key?(:'useSoapInterface') self.use_soap_interface = attributes[:'useSoapInterface'] end end |
Instance Attribute Details
#delivery_mode ⇒ Object
Returns the value of attribute delivery_mode.
18 19 20 |
# File 'lib/docusign_esign/models/event_notification.rb', line 18 def delivery_mode @delivery_mode end |
#envelope_events ⇒ Object
A list of envelope-level event statuses that will trigger Connect to send updates to the endpoint specified in the `url` property. To receive notifications, you must include either an `envelopeEvents` node or a `recipientEvents` node. You do not need to specify both.
21 22 23 |
# File 'lib/docusign_esign/models/event_notification.rb', line 21 def envelope_events @envelope_events end |
#event_data ⇒ Object
Allows you to specify the format of the information the Connect webhooks returns. For more information, see [Connect webhooks with JSON notifications](www.docusign.com/blog/developers/connect-webhooks-json-notifications)
24 25 26 |
# File 'lib/docusign_esign/models/event_notification.rb', line 24 def event_data @event_data end |
#events ⇒ Object
Returns the value of attribute events.
27 28 29 |
# File 'lib/docusign_esign/models/event_notification.rb', line 27 def events @events end |
#include_certificate_of_completion ⇒ Object
When set to *true*, the Connect Service includes the Certificate of Completion with completed envelopes.
30 31 32 |
# File 'lib/docusign_esign/models/event_notification.rb', line 30 def include_certificate_of_completion @include_certificate_of_completion end |
#include_certificate_with_soap ⇒ Object
When set to *true*, this tells the Connect service to send the DocuSign signedby certificate as part of the outgoing SOAP xml. This appears in the XML as wsse:BinarySecurityToken.
33 34 35 |
# File 'lib/docusign_esign/models/event_notification.rb', line 33 def include_certificate_with_soap @include_certificate_with_soap end |
#include_document_fields ⇒ Object
When set to *true*, the Document Fields associated with envelope documents are included in the data. Document Fields are optional custom name-value pairs added to documents using the API.
36 37 38 |
# File 'lib/docusign_esign/models/event_notification.rb', line 36 def include_document_fields @include_document_fields end |
#include_documents ⇒ Object
When set to *true*, the PDF documents are included in the message along with the updated XML.
39 40 41 |
# File 'lib/docusign_esign/models/event_notification.rb', line 39 def include_documents @include_documents end |
#include_envelope_void_reason ⇒ Object
When set to *true*, this tells the Connect Service to include the void reason, as entered by the person that voided the envelope, in the message.
42 43 44 |
# File 'lib/docusign_esign/models/event_notification.rb', line 42 def include_envelope_void_reason @include_envelope_void_reason end |
#include_hmac ⇒ Object
Returns the value of attribute include_hmac.
45 46 47 |
# File 'lib/docusign_esign/models/event_notification.rb', line 45 def include_hmac @include_hmac end |
#include_sender_account_as_custom_field ⇒ Object
When set to *true*, the sender account ID is included as a envelope custom field in the data.
48 49 50 |
# File 'lib/docusign_esign/models/event_notification.rb', line 48 def include_sender_account_as_custom_field @include_sender_account_as_custom_field end |
#include_time_zone ⇒ Object
When set to *true*, the envelope time zone information is included in the message.
51 52 53 |
# File 'lib/docusign_esign/models/event_notification.rb', line 51 def include_time_zone @include_time_zone end |
#logging_enabled ⇒ Object
When set to *true*, logging is turned on for envelope events on the Web Console Connect page.
54 55 56 |
# File 'lib/docusign_esign/models/event_notification.rb', line 54 def logging_enabled @logging_enabled end |
#recipient_events ⇒ Object
A list of recipient event statuses that will trigger Connect to send updates to the endpoint specified in the url property. To receive notifications, you must include either an `envelopeEvents` node or a `recipientEvents` node. You do not need to specify both.
57 58 59 |
# File 'lib/docusign_esign/models/event_notification.rb', line 57 def recipient_events @recipient_events end |
#require_acknowledgment ⇒ Object
When set to *true*, the DocuSign Connect service checks that the message was received and retries on failures.
60 61 62 |
# File 'lib/docusign_esign/models/event_notification.rb', line 60 def require_acknowledgment @require_acknowledgment end |
#sign_message_with_x509_cert ⇒ Object
When set to *true*, messages are signed with an X509 certificate. This provides support for 2-way SSL in the envelope.
63 64 65 |
# File 'lib/docusign_esign/models/event_notification.rb', line 63 def @sign_message_with_x509_cert end |
#soap_name_space ⇒ Object
This lists the namespace in the SOAP listener provided.
66 67 68 |
# File 'lib/docusign_esign/models/event_notification.rb', line 66 def soap_name_space @soap_name_space end |
#url ⇒ Object
Specifies the endpoint to which envelope updates are sent. Udpates are sent as XML unless `useSoapInterface` property is set to *true*.
69 70 71 |
# File 'lib/docusign_esign/models/event_notification.rb', line 69 def url @url end |
#use_soap_interface ⇒ Object
When set to *true*, this tells the Connect service that the user's endpoint has implemented a SOAP interface.
72 73 74 |
# File 'lib/docusign_esign/models/event_notification.rb', line 72 def use_soap_interface @use_soap_interface end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/docusign_esign/models/event_notification.rb', line 75 def self.attribute_map { :'delivery_mode' => :'deliveryMode', :'envelope_events' => :'envelopeEvents', :'event_data' => :'eventData', :'events' => :'events', :'include_certificate_of_completion' => :'includeCertificateOfCompletion', :'include_certificate_with_soap' => :'includeCertificateWithSoap', :'include_document_fields' => :'includeDocumentFields', :'include_documents' => :'includeDocuments', :'include_envelope_void_reason' => :'includeEnvelopeVoidReason', :'include_hmac' => :'includeHMAC', :'include_sender_account_as_custom_field' => :'includeSenderAccountAsCustomField', :'include_time_zone' => :'includeTimeZone', :'logging_enabled' => :'loggingEnabled', :'recipient_events' => :'recipientEvents', :'require_acknowledgment' => :'requireAcknowledgment', :'sign_message_with_x509_cert' => :'signMessageWithX509Cert', :'soap_name_space' => :'soapNameSpace', :'url' => :'url', :'use_soap_interface' => :'useSoapInterface' } end |
.swagger_types ⇒ Object
Attribute type mapping.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/docusign_esign/models/event_notification.rb', line 100 def self.swagger_types { :'delivery_mode' => :'String', :'envelope_events' => :'Array<EnvelopeEvent>', :'event_data' => :'ConnectEventData', :'events' => :'Array<String>', :'include_certificate_of_completion' => :'String', :'include_certificate_with_soap' => :'String', :'include_document_fields' => :'String', :'include_documents' => :'String', :'include_envelope_void_reason' => :'String', :'include_hmac' => :'String', :'include_sender_account_as_custom_field' => :'String', :'include_time_zone' => :'String', :'logging_enabled' => :'String', :'recipient_events' => :'Array<RecipientEvent>', :'require_acknowledgment' => :'String', :'sign_message_with_x509_cert' => :'String', :'soap_name_space' => :'String', :'url' => :'String', :'use_soap_interface' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/docusign_esign/models/event_notification.rb', line 230 def ==(o) return true if self.equal?(o) self.class == o.class && delivery_mode == o.delivery_mode && envelope_events == o.envelope_events && event_data == o.event_data && events == o.events && include_certificate_of_completion == o.include_certificate_of_completion && include_certificate_with_soap == o.include_certificate_with_soap && include_document_fields == o.include_document_fields && include_documents == o.include_documents && include_envelope_void_reason == o.include_envelope_void_reason && include_hmac == o.include_hmac && include_sender_account_as_custom_field == o.include_sender_account_as_custom_field && include_time_zone == o.include_time_zone && logging_enabled == o.logging_enabled && recipient_events == o.recipient_events && require_acknowledgment == o.require_acknowledgment && == o. && soap_name_space == o.soap_name_space && url == o.url && use_soap_interface == o.use_soap_interface end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/docusign_esign/models/event_notification.rb', line 290 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = DocuSign_eSign.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/docusign_esign/models/event_notification.rb', line 356 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/docusign_esign/models/event_notification.rb', line 269 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
256 257 258 |
# File 'lib/docusign_esign/models/event_notification.rb', line 256 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
262 263 264 |
# File 'lib/docusign_esign/models/event_notification.rb', line 262 def hash [delivery_mode, envelope_events, event_data, events, include_certificate_of_completion, include_certificate_with_soap, include_document_fields, include_documents, include_envelope_void_reason, include_hmac, include_sender_account_as_custom_field, include_time_zone, logging_enabled, recipient_events, require_acknowledgment, , soap_name_space, url, use_soap_interface].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
217 218 219 220 |
# File 'lib/docusign_esign/models/event_notification.rb', line 217 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
336 337 338 |
# File 'lib/docusign_esign/models/event_notification.rb', line 336 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
342 343 344 345 346 347 348 349 350 |
# File 'lib/docusign_esign/models/event_notification.rb', line 342 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
330 331 332 |
# File 'lib/docusign_esign/models/event_notification.rb', line 330 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
224 225 226 |
# File 'lib/docusign_esign/models/event_notification.rb', line 224 def valid? true end |