docusign_esign 2.2.0.pre.rc1 → 2.2.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docusign_esign-3.1.0.rc2.gem +0 -0
- data/lib/docusign_esign.rb +386 -450
- data/lib/docusign_esign/api/accounts_api.rb +2 -2
- data/lib/docusign_esign/api/bulk_envelopes_api.rb +3 -3
- data/lib/docusign_esign/version.rb +1 -1
- metadata +3 -70
- data/docusign_esign-3.1.0.pre.rc1.gem +0 -0
- data/lib/docusign_esign/api/.DS_Store +0 -0
- data/lib/docusign_esign/models/access_code_format.rb +0 -273
- data/lib/docusign_esign/models/account_notification.rb +0 -206
- data/lib/docusign_esign/models/account_ui_settings.rb +0 -330
- data/lib/docusign_esign/models/bcc_email_archive.rb +0 -276
- data/lib/docusign_esign/models/bcc_email_archive_history.rb +0 -237
- data/lib/docusign_esign/models/bcc_email_archive_history_list.rb +0 -250
- data/lib/docusign_esign/models/bcc_email_archive_list.rb +0 -250
- data/lib/docusign_esign/models/bulk_send_request.rb +0 -188
- data/lib/docusign_esign/models/bulk_send_response.rb +0 -222
- data/lib/docusign_esign/models/bulk_send_test_response.rb +0 -212
- data/lib/docusign_esign/models/bulk_sending_copy.rb +0 -222
- data/lib/docusign_esign/models/bulk_sending_copy_custom_field.rb +0 -198
- data/lib/docusign_esign/models/bulk_sending_copy_recipient.rb +0 -382
- data/lib/docusign_esign/models/bulk_sending_copy_tab.rb +0 -198
- data/lib/docusign_esign/models/bulk_sending_list.rb +0 -210
- data/lib/docusign_esign/models/bulk_sending_list_summaries.rb +0 -190
- data/lib/docusign_esign/models/bulk_sending_list_summary.rb +0 -218
- data/lib/docusign_esign/models/comment.rb +0 -392
- data/lib/docusign_esign/models/comment_history_result.rb +0 -220
- data/lib/docusign_esign/models/comment_publish.rb +0 -244
- data/lib/docusign_esign/models/comment_thread.rb +0 -961
- data/lib/docusign_esign/models/comments_publish.rb +0 -190
- data/lib/docusign_esign/models/connect_salesforce_field.rb +0 -258
- data/lib/docusign_esign/models/connect_salesforce_object.rb +0 -272
- data/lib/docusign_esign/models/connect_user_object.rb +0 -230
- data/lib/docusign_esign/models/direct_debit_processor_information.rb +0 -298
- data/lib/docusign_esign/models/display_appliance_document.rb +0 -258
- data/lib/docusign_esign/models/display_appliance_document_page.rb +0 -278
- data/lib/docusign_esign/models/display_appliance_envelope.rb +0 -328
- data/lib/docusign_esign/models/display_appliance_info.rb +0 -235
- data/lib/docusign_esign/models/display_appliance_page.rb +0 -278
- data/lib/docusign_esign/models/display_appliance_pdf.rb +0 -267
- data/lib/docusign_esign/models/display_appliance_recipient.rb +0 -388
- data/lib/docusign_esign/models/display_appliance_signer_attachment.rb +0 -248
- data/lib/docusign_esign/models/envelope_metadata.rb +0 -208
- data/lib/docusign_esign/models/envelope_purge_configuration.rb +0 -218
- data/lib/docusign_esign/models/envelope_transfer_rule.rb +0 -273
- data/lib/docusign_esign/models/envelope_transfer_rule_information.rb +0 -250
- data/lib/docusign_esign/models/envelope_transfer_rule_request.rb +0 -279
- data/lib/docusign_esign/models/external_claim.rb +0 -218
- data/lib/docusign_esign/models/external_document_sources.rb +0 -273
- data/lib/docusign_esign/models/favorite_templates_content_item.rb +0 -207
- data/lib/docusign_esign/models/favorite_templates_info.rb +0 -209
- data/lib/docusign_esign/models/feature_available_metadata.rb +0 -198
- data/lib/docusign_esign/models/folder_shared_item.rb +0 -289
- data/lib/docusign_esign/models/form_data_item.rb +0 -227
- data/lib/docusign_esign/models/graphics_context.rb +0 -208
- data/lib/docusign_esign/models/id_check_configuration.rb +0 -210
- data/lib/docusign_esign/models/id_check_security_step.rb +0 -188
- data/lib/docusign_esign/models/locale_policy.rb +0 -595
- data/lib/docusign_esign/models/locale_policy_tab.rb +0 -298
- data/lib/docusign_esign/models/notification_default_settings.rb +0 -196
- data/lib/docusign_esign/models/notification_defaults.rb +0 -196
- data/lib/docusign_esign/models/page_size.rb +0 -198
- data/lib/docusign_esign/models/path_extended_element.rb +0 -208
- data/lib/docusign_esign/models/pay_pal_legacy_settings.rb +0 -228
- data/lib/docusign_esign/models/payment_gateway_account_setting.rb +0 -218
- data/lib/docusign_esign/models/payment_method_with_options.rb +0 -200
- data/lib/docusign_esign/models/poly_line.rb +0 -218
- data/lib/docusign_esign/models/poly_line_overlay.rb +0 -885
- data/lib/docusign_esign/models/recipient_preview_request.rb +0 -278
- data/lib/docusign_esign/models/signature_properties.rb +0 -198
- data/lib/docusign_esign/models/tab_group.rb +0 -911
- data/lib/docusign_esign/models/workspace_settings.rb +0 -188
- data/tests/Gemfile.lock +0 -42
- data/tests/docs/private.pem +0 -27
@@ -1,276 +0,0 @@
|
|
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 BccEmailArchive
|
17
|
-
# The account ID associated with the envelope.
|
18
|
-
attr_accessor :account_id
|
19
|
-
|
20
|
-
#
|
21
|
-
attr_accessor :bcc_email_archive_id
|
22
|
-
|
23
|
-
#
|
24
|
-
attr_accessor :created
|
25
|
-
|
26
|
-
attr_accessor :created_by
|
27
|
-
|
28
|
-
#
|
29
|
-
attr_accessor :email
|
30
|
-
|
31
|
-
#
|
32
|
-
attr_accessor :email_notification_id
|
33
|
-
|
34
|
-
#
|
35
|
-
attr_accessor :modified
|
36
|
-
|
37
|
-
attr_accessor :modified_by
|
38
|
-
|
39
|
-
# 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.
|
40
|
-
attr_accessor :status
|
41
|
-
|
42
|
-
#
|
43
|
-
attr_accessor :uri
|
44
|
-
|
45
|
-
|
46
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
-
def self.attribute_map
|
48
|
-
{
|
49
|
-
:'account_id' => :'accountId',
|
50
|
-
:'bcc_email_archive_id' => :'bccEmailArchiveId',
|
51
|
-
:'created' => :'created',
|
52
|
-
:'created_by' => :'createdBy',
|
53
|
-
:'email' => :'email',
|
54
|
-
:'email_notification_id' => :'emailNotificationId',
|
55
|
-
:'modified' => :'modified',
|
56
|
-
:'modified_by' => :'modifiedBy',
|
57
|
-
:'status' => :'status',
|
58
|
-
:'uri' => :'uri'
|
59
|
-
}
|
60
|
-
end
|
61
|
-
|
62
|
-
# Attribute type mapping.
|
63
|
-
def self.swagger_types
|
64
|
-
{
|
65
|
-
:'account_id' => :'String',
|
66
|
-
:'bcc_email_archive_id' => :'String',
|
67
|
-
:'created' => :'String',
|
68
|
-
:'created_by' => :'UserInfo',
|
69
|
-
:'email' => :'String',
|
70
|
-
:'email_notification_id' => :'String',
|
71
|
-
:'modified' => :'String',
|
72
|
-
:'modified_by' => :'UserInfo',
|
73
|
-
:'status' => :'String',
|
74
|
-
:'uri' => :'String'
|
75
|
-
}
|
76
|
-
end
|
77
|
-
|
78
|
-
# Initializes the object
|
79
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
80
|
-
def initialize(attributes = {})
|
81
|
-
return unless attributes.is_a?(Hash)
|
82
|
-
|
83
|
-
# convert string to symbol for hash key
|
84
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
85
|
-
|
86
|
-
if attributes.has_key?(:'accountId')
|
87
|
-
self.account_id = attributes[:'accountId']
|
88
|
-
end
|
89
|
-
|
90
|
-
if attributes.has_key?(:'bccEmailArchiveId')
|
91
|
-
self.bcc_email_archive_id = attributes[:'bccEmailArchiveId']
|
92
|
-
end
|
93
|
-
|
94
|
-
if attributes.has_key?(:'created')
|
95
|
-
self.created = attributes[:'created']
|
96
|
-
end
|
97
|
-
|
98
|
-
if attributes.has_key?(:'createdBy')
|
99
|
-
self.created_by = attributes[:'createdBy']
|
100
|
-
end
|
101
|
-
|
102
|
-
if attributes.has_key?(:'email')
|
103
|
-
self.email = attributes[:'email']
|
104
|
-
end
|
105
|
-
|
106
|
-
if attributes.has_key?(:'emailNotificationId')
|
107
|
-
self.email_notification_id = attributes[:'emailNotificationId']
|
108
|
-
end
|
109
|
-
|
110
|
-
if attributes.has_key?(:'modified')
|
111
|
-
self.modified = attributes[:'modified']
|
112
|
-
end
|
113
|
-
|
114
|
-
if attributes.has_key?(:'modifiedBy')
|
115
|
-
self.modified_by = attributes[:'modifiedBy']
|
116
|
-
end
|
117
|
-
|
118
|
-
if attributes.has_key?(:'status')
|
119
|
-
self.status = attributes[:'status']
|
120
|
-
end
|
121
|
-
|
122
|
-
if attributes.has_key?(:'uri')
|
123
|
-
self.uri = attributes[:'uri']
|
124
|
-
end
|
125
|
-
|
126
|
-
end
|
127
|
-
|
128
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
129
|
-
# @return Array for valid properies with the reasons
|
130
|
-
def list_invalid_properties
|
131
|
-
invalid_properties = Array.new
|
132
|
-
return invalid_properties
|
133
|
-
end
|
134
|
-
|
135
|
-
# Check to see if the all the properties in the model are valid
|
136
|
-
# @return true if the model is valid
|
137
|
-
def valid?
|
138
|
-
return true
|
139
|
-
end
|
140
|
-
|
141
|
-
# Checks equality by comparing each attribute.
|
142
|
-
# @param [Object] Object to be compared
|
143
|
-
def ==(o)
|
144
|
-
return true if self.equal?(o)
|
145
|
-
self.class == o.class &&
|
146
|
-
account_id == o.account_id &&
|
147
|
-
bcc_email_archive_id == o.bcc_email_archive_id &&
|
148
|
-
created == o.created &&
|
149
|
-
created_by == o.created_by &&
|
150
|
-
email == o.email &&
|
151
|
-
email_notification_id == o.email_notification_id &&
|
152
|
-
modified == o.modified &&
|
153
|
-
modified_by == o.modified_by &&
|
154
|
-
status == o.status &&
|
155
|
-
uri == o.uri
|
156
|
-
end
|
157
|
-
|
158
|
-
# @see the `==` method
|
159
|
-
# @param [Object] Object to be compared
|
160
|
-
def eql?(o)
|
161
|
-
self == o
|
162
|
-
end
|
163
|
-
|
164
|
-
# Calculates hash code according to all attributes.
|
165
|
-
# @return [Fixnum] Hash code
|
166
|
-
def hash
|
167
|
-
[account_id, bcc_email_archive_id, created, created_by, email, email_notification_id, modified, modified_by, status, uri].hash
|
168
|
-
end
|
169
|
-
|
170
|
-
# Builds the object from hash
|
171
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
172
|
-
# @return [Object] Returns the model itself
|
173
|
-
def build_from_hash(attributes)
|
174
|
-
return nil unless attributes.is_a?(Hash)
|
175
|
-
self.class.swagger_types.each_pair do |key, type|
|
176
|
-
if type =~ /\AArray<(.*)>/i
|
177
|
-
# check to ensure the input is an array given that the the attribute
|
178
|
-
# is documented as an array but the input is not
|
179
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
180
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
181
|
-
end
|
182
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
183
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
184
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
185
|
-
end
|
186
|
-
|
187
|
-
self
|
188
|
-
end
|
189
|
-
|
190
|
-
# Deserializes the data based on type
|
191
|
-
# @param string type Data type
|
192
|
-
# @param string value Value to be deserialized
|
193
|
-
# @return [Object] Deserialized data
|
194
|
-
def _deserialize(type, value)
|
195
|
-
case type.to_sym
|
196
|
-
when :DateTime
|
197
|
-
DateTime.parse(value)
|
198
|
-
when :Date
|
199
|
-
Date.parse(value)
|
200
|
-
when :String
|
201
|
-
value.to_s
|
202
|
-
when :Integer
|
203
|
-
value.to_i
|
204
|
-
when :Float
|
205
|
-
value.to_f
|
206
|
-
when :BOOLEAN
|
207
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
208
|
-
true
|
209
|
-
else
|
210
|
-
false
|
211
|
-
end
|
212
|
-
when :Object
|
213
|
-
# generic object (usually a Hash), return directly
|
214
|
-
value
|
215
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
216
|
-
inner_type = Regexp.last_match[:inner_type]
|
217
|
-
value.map { |v| _deserialize(inner_type, v) }
|
218
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
219
|
-
k_type = Regexp.last_match[:k_type]
|
220
|
-
v_type = Regexp.last_match[:v_type]
|
221
|
-
{}.tap do |hash|
|
222
|
-
value.each do |k, v|
|
223
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
224
|
-
end
|
225
|
-
end
|
226
|
-
else # model
|
227
|
-
temp_model = DocuSign_eSign.const_get(type).new
|
228
|
-
temp_model.build_from_hash(value)
|
229
|
-
end
|
230
|
-
end
|
231
|
-
|
232
|
-
# Returns the string representation of the object
|
233
|
-
# @return [String] String presentation of the object
|
234
|
-
def to_s
|
235
|
-
to_hash.to_s
|
236
|
-
end
|
237
|
-
|
238
|
-
# to_body is an alias to to_hash (backward compatibility)
|
239
|
-
# @return [Hash] Returns the object in the form of hash
|
240
|
-
def to_body
|
241
|
-
to_hash
|
242
|
-
end
|
243
|
-
|
244
|
-
# Returns the object in the form of hash
|
245
|
-
# @return [Hash] Returns the object in the form of hash
|
246
|
-
def to_hash
|
247
|
-
hash = {}
|
248
|
-
self.class.attribute_map.each_pair do |attr, param|
|
249
|
-
value = self.send(attr)
|
250
|
-
next if value.nil?
|
251
|
-
hash[param] = _to_hash(value)
|
252
|
-
end
|
253
|
-
hash
|
254
|
-
end
|
255
|
-
|
256
|
-
# Outputs non-array value in the form of hash
|
257
|
-
# For object, use to_hash. Otherwise, just return the value
|
258
|
-
# @param [Object] value Any valid value
|
259
|
-
# @return [Hash] Returns the value in the form of hash
|
260
|
-
def _to_hash(value)
|
261
|
-
if value.is_a?(Array)
|
262
|
-
value.compact.map{ |v| _to_hash(v) }
|
263
|
-
elsif value.is_a?(Hash)
|
264
|
-
{}.tap do |hash|
|
265
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
266
|
-
end
|
267
|
-
elsif value.respond_to? :to_hash
|
268
|
-
value.to_hash
|
269
|
-
else
|
270
|
-
value
|
271
|
-
end
|
272
|
-
end
|
273
|
-
|
274
|
-
end
|
275
|
-
|
276
|
-
end
|
@@ -1,237 +0,0 @@
|
|
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 BccEmailArchiveHistory
|
17
|
-
# The account ID associated with the envelope.
|
18
|
-
attr_accessor :account_id
|
19
|
-
|
20
|
-
#
|
21
|
-
attr_accessor :action
|
22
|
-
|
23
|
-
#
|
24
|
-
attr_accessor :email
|
25
|
-
|
26
|
-
#
|
27
|
-
attr_accessor :modified
|
28
|
-
|
29
|
-
attr_accessor :modified_by
|
30
|
-
|
31
|
-
# 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.
|
32
|
-
attr_accessor :status
|
33
|
-
|
34
|
-
|
35
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
-
def self.attribute_map
|
37
|
-
{
|
38
|
-
:'account_id' => :'accountId',
|
39
|
-
:'action' => :'action',
|
40
|
-
:'email' => :'email',
|
41
|
-
:'modified' => :'modified',
|
42
|
-
:'modified_by' => :'modifiedBy',
|
43
|
-
:'status' => :'status'
|
44
|
-
}
|
45
|
-
end
|
46
|
-
|
47
|
-
# Attribute type mapping.
|
48
|
-
def self.swagger_types
|
49
|
-
{
|
50
|
-
:'account_id' => :'String',
|
51
|
-
:'action' => :'String',
|
52
|
-
:'email' => :'String',
|
53
|
-
:'modified' => :'String',
|
54
|
-
:'modified_by' => :'UserInfo',
|
55
|
-
:'status' => :'String'
|
56
|
-
}
|
57
|
-
end
|
58
|
-
|
59
|
-
# Initializes the object
|
60
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
61
|
-
def initialize(attributes = {})
|
62
|
-
return unless attributes.is_a?(Hash)
|
63
|
-
|
64
|
-
# convert string to symbol for hash key
|
65
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
66
|
-
|
67
|
-
if attributes.has_key?(:'accountId')
|
68
|
-
self.account_id = attributes[:'accountId']
|
69
|
-
end
|
70
|
-
|
71
|
-
if attributes.has_key?(:'action')
|
72
|
-
self.action = attributes[:'action']
|
73
|
-
end
|
74
|
-
|
75
|
-
if attributes.has_key?(:'email')
|
76
|
-
self.email = attributes[:'email']
|
77
|
-
end
|
78
|
-
|
79
|
-
if attributes.has_key?(:'modified')
|
80
|
-
self.modified = attributes[:'modified']
|
81
|
-
end
|
82
|
-
|
83
|
-
if attributes.has_key?(:'modifiedBy')
|
84
|
-
self.modified_by = attributes[:'modifiedBy']
|
85
|
-
end
|
86
|
-
|
87
|
-
if attributes.has_key?(:'status')
|
88
|
-
self.status = attributes[:'status']
|
89
|
-
end
|
90
|
-
|
91
|
-
end
|
92
|
-
|
93
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
-
# @return Array for valid properies with the reasons
|
95
|
-
def list_invalid_properties
|
96
|
-
invalid_properties = Array.new
|
97
|
-
return invalid_properties
|
98
|
-
end
|
99
|
-
|
100
|
-
# Check to see if the all the properties in the model are valid
|
101
|
-
# @return true if the model is valid
|
102
|
-
def valid?
|
103
|
-
return true
|
104
|
-
end
|
105
|
-
|
106
|
-
# Checks equality by comparing each attribute.
|
107
|
-
# @param [Object] Object to be compared
|
108
|
-
def ==(o)
|
109
|
-
return true if self.equal?(o)
|
110
|
-
self.class == o.class &&
|
111
|
-
account_id == o.account_id &&
|
112
|
-
action == o.action &&
|
113
|
-
email == o.email &&
|
114
|
-
modified == o.modified &&
|
115
|
-
modified_by == o.modified_by &&
|
116
|
-
status == o.status
|
117
|
-
end
|
118
|
-
|
119
|
-
# @see the `==` method
|
120
|
-
# @param [Object] Object to be compared
|
121
|
-
def eql?(o)
|
122
|
-
self == o
|
123
|
-
end
|
124
|
-
|
125
|
-
# Calculates hash code according to all attributes.
|
126
|
-
# @return [Fixnum] Hash code
|
127
|
-
def hash
|
128
|
-
[account_id, action, email, modified, modified_by, status].hash
|
129
|
-
end
|
130
|
-
|
131
|
-
# Builds the object from hash
|
132
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
133
|
-
# @return [Object] Returns the model itself
|
134
|
-
def build_from_hash(attributes)
|
135
|
-
return nil unless attributes.is_a?(Hash)
|
136
|
-
self.class.swagger_types.each_pair do |key, type|
|
137
|
-
if type =~ /\AArray<(.*)>/i
|
138
|
-
# check to ensure the input is an array given that the the attribute
|
139
|
-
# is documented as an array but the input is not
|
140
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
141
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
142
|
-
end
|
143
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
144
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
145
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
146
|
-
end
|
147
|
-
|
148
|
-
self
|
149
|
-
end
|
150
|
-
|
151
|
-
# Deserializes the data based on type
|
152
|
-
# @param string type Data type
|
153
|
-
# @param string value Value to be deserialized
|
154
|
-
# @return [Object] Deserialized data
|
155
|
-
def _deserialize(type, value)
|
156
|
-
case type.to_sym
|
157
|
-
when :DateTime
|
158
|
-
DateTime.parse(value)
|
159
|
-
when :Date
|
160
|
-
Date.parse(value)
|
161
|
-
when :String
|
162
|
-
value.to_s
|
163
|
-
when :Integer
|
164
|
-
value.to_i
|
165
|
-
when :Float
|
166
|
-
value.to_f
|
167
|
-
when :BOOLEAN
|
168
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
169
|
-
true
|
170
|
-
else
|
171
|
-
false
|
172
|
-
end
|
173
|
-
when :Object
|
174
|
-
# generic object (usually a Hash), return directly
|
175
|
-
value
|
176
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
177
|
-
inner_type = Regexp.last_match[:inner_type]
|
178
|
-
value.map { |v| _deserialize(inner_type, v) }
|
179
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
180
|
-
k_type = Regexp.last_match[:k_type]
|
181
|
-
v_type = Regexp.last_match[:v_type]
|
182
|
-
{}.tap do |hash|
|
183
|
-
value.each do |k, v|
|
184
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
185
|
-
end
|
186
|
-
end
|
187
|
-
else # model
|
188
|
-
temp_model = DocuSign_eSign.const_get(type).new
|
189
|
-
temp_model.build_from_hash(value)
|
190
|
-
end
|
191
|
-
end
|
192
|
-
|
193
|
-
# Returns the string representation of the object
|
194
|
-
# @return [String] String presentation of the object
|
195
|
-
def to_s
|
196
|
-
to_hash.to_s
|
197
|
-
end
|
198
|
-
|
199
|
-
# to_body is an alias to to_hash (backward compatibility)
|
200
|
-
# @return [Hash] Returns the object in the form of hash
|
201
|
-
def to_body
|
202
|
-
to_hash
|
203
|
-
end
|
204
|
-
|
205
|
-
# Returns the object in the form of hash
|
206
|
-
# @return [Hash] Returns the object in the form of hash
|
207
|
-
def to_hash
|
208
|
-
hash = {}
|
209
|
-
self.class.attribute_map.each_pair do |attr, param|
|
210
|
-
value = self.send(attr)
|
211
|
-
next if value.nil?
|
212
|
-
hash[param] = _to_hash(value)
|
213
|
-
end
|
214
|
-
hash
|
215
|
-
end
|
216
|
-
|
217
|
-
# Outputs non-array value in the form of hash
|
218
|
-
# For object, use to_hash. Otherwise, just return the value
|
219
|
-
# @param [Object] value Any valid value
|
220
|
-
# @return [Hash] Returns the value in the form of hash
|
221
|
-
def _to_hash(value)
|
222
|
-
if value.is_a?(Array)
|
223
|
-
value.compact.map{ |v| _to_hash(v) }
|
224
|
-
elsif value.is_a?(Hash)
|
225
|
-
{}.tap do |hash|
|
226
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
227
|
-
end
|
228
|
-
elsif value.respond_to? :to_hash
|
229
|
-
value.to_hash
|
230
|
-
else
|
231
|
-
value
|
232
|
-
end
|
233
|
-
end
|
234
|
-
|
235
|
-
end
|
236
|
-
|
237
|
-
end
|