docusign_esign 3.1.0.rc2 → 3.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +73 -0
- data/lib/docusign_esign.rb +7 -1
- data/lib/docusign_esign/api/.DS_Store +0 -0
- data/lib/docusign_esign/api/accounts_api.rb +0 -49
- data/lib/docusign_esign/api/billing_api.rb +51 -0
- data/lib/docusign_esign/api/bulk_envelopes_api.rb +1 -1
- data/lib/docusign_esign/api/envelopes_api.rb +3 -3
- data/lib/docusign_esign/models/account_billing_plan.rb +10 -1
- data/lib/docusign_esign/models/account_billing_plan_response.rb +10 -1
- data/lib/docusign_esign/models/account_identity_input_option.rb +208 -0
- data/lib/docusign_esign/models/account_identity_verification_workflow.rb +13 -1
- data/lib/docusign_esign/models/account_settings_information.rb +96 -1
- data/lib/docusign_esign/models/account_ui_settings.rb +20 -1
- data/lib/docusign_esign/models/agent.rb +11 -1
- data/lib/docusign_esign/models/carbon_copy.rb +11 -1
- data/lib/docusign_esign/models/certified_delivery.rb +11 -1
- data/lib/docusign_esign/models/connect_custom_configuration.rb +10 -1
- data/lib/docusign_esign/models/connect_event_data.rb +210 -0
- data/lib/docusign_esign/models/document.rb +11 -11
- data/lib/docusign_esign/models/document_fields_information.rb +1 -1
- data/lib/docusign_esign/models/downgrade_billing_plan_information.rb +197 -0
- data/lib/docusign_esign/models/downgrade_plan_update_response.rb +248 -0
- data/lib/docusign_esign/models/draw.rb +911 -0
- data/lib/docusign_esign/models/editor.rb +11 -1
- data/lib/docusign_esign/models/envelope.rb +11 -1
- data/lib/docusign_esign/models/envelope_definition.rb +11 -1
- data/lib/docusign_esign/models/envelope_document.rb +1 -11
- data/lib/docusign_esign/models/envelope_template.rb +11 -1
- data/lib/docusign_esign/models/event_notification.rb +10 -1
- data/lib/docusign_esign/models/in_person_signer.rb +11 -1
- data/lib/docusign_esign/models/intermediary.rb +11 -1
- data/lib/docusign_esign/models/notary_host.rb +11 -1
- data/lib/docusign_esign/models/recipient_identity_input_option.rb +210 -0
- data/lib/docusign_esign/models/recipient_identity_phone_number.rb +208 -0
- data/lib/docusign_esign/models/recipient_identity_verification.rb +13 -1
- data/lib/docusign_esign/models/seal_sign.rb +11 -1
- data/lib/docusign_esign/models/signer.rb +12 -2
- data/lib/docusign_esign/models/tab_account_settings.rb +20 -1
- data/lib/docusign_esign/models/tabs.rb +13 -1
- data/lib/docusign_esign/models/template_tabs.rb +13 -1
- data/lib/docusign_esign/models/usage_history.rb +1 -1
- data/lib/docusign_esign/models/user_information.rb +1 -1
- data/lib/docusign_esign/models/witness.rb +11 -1
- data/lib/docusign_esign/version.rb +1 -1
- data/tests/Gemfile.lock +42 -0
- data/tests/docs/private.pem +27 -0
- metadata +13 -3
- data/docusign_esign-4.1.210.gem +0 -0
@@ -35,6 +35,8 @@ module DocuSign_eSign
|
|
35
35
|
# A comma separated list of �Envelope� related events that are tracked through Connect. The possible event values are: Sent, Delivered, Completed, Declined, and Voided.
|
36
36
|
attr_accessor :envelope_events
|
37
37
|
|
38
|
+
attr_accessor :event_data
|
39
|
+
|
38
40
|
#
|
39
41
|
attr_accessor :external_folder_id
|
40
42
|
|
@@ -130,6 +132,7 @@ module DocuSign_eSign
|
|
130
132
|
:'connect_id' => :'connectId',
|
131
133
|
:'enable_log' => :'enableLog',
|
132
134
|
:'envelope_events' => :'envelopeEvents',
|
135
|
+
:'event_data' => :'eventData',
|
133
136
|
:'external_folder_id' => :'externalFolderId',
|
134
137
|
:'external_folder_label' => :'externalFolderLabel',
|
135
138
|
:'include_certificate_of_completion' => :'includeCertificateOfCompletion',
|
@@ -171,6 +174,7 @@ module DocuSign_eSign
|
|
171
174
|
:'connect_id' => :'String',
|
172
175
|
:'enable_log' => :'String',
|
173
176
|
:'envelope_events' => :'Array<String>',
|
177
|
+
:'event_data' => :'ConnectEventData',
|
174
178
|
:'external_folder_id' => :'String',
|
175
179
|
:'external_folder_label' => :'String',
|
176
180
|
:'include_certificate_of_completion' => :'String',
|
@@ -240,6 +244,10 @@ module DocuSign_eSign
|
|
240
244
|
end
|
241
245
|
end
|
242
246
|
|
247
|
+
if attributes.has_key?(:'eventData')
|
248
|
+
self.event_data = attributes[:'eventData']
|
249
|
+
end
|
250
|
+
|
243
251
|
if attributes.has_key?(:'externalFolderId')
|
244
252
|
self.external_folder_id = attributes[:'externalFolderId']
|
245
253
|
end
|
@@ -387,6 +395,7 @@ module DocuSign_eSign
|
|
387
395
|
connect_id == o.connect_id &&
|
388
396
|
enable_log == o.enable_log &&
|
389
397
|
envelope_events == o.envelope_events &&
|
398
|
+
event_data == o.event_data &&
|
390
399
|
external_folder_id == o.external_folder_id &&
|
391
400
|
external_folder_label == o.external_folder_label &&
|
392
401
|
include_certificate_of_completion == o.include_certificate_of_completion &&
|
@@ -426,7 +435,7 @@ module DocuSign_eSign
|
|
426
435
|
# Calculates hash code according to all attributes.
|
427
436
|
# @return [Fixnum] Hash code
|
428
437
|
def hash
|
429
|
-
[allow_envelope_publish, allow_salesforce_publish, all_users, configuration_type, connect_id, enable_log, envelope_events, external_folder_id, external_folder_label, include_certificate_of_completion, include_cert_soap_header, include_document_fields, include_documents, include_envelope_void_reason, include_hmac, include_sender_accountas_custom_field, include_time_zone_information, name, password, recipient_events, require_mutual_tls, requires_acknowledgement, salesforce_api_version, salesforce_authcode, salesforce_call_back_url, salesforce_documents_as_content_files, sender_override, sender_selectable_items, sf_objects, sign_message_with_x509_certificate, soap_namespace, url_to_publish_to, user_ids, user_name, use_soap_interface].hash
|
438
|
+
[allow_envelope_publish, allow_salesforce_publish, all_users, configuration_type, connect_id, enable_log, envelope_events, event_data, external_folder_id, external_folder_label, include_certificate_of_completion, include_cert_soap_header, include_document_fields, include_documents, include_envelope_void_reason, include_hmac, include_sender_accountas_custom_field, include_time_zone_information, name, password, recipient_events, require_mutual_tls, requires_acknowledgement, salesforce_api_version, salesforce_authcode, salesforce_call_back_url, salesforce_documents_as_content_files, sender_override, sender_selectable_items, sf_objects, sign_message_with_x509_certificate, soap_namespace, url_to_publish_to, user_ids, user_name, use_soap_interface].hash
|
430
439
|
end
|
431
440
|
|
432
441
|
# Builds the object from hash
|
@@ -0,0 +1,210 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign REST API
|
3
|
+
|
4
|
+
#The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
|
5
|
+
|
6
|
+
OpenAPI spec version: v2.1
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_eSign
|
15
|
+
|
16
|
+
class ConnectEventData
|
17
|
+
#
|
18
|
+
attr_accessor :format
|
19
|
+
|
20
|
+
#
|
21
|
+
attr_accessor :include_data
|
22
|
+
|
23
|
+
#
|
24
|
+
attr_accessor :version
|
25
|
+
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'format' => :'format',
|
31
|
+
:'include_data' => :'includeData',
|
32
|
+
:'version' => :'version'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.swagger_types
|
38
|
+
{
|
39
|
+
:'format' => :'String',
|
40
|
+
:'include_data' => :'Array<String>',
|
41
|
+
:'version' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
return unless attributes.is_a?(Hash)
|
49
|
+
|
50
|
+
# convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
52
|
+
|
53
|
+
if attributes.has_key?(:'format')
|
54
|
+
self.format = attributes[:'format']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes.has_key?(:'includeData')
|
58
|
+
if (value = attributes[:'includeData']).is_a?(Array)
|
59
|
+
self.include_data = value
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
if attributes.has_key?(:'version')
|
64
|
+
self.version = attributes[:'version']
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
+
# @return Array for valid properies with the reasons
|
71
|
+
def list_invalid_properties
|
72
|
+
invalid_properties = Array.new
|
73
|
+
return invalid_properties
|
74
|
+
end
|
75
|
+
|
76
|
+
# Check to see if the all the properties in the model are valid
|
77
|
+
# @return true if the model is valid
|
78
|
+
def valid?
|
79
|
+
return true
|
80
|
+
end
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param [Object] Object to be compared
|
84
|
+
def ==(o)
|
85
|
+
return true if self.equal?(o)
|
86
|
+
self.class == o.class &&
|
87
|
+
format == o.format &&
|
88
|
+
include_data == o.include_data &&
|
89
|
+
version == o.version
|
90
|
+
end
|
91
|
+
|
92
|
+
# @see the `==` method
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def eql?(o)
|
95
|
+
self == o
|
96
|
+
end
|
97
|
+
|
98
|
+
# Calculates hash code according to all attributes.
|
99
|
+
# @return [Fixnum] Hash code
|
100
|
+
def hash
|
101
|
+
[format, include_data, version].hash
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def build_from_hash(attributes)
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
109
|
+
self.class.swagger_types.each_pair do |key, type|
|
110
|
+
if type =~ /\AArray<(.*)>/i
|
111
|
+
# check to ensure the input is an array given that the the attribute
|
112
|
+
# is documented as an array but the input is not
|
113
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
114
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
115
|
+
end
|
116
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
117
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
118
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
119
|
+
end
|
120
|
+
|
121
|
+
self
|
122
|
+
end
|
123
|
+
|
124
|
+
# Deserializes the data based on type
|
125
|
+
# @param string type Data type
|
126
|
+
# @param string value Value to be deserialized
|
127
|
+
# @return [Object] Deserialized data
|
128
|
+
def _deserialize(type, value)
|
129
|
+
case type.to_sym
|
130
|
+
when :DateTime
|
131
|
+
DateTime.parse(value)
|
132
|
+
when :Date
|
133
|
+
Date.parse(value)
|
134
|
+
when :String
|
135
|
+
value.to_s
|
136
|
+
when :Integer
|
137
|
+
value.to_i
|
138
|
+
when :Float
|
139
|
+
value.to_f
|
140
|
+
when :BOOLEAN
|
141
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
142
|
+
true
|
143
|
+
else
|
144
|
+
false
|
145
|
+
end
|
146
|
+
when :Object
|
147
|
+
# generic object (usually a Hash), return directly
|
148
|
+
value
|
149
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
150
|
+
inner_type = Regexp.last_match[:inner_type]
|
151
|
+
value.map { |v| _deserialize(inner_type, v) }
|
152
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
153
|
+
k_type = Regexp.last_match[:k_type]
|
154
|
+
v_type = Regexp.last_match[:v_type]
|
155
|
+
{}.tap do |hash|
|
156
|
+
value.each do |k, v|
|
157
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
else # model
|
161
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
162
|
+
temp_model.build_from_hash(value)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
# Returns the string representation of the object
|
167
|
+
# @return [String] String presentation of the object
|
168
|
+
def to_s
|
169
|
+
to_hash.to_s
|
170
|
+
end
|
171
|
+
|
172
|
+
# to_body is an alias to to_hash (backward compatibility)
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
174
|
+
def to_body
|
175
|
+
to_hash
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the object in the form of hash
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_hash
|
181
|
+
hash = {}
|
182
|
+
self.class.attribute_map.each_pair do |attr, param|
|
183
|
+
value = self.send(attr)
|
184
|
+
next if value.nil?
|
185
|
+
hash[param] = _to_hash(value)
|
186
|
+
end
|
187
|
+
hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Outputs non-array value in the form of hash
|
191
|
+
# For object, use to_hash. Otherwise, just return the value
|
192
|
+
# @param [Object] value Any valid value
|
193
|
+
# @return [Hash] Returns the value in the form of hash
|
194
|
+
def _to_hash(value)
|
195
|
+
if value.is_a?(Array)
|
196
|
+
value.compact.map{ |v| _to_hash(v) }
|
197
|
+
elsif value.is_a?(Hash)
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
200
|
+
end
|
201
|
+
elsif value.respond_to? :to_hash
|
202
|
+
value.to_hash
|
203
|
+
else
|
204
|
+
value
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
end
|
209
|
+
|
210
|
+
end
|
@@ -26,9 +26,6 @@ module DocuSign_eSign
|
|
26
26
|
#
|
27
27
|
attr_accessor :document_fields
|
28
28
|
|
29
|
-
#
|
30
|
-
attr_accessor :document_group
|
31
|
-
|
32
29
|
# Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
|
33
30
|
attr_accessor :document_id
|
34
31
|
|
@@ -91,6 +88,9 @@ module DocuSign_eSign
|
|
91
88
|
#
|
92
89
|
attr_accessor :signer_must_acknowledge
|
93
90
|
|
91
|
+
#
|
92
|
+
attr_accessor :signer_must_acknowledge_use_account_default
|
93
|
+
|
94
94
|
attr_accessor :tabs
|
95
95
|
|
96
96
|
# When set to **true**, the sender cannot change any attributes of the recipient. Used only when working with template recipients.
|
@@ -113,7 +113,6 @@ module DocuSign_eSign
|
|
113
113
|
:'display' => :'display',
|
114
114
|
:'document_base64' => :'documentBase64',
|
115
115
|
:'document_fields' => :'documentFields',
|
116
|
-
:'document_group' => :'documentGroup',
|
117
116
|
:'document_id' => :'documentId',
|
118
117
|
:'encrypted_with_key_manager' => :'encryptedWithKeyManager',
|
119
118
|
:'file_extension' => :'fileExtension',
|
@@ -135,6 +134,7 @@ module DocuSign_eSign
|
|
135
134
|
:'pdf_widgets_base64' => :'pdfWidgetsBase64',
|
136
135
|
:'remote_url' => :'remoteUrl',
|
137
136
|
:'signer_must_acknowledge' => :'signerMustAcknowledge',
|
137
|
+
:'signer_must_acknowledge_use_account_default' => :'signerMustAcknowledgeUseAccountDefault',
|
138
138
|
:'tabs' => :'tabs',
|
139
139
|
:'template_locked' => :'templateLocked',
|
140
140
|
:'template_required' => :'templateRequired',
|
@@ -150,7 +150,6 @@ module DocuSign_eSign
|
|
150
150
|
:'display' => :'String',
|
151
151
|
:'document_base64' => :'String',
|
152
152
|
:'document_fields' => :'Array<NameValue>',
|
153
|
-
:'document_group' => :'String',
|
154
153
|
:'document_id' => :'String',
|
155
154
|
:'encrypted_with_key_manager' => :'String',
|
156
155
|
:'file_extension' => :'String',
|
@@ -172,6 +171,7 @@ module DocuSign_eSign
|
|
172
171
|
:'pdf_widgets_base64' => :'String',
|
173
172
|
:'remote_url' => :'String',
|
174
173
|
:'signer_must_acknowledge' => :'String',
|
174
|
+
:'signer_must_acknowledge_use_account_default' => :'BOOLEAN',
|
175
175
|
:'tabs' => :'Tabs',
|
176
176
|
:'template_locked' => :'String',
|
177
177
|
:'template_required' => :'String',
|
@@ -206,10 +206,6 @@ module DocuSign_eSign
|
|
206
206
|
end
|
207
207
|
end
|
208
208
|
|
209
|
-
if attributes.has_key?(:'documentGroup')
|
210
|
-
self.document_group = attributes[:'documentGroup']
|
211
|
-
end
|
212
|
-
|
213
209
|
if attributes.has_key?(:'documentId')
|
214
210
|
self.document_id = attributes[:'documentId']
|
215
211
|
end
|
@@ -300,6 +296,10 @@ module DocuSign_eSign
|
|
300
296
|
self.signer_must_acknowledge = attributes[:'signerMustAcknowledge']
|
301
297
|
end
|
302
298
|
|
299
|
+
if attributes.has_key?(:'signerMustAcknowledgeUseAccountDefault')
|
300
|
+
self.signer_must_acknowledge_use_account_default = attributes[:'signerMustAcknowledgeUseAccountDefault']
|
301
|
+
end
|
302
|
+
|
303
303
|
if attributes.has_key?(:'tabs')
|
304
304
|
self.tabs = attributes[:'tabs']
|
305
305
|
end
|
@@ -344,7 +344,6 @@ module DocuSign_eSign
|
|
344
344
|
display == o.display &&
|
345
345
|
document_base64 == o.document_base64 &&
|
346
346
|
document_fields == o.document_fields &&
|
347
|
-
document_group == o.document_group &&
|
348
347
|
document_id == o.document_id &&
|
349
348
|
encrypted_with_key_manager == o.encrypted_with_key_manager &&
|
350
349
|
file_extension == o.file_extension &&
|
@@ -366,6 +365,7 @@ module DocuSign_eSign
|
|
366
365
|
pdf_widgets_base64 == o.pdf_widgets_base64 &&
|
367
366
|
remote_url == o.remote_url &&
|
368
367
|
signer_must_acknowledge == o.signer_must_acknowledge &&
|
368
|
+
signer_must_acknowledge_use_account_default == o.signer_must_acknowledge_use_account_default &&
|
369
369
|
tabs == o.tabs &&
|
370
370
|
template_locked == o.template_locked &&
|
371
371
|
template_required == o.template_required &&
|
@@ -382,7 +382,7 @@ module DocuSign_eSign
|
|
382
382
|
# Calculates hash code according to all attributes.
|
383
383
|
# @return [Fixnum] Hash code
|
384
384
|
def hash
|
385
|
-
[apply_anchor_tabs, display, document_base64, document_fields,
|
385
|
+
[apply_anchor_tabs, display, document_base64, document_fields, document_id, encrypted_with_key_manager, file_extension, file_format_hint, html_definition, include_in_download, is_dynamic_xfa, is_static_xfa, match_boxes, name, ocr_requests, order, page_count, pages, page_sizes, password, pdf_fields_data, pdf_form_field_option, pdf_widgets_base64, remote_url, signer_must_acknowledge, signer_must_acknowledge_use_account_default, tabs, template_locked, template_required, transform_pdf_fields, uri].hash
|
386
386
|
end
|
387
387
|
|
388
388
|
# Builds the object from hash
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
module DocuSign_eSign
|
15
15
|
|
16
16
|
class DocumentFieldsInformation
|
17
|
-
# The array of name/value custom data strings to be added to a document. Custom document field information is returned in the status, but otherwise is not used by DocuSign. The array contains the elements: * name
|
17
|
+
# The array of name/value custom data strings to be added to a document. Custom document field information is returned in the status, but otherwise is not used by DocuSign. The array contains the elements: * name - A string that can be a maximum of 50 characters. * value - A string that can be a maximum of 200 characters. *IMPORTANT*: If you are using xml, the name/value pair is contained in a nameValue element.
|
18
18
|
attr_accessor :document_fields
|
19
19
|
|
20
20
|
|
@@ -0,0 +1,197 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign REST API
|
3
|
+
|
4
|
+
#The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
|
5
|
+
|
6
|
+
OpenAPI spec version: v2.1
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_eSign
|
15
|
+
|
16
|
+
class DowngradeBillingPlanInformation
|
17
|
+
#
|
18
|
+
attr_accessor :downgrade_event_type
|
19
|
+
|
20
|
+
attr_accessor :plan_information
|
21
|
+
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'downgrade_event_type' => :'downgradeEventType',
|
27
|
+
:'plan_information' => :'planInformation'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'downgrade_event_type' => :'String',
|
35
|
+
:'plan_information' => :'PlanInformation'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
46
|
+
|
47
|
+
if attributes.has_key?(:'downgradeEventType')
|
48
|
+
self.downgrade_event_type = attributes[:'downgradeEventType']
|
49
|
+
end
|
50
|
+
|
51
|
+
if attributes.has_key?(:'planInformation')
|
52
|
+
self.plan_information = attributes[:'planInformation']
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
58
|
+
# @return Array for valid properies with the reasons
|
59
|
+
def list_invalid_properties
|
60
|
+
invalid_properties = Array.new
|
61
|
+
return invalid_properties
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
def valid?
|
67
|
+
return true
|
68
|
+
end
|
69
|
+
|
70
|
+
# Checks equality by comparing each attribute.
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def ==(o)
|
73
|
+
return true if self.equal?(o)
|
74
|
+
self.class == o.class &&
|
75
|
+
downgrade_event_type == o.downgrade_event_type &&
|
76
|
+
plan_information == o.plan_information
|
77
|
+
end
|
78
|
+
|
79
|
+
# @see the `==` method
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def eql?(o)
|
82
|
+
self == o
|
83
|
+
end
|
84
|
+
|
85
|
+
# Calculates hash code according to all attributes.
|
86
|
+
# @return [Fixnum] Hash code
|
87
|
+
def hash
|
88
|
+
[downgrade_event_type, plan_information].hash
|
89
|
+
end
|
90
|
+
|
91
|
+
# Builds the object from hash
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
+
# @return [Object] Returns the model itself
|
94
|
+
def build_from_hash(attributes)
|
95
|
+
return nil unless attributes.is_a?(Hash)
|
96
|
+
self.class.swagger_types.each_pair do |key, type|
|
97
|
+
if type =~ /\AArray<(.*)>/i
|
98
|
+
# check to ensure the input is an array given that the the attribute
|
99
|
+
# is documented as an array but the input is not
|
100
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
101
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
102
|
+
end
|
103
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
104
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
105
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
106
|
+
end
|
107
|
+
|
108
|
+
self
|
109
|
+
end
|
110
|
+
|
111
|
+
# Deserializes the data based on type
|
112
|
+
# @param string type Data type
|
113
|
+
# @param string value Value to be deserialized
|
114
|
+
# @return [Object] Deserialized data
|
115
|
+
def _deserialize(type, value)
|
116
|
+
case type.to_sym
|
117
|
+
when :DateTime
|
118
|
+
DateTime.parse(value)
|
119
|
+
when :Date
|
120
|
+
Date.parse(value)
|
121
|
+
when :String
|
122
|
+
value.to_s
|
123
|
+
when :Integer
|
124
|
+
value.to_i
|
125
|
+
when :Float
|
126
|
+
value.to_f
|
127
|
+
when :BOOLEAN
|
128
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
129
|
+
true
|
130
|
+
else
|
131
|
+
false
|
132
|
+
end
|
133
|
+
when :Object
|
134
|
+
# generic object (usually a Hash), return directly
|
135
|
+
value
|
136
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
137
|
+
inner_type = Regexp.last_match[:inner_type]
|
138
|
+
value.map { |v| _deserialize(inner_type, v) }
|
139
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
140
|
+
k_type = Regexp.last_match[:k_type]
|
141
|
+
v_type = Regexp.last_match[:v_type]
|
142
|
+
{}.tap do |hash|
|
143
|
+
value.each do |k, v|
|
144
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
else # model
|
148
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
149
|
+
temp_model.build_from_hash(value)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# Returns the string representation of the object
|
154
|
+
# @return [String] String presentation of the object
|
155
|
+
def to_s
|
156
|
+
to_hash.to_s
|
157
|
+
end
|
158
|
+
|
159
|
+
# to_body is an alias to to_hash (backward compatibility)
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
161
|
+
def to_body
|
162
|
+
to_hash
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the object in the form of hash
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
167
|
+
def to_hash
|
168
|
+
hash = {}
|
169
|
+
self.class.attribute_map.each_pair do |attr, param|
|
170
|
+
value = self.send(attr)
|
171
|
+
next if value.nil?
|
172
|
+
hash[param] = _to_hash(value)
|
173
|
+
end
|
174
|
+
hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Outputs non-array value in the form of hash
|
178
|
+
# For object, use to_hash. Otherwise, just return the value
|
179
|
+
# @param [Object] value Any valid value
|
180
|
+
# @return [Hash] Returns the value in the form of hash
|
181
|
+
def _to_hash(value)
|
182
|
+
if value.is_a?(Array)
|
183
|
+
value.compact.map{ |v| _to_hash(v) }
|
184
|
+
elsif value.is_a?(Hash)
|
185
|
+
{}.tap do |hash|
|
186
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
187
|
+
end
|
188
|
+
elsif value.respond_to? :to_hash
|
189
|
+
value.to_hash
|
190
|
+
else
|
191
|
+
value
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
end
|
196
|
+
|
197
|
+
end
|