docusign_esign 2.1.0 → 2.2.0.pre.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 +1 -1
- data/docusign_esign-3.1.0.pre.rc1.gem +0 -0
- data/lib/docusign_esign.rb +450 -383
- data/{tests → lib/docusign_esign/api}/.DS_Store +0 -0
- data/lib/docusign_esign/api/accounts_api.rb +69 -8
- data/lib/docusign_esign/api/connect_api.rb +400 -0
- data/lib/docusign_esign/api/envelopes_api.rb +18 -6
- data/lib/docusign_esign/api/organizations_api.rb +232 -0
- data/lib/docusign_esign/api/tsps_api.rb +256 -0
- data/lib/docusign_esign/models/access_code_format.rb +273 -0
- data/lib/docusign_esign/models/account_notification.rb +206 -0
- data/lib/docusign_esign/models/account_ui_settings.rb +330 -0
- data/lib/docusign_esign/models/bcc_email_archive.rb +276 -0
- data/lib/docusign_esign/models/bcc_email_archive_history.rb +237 -0
- data/lib/docusign_esign/models/bcc_email_archive_history_list.rb +250 -0
- data/lib/docusign_esign/models/bcc_email_archive_list.rb +250 -0
- data/lib/docusign_esign/models/bulk_send_request.rb +188 -0
- data/lib/docusign_esign/models/bulk_send_response.rb +222 -0
- data/lib/docusign_esign/models/bulk_send_test_response.rb +212 -0
- data/lib/docusign_esign/models/bulk_sending_copy.rb +222 -0
- data/lib/docusign_esign/models/bulk_sending_copy_custom_field.rb +198 -0
- data/lib/docusign_esign/models/bulk_sending_copy_recipient.rb +382 -0
- data/lib/docusign_esign/models/bulk_sending_copy_tab.rb +198 -0
- data/lib/docusign_esign/models/bulk_sending_list.rb +210 -0
- data/lib/docusign_esign/models/bulk_sending_list_summaries.rb +190 -0
- data/lib/docusign_esign/models/bulk_sending_list_summary.rb +218 -0
- data/lib/docusign_esign/models/carbon_copy.rb +19 -1
- data/lib/docusign_esign/models/certified_delivery.rb +19 -1
- data/lib/docusign_esign/models/comment.rb +392 -0
- data/lib/docusign_esign/models/comment_history_result.rb +220 -0
- data/lib/docusign_esign/models/comment_publish.rb +244 -0
- data/lib/docusign_esign/models/comment_thread.rb +961 -0
- data/lib/docusign_esign/models/comments_publish.rb +190 -0
- data/lib/docusign_esign/models/connect_salesforce_field.rb +258 -0
- data/lib/docusign_esign/models/connect_salesforce_object.rb +272 -0
- data/lib/docusign_esign/models/connect_user_object.rb +230 -0
- data/lib/docusign_esign/models/direct_debit_processor_information.rb +298 -0
- data/lib/docusign_esign/models/display_appliance_document.rb +258 -0
- data/lib/docusign_esign/models/display_appliance_document_page.rb +278 -0
- data/lib/docusign_esign/models/display_appliance_envelope.rb +328 -0
- data/lib/docusign_esign/models/display_appliance_info.rb +235 -0
- data/lib/docusign_esign/models/display_appliance_page.rb +278 -0
- data/lib/docusign_esign/models/display_appliance_pdf.rb +267 -0
- data/lib/docusign_esign/models/display_appliance_recipient.rb +388 -0
- data/lib/docusign_esign/models/display_appliance_signer_attachment.rb +248 -0
- data/lib/docusign_esign/models/document_fields_information.rb +1 -1
- data/lib/docusign_esign/models/document_html_display_settings.rb +11 -1
- data/lib/docusign_esign/models/envelope_document.rb +11 -1
- data/lib/docusign_esign/models/envelope_metadata.rb +208 -0
- data/lib/docusign_esign/models/envelope_purge_configuration.rb +218 -0
- data/lib/docusign_esign/models/envelope_transfer_rule.rb +273 -0
- data/lib/docusign_esign/models/envelope_transfer_rule_information.rb +250 -0
- data/lib/docusign_esign/models/envelope_transfer_rule_request.rb +279 -0
- data/lib/docusign_esign/models/external_claim.rb +218 -0
- data/lib/docusign_esign/models/external_document_sources.rb +273 -0
- data/lib/docusign_esign/models/favorite_templates_content_item.rb +207 -0
- data/lib/docusign_esign/models/favorite_templates_info.rb +209 -0
- data/lib/docusign_esign/models/feature_available_metadata.rb +198 -0
- data/lib/docusign_esign/models/folder_shared_item.rb +289 -0
- data/lib/docusign_esign/models/form_data_item.rb +227 -0
- data/lib/docusign_esign/models/graphics_context.rb +208 -0
- data/lib/docusign_esign/models/id_check_configuration.rb +210 -0
- data/lib/docusign_esign/models/id_check_security_step.rb +188 -0
- data/lib/docusign_esign/models/locale_policy.rb +595 -0
- data/lib/docusign_esign/models/locale_policy_tab.rb +298 -0
- data/lib/docusign_esign/models/new_account_definition.rb +11 -1
- data/lib/docusign_esign/models/notification_default_settings.rb +196 -0
- data/lib/docusign_esign/models/notification_defaults.rb +196 -0
- data/lib/docusign_esign/models/offline_attributes.rb +238 -0
- data/lib/docusign_esign/models/page_size.rb +198 -0
- data/lib/docusign_esign/models/path_extended_element.rb +208 -0
- data/lib/docusign_esign/models/pay_pal_legacy_settings.rb +228 -0
- data/lib/docusign_esign/models/payment_gateway_account_setting.rb +218 -0
- data/lib/docusign_esign/models/payment_method_with_options.rb +200 -0
- data/lib/docusign_esign/models/poly_line.rb +218 -0
- data/lib/docusign_esign/models/poly_line_overlay.rb +885 -0
- data/lib/docusign_esign/models/recipient_email_notification.rb +1 -1
- data/lib/docusign_esign/models/recipient_preview_request.rb +278 -0
- data/lib/docusign_esign/models/recipient_proof_file.rb +188 -0
- data/lib/docusign_esign/models/signature_properties.rb +198 -0
- data/lib/docusign_esign/models/signer.rb +11 -2
- data/lib/docusign_esign/models/smart_section_display_settings.rb +11 -1
- data/lib/docusign_esign/models/tab_group.rb +911 -0
- 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 +10 -1
- data/lib/docusign_esign/models/workspace_settings.rb +188 -0
- data/lib/docusign_esign/version.rb +1 -1
- data/tests/Gemfile.lock +1 -1
- data/tests/spec/unit_tests_using_jwt_spec.rb +6 -3
- metadata +74 -7
- data/Gemfile.lock +0 -73
- data/lib/docusign_esign/api/trust_service_providers_api.rb +0 -73
@@ -20,7 +20,7 @@ module DocuSign_eSign
|
|
20
20
|
# 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.
|
21
21
|
attr_accessor :email_subject
|
22
22
|
|
23
|
-
# A simple type enumeration of the language used. The supported languages, with the language value shown in parenthesis, are: Arabic (ar), Bahasa Indonesia (id), Bahasa Melayu (ms) Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro),Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk), and Vietnamese (vi).
|
23
|
+
# A simple type enumeration of the language used. The supported languages, with the language value shown in parenthesis, are: Arabic (ar), Armenian (hy), Bahasa Indonesia (id), Bahasa Melayu (ms) Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro),Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk), and Vietnamese (vi).
|
24
24
|
attr_accessor :supported_language
|
25
25
|
|
26
26
|
|
@@ -0,0 +1,278 @@
|
|
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 RecipientPreviewRequest
|
17
|
+
#
|
18
|
+
attr_accessor :assertion_id
|
19
|
+
|
20
|
+
#
|
21
|
+
attr_accessor :authentication_instant
|
22
|
+
|
23
|
+
#
|
24
|
+
attr_accessor :authentication_method
|
25
|
+
|
26
|
+
#
|
27
|
+
attr_accessor :ping_frequency
|
28
|
+
|
29
|
+
#
|
30
|
+
attr_accessor :ping_url
|
31
|
+
|
32
|
+
# Unique for the recipient. It is used by the tab element to indicate which recipient is to sign the Document.
|
33
|
+
attr_accessor :recipient_id
|
34
|
+
|
35
|
+
#
|
36
|
+
attr_accessor :return_url
|
37
|
+
|
38
|
+
#
|
39
|
+
attr_accessor :security_domain
|
40
|
+
|
41
|
+
#
|
42
|
+
attr_accessor :x_frame_options
|
43
|
+
|
44
|
+
#
|
45
|
+
attr_accessor :x_frame_options_allow_from_url
|
46
|
+
|
47
|
+
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
49
|
+
def self.attribute_map
|
50
|
+
{
|
51
|
+
:'assertion_id' => :'assertionId',
|
52
|
+
:'authentication_instant' => :'authenticationInstant',
|
53
|
+
:'authentication_method' => :'authenticationMethod',
|
54
|
+
:'ping_frequency' => :'pingFrequency',
|
55
|
+
:'ping_url' => :'pingUrl',
|
56
|
+
:'recipient_id' => :'recipientId',
|
57
|
+
:'return_url' => :'returnUrl',
|
58
|
+
:'security_domain' => :'securityDomain',
|
59
|
+
:'x_frame_options' => :'xFrameOptions',
|
60
|
+
:'x_frame_options_allow_from_url' => :'xFrameOptionsAllowFromUrl'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.swagger_types
|
66
|
+
{
|
67
|
+
:'assertion_id' => :'String',
|
68
|
+
:'authentication_instant' => :'String',
|
69
|
+
:'authentication_method' => :'String',
|
70
|
+
:'ping_frequency' => :'String',
|
71
|
+
:'ping_url' => :'String',
|
72
|
+
:'recipient_id' => :'String',
|
73
|
+
:'return_url' => :'String',
|
74
|
+
:'security_domain' => :'String',
|
75
|
+
:'x_frame_options' => :'String',
|
76
|
+
:'x_frame_options_allow_from_url' => :'String'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
def initialize(attributes = {})
|
83
|
+
return unless attributes.is_a?(Hash)
|
84
|
+
|
85
|
+
# convert string to symbol for hash key
|
86
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
87
|
+
|
88
|
+
if attributes.has_key?(:'assertionId')
|
89
|
+
self.assertion_id = attributes[:'assertionId']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.has_key?(:'authenticationInstant')
|
93
|
+
self.authentication_instant = attributes[:'authenticationInstant']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.has_key?(:'authenticationMethod')
|
97
|
+
self.authentication_method = attributes[:'authenticationMethod']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.has_key?(:'pingFrequency')
|
101
|
+
self.ping_frequency = attributes[:'pingFrequency']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'pingUrl')
|
105
|
+
self.ping_url = attributes[:'pingUrl']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.has_key?(:'recipientId')
|
109
|
+
self.recipient_id = attributes[:'recipientId']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.has_key?(:'returnUrl')
|
113
|
+
self.return_url = attributes[:'returnUrl']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.has_key?(:'securityDomain')
|
117
|
+
self.security_domain = attributes[:'securityDomain']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.has_key?(:'xFrameOptions')
|
121
|
+
self.x_frame_options = attributes[:'xFrameOptions']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.has_key?(:'xFrameOptionsAllowFromUrl')
|
125
|
+
self.x_frame_options_allow_from_url = attributes[:'xFrameOptionsAllowFromUrl']
|
126
|
+
end
|
127
|
+
|
128
|
+
end
|
129
|
+
|
130
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
131
|
+
# @return Array for valid properies with the reasons
|
132
|
+
def list_invalid_properties
|
133
|
+
invalid_properties = Array.new
|
134
|
+
return invalid_properties
|
135
|
+
end
|
136
|
+
|
137
|
+
# Check to see if the all the properties in the model are valid
|
138
|
+
# @return true if the model is valid
|
139
|
+
def valid?
|
140
|
+
return true
|
141
|
+
end
|
142
|
+
|
143
|
+
# Checks equality by comparing each attribute.
|
144
|
+
# @param [Object] Object to be compared
|
145
|
+
def ==(o)
|
146
|
+
return true if self.equal?(o)
|
147
|
+
self.class == o.class &&
|
148
|
+
assertion_id == o.assertion_id &&
|
149
|
+
authentication_instant == o.authentication_instant &&
|
150
|
+
authentication_method == o.authentication_method &&
|
151
|
+
ping_frequency == o.ping_frequency &&
|
152
|
+
ping_url == o.ping_url &&
|
153
|
+
recipient_id == o.recipient_id &&
|
154
|
+
return_url == o.return_url &&
|
155
|
+
security_domain == o.security_domain &&
|
156
|
+
x_frame_options == o.x_frame_options &&
|
157
|
+
x_frame_options_allow_from_url == o.x_frame_options_allow_from_url
|
158
|
+
end
|
159
|
+
|
160
|
+
# @see the `==` method
|
161
|
+
# @param [Object] Object to be compared
|
162
|
+
def eql?(o)
|
163
|
+
self == o
|
164
|
+
end
|
165
|
+
|
166
|
+
# Calculates hash code according to all attributes.
|
167
|
+
# @return [Fixnum] Hash code
|
168
|
+
def hash
|
169
|
+
[assertion_id, authentication_instant, authentication_method, ping_frequency, ping_url, recipient_id, return_url, security_domain, x_frame_options, x_frame_options_allow_from_url].hash
|
170
|
+
end
|
171
|
+
|
172
|
+
# Builds the object from hash
|
173
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
174
|
+
# @return [Object] Returns the model itself
|
175
|
+
def build_from_hash(attributes)
|
176
|
+
return nil unless attributes.is_a?(Hash)
|
177
|
+
self.class.swagger_types.each_pair do |key, type|
|
178
|
+
if type =~ /\AArray<(.*)>/i
|
179
|
+
# check to ensure the input is an array given that the the attribute
|
180
|
+
# is documented as an array but the input is not
|
181
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
182
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
183
|
+
end
|
184
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
185
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
186
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
187
|
+
end
|
188
|
+
|
189
|
+
self
|
190
|
+
end
|
191
|
+
|
192
|
+
# Deserializes the data based on type
|
193
|
+
# @param string type Data type
|
194
|
+
# @param string value Value to be deserialized
|
195
|
+
# @return [Object] Deserialized data
|
196
|
+
def _deserialize(type, value)
|
197
|
+
case type.to_sym
|
198
|
+
when :DateTime
|
199
|
+
DateTime.parse(value)
|
200
|
+
when :Date
|
201
|
+
Date.parse(value)
|
202
|
+
when :String
|
203
|
+
value.to_s
|
204
|
+
when :Integer
|
205
|
+
value.to_i
|
206
|
+
when :Float
|
207
|
+
value.to_f
|
208
|
+
when :BOOLEAN
|
209
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
210
|
+
true
|
211
|
+
else
|
212
|
+
false
|
213
|
+
end
|
214
|
+
when :Object
|
215
|
+
# generic object (usually a Hash), return directly
|
216
|
+
value
|
217
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
218
|
+
inner_type = Regexp.last_match[:inner_type]
|
219
|
+
value.map { |v| _deserialize(inner_type, v) }
|
220
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
221
|
+
k_type = Regexp.last_match[:k_type]
|
222
|
+
v_type = Regexp.last_match[:v_type]
|
223
|
+
{}.tap do |hash|
|
224
|
+
value.each do |k, v|
|
225
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
else # model
|
229
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
230
|
+
temp_model.build_from_hash(value)
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
# Returns the string representation of the object
|
235
|
+
# @return [String] String presentation of the object
|
236
|
+
def to_s
|
237
|
+
to_hash.to_s
|
238
|
+
end
|
239
|
+
|
240
|
+
# to_body is an alias to to_hash (backward compatibility)
|
241
|
+
# @return [Hash] Returns the object in the form of hash
|
242
|
+
def to_body
|
243
|
+
to_hash
|
244
|
+
end
|
245
|
+
|
246
|
+
# Returns the object in the form of hash
|
247
|
+
# @return [Hash] Returns the object in the form of hash
|
248
|
+
def to_hash
|
249
|
+
hash = {}
|
250
|
+
self.class.attribute_map.each_pair do |attr, param|
|
251
|
+
value = self.send(attr)
|
252
|
+
next if value.nil?
|
253
|
+
hash[param] = _to_hash(value)
|
254
|
+
end
|
255
|
+
hash
|
256
|
+
end
|
257
|
+
|
258
|
+
# Outputs non-array value in the form of hash
|
259
|
+
# For object, use to_hash. Otherwise, just return the value
|
260
|
+
# @param [Object] value Any valid value
|
261
|
+
# @return [Hash] Returns the value in the form of hash
|
262
|
+
def _to_hash(value)
|
263
|
+
if value.is_a?(Array)
|
264
|
+
value.compact.map{ |v| _to_hash(v) }
|
265
|
+
elsif value.is_a?(Hash)
|
266
|
+
{}.tap do |hash|
|
267
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
268
|
+
end
|
269
|
+
elsif value.respond_to? :to_hash
|
270
|
+
value.to_hash
|
271
|
+
else
|
272
|
+
value
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
end
|
277
|
+
|
278
|
+
end
|
@@ -0,0 +1,188 @@
|
|
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
|
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 RecipientProofFile
|
17
|
+
#
|
18
|
+
attr_accessor :is_in_proof_file
|
19
|
+
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'is_in_proof_file' => :'isInProofFile'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.swagger_types
|
30
|
+
{
|
31
|
+
:'is_in_proof_file' => :'String'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Initializes the object
|
36
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
37
|
+
def initialize(attributes = {})
|
38
|
+
return unless attributes.is_a?(Hash)
|
39
|
+
|
40
|
+
# convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
|
+
|
43
|
+
if attributes.has_key?(:'isInProofFile')
|
44
|
+
self.is_in_proof_file = attributes[:'isInProofFile']
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
50
|
+
# @return Array for valid properies with the reasons
|
51
|
+
def list_invalid_properties
|
52
|
+
invalid_properties = Array.new
|
53
|
+
return invalid_properties
|
54
|
+
end
|
55
|
+
|
56
|
+
# Check to see if the all the properties in the model are valid
|
57
|
+
# @return true if the model is valid
|
58
|
+
def valid?
|
59
|
+
return true
|
60
|
+
end
|
61
|
+
|
62
|
+
# Checks equality by comparing each attribute.
|
63
|
+
# @param [Object] Object to be compared
|
64
|
+
def ==(o)
|
65
|
+
return true if self.equal?(o)
|
66
|
+
self.class == o.class &&
|
67
|
+
is_in_proof_file == o.is_in_proof_file
|
68
|
+
end
|
69
|
+
|
70
|
+
# @see the `==` method
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def eql?(o)
|
73
|
+
self == o
|
74
|
+
end
|
75
|
+
|
76
|
+
# Calculates hash code according to all attributes.
|
77
|
+
# @return [Fixnum] Hash code
|
78
|
+
def hash
|
79
|
+
[is_in_proof_file].hash
|
80
|
+
end
|
81
|
+
|
82
|
+
# Builds the object from hash
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
+
# @return [Object] Returns the model itself
|
85
|
+
def build_from_hash(attributes)
|
86
|
+
return nil unless attributes.is_a?(Hash)
|
87
|
+
self.class.swagger_types.each_pair do |key, type|
|
88
|
+
if type =~ /\AArray<(.*)>/i
|
89
|
+
# check to ensure the input is an array given that the the attribute
|
90
|
+
# is documented as an array but the input is not
|
91
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
92
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
93
|
+
end
|
94
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
95
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
96
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
97
|
+
end
|
98
|
+
|
99
|
+
self
|
100
|
+
end
|
101
|
+
|
102
|
+
# Deserializes the data based on type
|
103
|
+
# @param string type Data type
|
104
|
+
# @param string value Value to be deserialized
|
105
|
+
# @return [Object] Deserialized data
|
106
|
+
def _deserialize(type, value)
|
107
|
+
case type.to_sym
|
108
|
+
when :DateTime
|
109
|
+
DateTime.parse(value)
|
110
|
+
when :Date
|
111
|
+
Date.parse(value)
|
112
|
+
when :String
|
113
|
+
value.to_s
|
114
|
+
when :Integer
|
115
|
+
value.to_i
|
116
|
+
when :Float
|
117
|
+
value.to_f
|
118
|
+
when :BOOLEAN
|
119
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
120
|
+
true
|
121
|
+
else
|
122
|
+
false
|
123
|
+
end
|
124
|
+
when :Object
|
125
|
+
# generic object (usually a Hash), return directly
|
126
|
+
value
|
127
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
128
|
+
inner_type = Regexp.last_match[:inner_type]
|
129
|
+
value.map { |v| _deserialize(inner_type, v) }
|
130
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
131
|
+
k_type = Regexp.last_match[:k_type]
|
132
|
+
v_type = Regexp.last_match[:v_type]
|
133
|
+
{}.tap do |hash|
|
134
|
+
value.each do |k, v|
|
135
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
else # model
|
139
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
140
|
+
temp_model.build_from_hash(value)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# Returns the string representation of the object
|
145
|
+
# @return [String] String presentation of the object
|
146
|
+
def to_s
|
147
|
+
to_hash.to_s
|
148
|
+
end
|
149
|
+
|
150
|
+
# to_body is an alias to to_hash (backward compatibility)
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
152
|
+
def to_body
|
153
|
+
to_hash
|
154
|
+
end
|
155
|
+
|
156
|
+
# Returns the object in the form of hash
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
158
|
+
def to_hash
|
159
|
+
hash = {}
|
160
|
+
self.class.attribute_map.each_pair do |attr, param|
|
161
|
+
value = self.send(attr)
|
162
|
+
next if value.nil?
|
163
|
+
hash[param] = _to_hash(value)
|
164
|
+
end
|
165
|
+
hash
|
166
|
+
end
|
167
|
+
|
168
|
+
# Outputs non-array value in the form of hash
|
169
|
+
# For object, use to_hash. Otherwise, just return the value
|
170
|
+
# @param [Object] value Any valid value
|
171
|
+
# @return [Hash] Returns the value in the form of hash
|
172
|
+
def _to_hash(value)
|
173
|
+
if value.is_a?(Array)
|
174
|
+
value.compact.map{ |v| _to_hash(v) }
|
175
|
+
elsif value.is_a?(Hash)
|
176
|
+
{}.tap do |hash|
|
177
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
178
|
+
end
|
179
|
+
elsif value.respond_to? :to_hash
|
180
|
+
value.to_hash
|
181
|
+
else
|
182
|
+
value
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
end
|
187
|
+
|
188
|
+
end
|