docusign_esign 2.9.0.rc1 → 2.11.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 +24 -0
- data/Gemfile.lock +23 -22
- data/lib/docusign_esign.rb +2 -20
- data/lib/docusign_esign/api/accounts_api.rb +0 -101
- data/lib/docusign_esign/api/connect_api.rb +0 -196
- data/lib/docusign_esign/api/trust_service_providers_api.rb +0 -232
- data/lib/docusign_esign/api/users_api.rb +0 -52
- data/lib/docusign_esign/models/account_billing_plan.rb +21 -1
- data/lib/docusign_esign/models/envelope_form_data.rb +2 -5
- data/lib/docusign_esign/models/envelope_form_data_prefill_form_data.rb +186 -0
- data/lib/docusign_esign/models/prefill_form_data.rb +216 -0
- data/lib/docusign_esign/models/tabs.rb +1 -1
- data/lib/docusign_esign/models/template_tabs.rb +1 -1
- data/lib/docusign_esign/version.rb +1 -1
- data/tests/Gemfile.lock +6 -10
- data/tests/spec/unit_tests_using_jwt_spec.rb +58 -0
- metadata +4 -3
- data/docusign_esign-3.9.0.rc1.gem +0 -0
@@ -21,53 +21,6 @@ module DocuSign_eSign
|
|
21
21
|
@api_client = api_client
|
22
22
|
end
|
23
23
|
|
24
|
-
# Complete Sign Hash
|
25
|
-
#
|
26
|
-
# @param complete_sign_request (optional parameter)
|
27
|
-
# @return [CompleteSignHashResponse]
|
28
|
-
def complete_sign_hash(complete_sign_request)
|
29
|
-
data, _status_code, _headers = complete_sign_hash_with_http_info( complete_sign_request)
|
30
|
-
return data
|
31
|
-
end
|
32
|
-
|
33
|
-
# Complete Sign Hash
|
34
|
-
#
|
35
|
-
# @param complete_sign_request (optional parameter)
|
36
|
-
# @return [Array<(CompleteSignHashResponse, Fixnum, Hash)>] CompleteSignHashResponse data, response status code and response headers
|
37
|
-
def complete_sign_hash_with_http_info(complete_sign_request)
|
38
|
-
if @api_client.config.debugging
|
39
|
-
@api_client.config.logger.debug "Calling API: TrustServiceProvidersApi.complete_sign_hash ..."
|
40
|
-
end
|
41
|
-
# resource path
|
42
|
-
local_var_path = "/v2/signature/completesignhash".sub('{format}','json')
|
43
|
-
|
44
|
-
# query parameters
|
45
|
-
query_params = {}
|
46
|
-
|
47
|
-
# header parameters
|
48
|
-
header_params = {}
|
49
|
-
# HTTP header 'Accept' (if needed)
|
50
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
51
|
-
|
52
|
-
# form parameters
|
53
|
-
form_params = {}
|
54
|
-
|
55
|
-
# http body (model)
|
56
|
-
post_body = @api_client.object_to_http_body(complete_sign_request)
|
57
|
-
auth_names = []
|
58
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
59
|
-
:header_params => header_params,
|
60
|
-
:query_params => query_params,
|
61
|
-
:form_params => form_params,
|
62
|
-
:body => post_body,
|
63
|
-
:auth_names => auth_names,
|
64
|
-
:return_type => 'CompleteSignHashResponse')
|
65
|
-
if @api_client.config.debugging
|
66
|
-
@api_client.config.logger.debug "API called: TrustServiceProvidersApi#complete_sign_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
67
|
-
end
|
68
|
-
return data, status_code, headers
|
69
|
-
end
|
70
|
-
|
71
24
|
# Returns Account available seals for specified account.
|
72
25
|
#
|
73
26
|
# @param account_id The external account number (int) or account ID Guid.
|
@@ -116,190 +69,5 @@ module DocuSign_eSign
|
|
116
69
|
end
|
117
70
|
return data, status_code, headers
|
118
71
|
end
|
119
|
-
|
120
|
-
# Get User Info To Sign Document
|
121
|
-
#
|
122
|
-
# @return [UserInfoResponse]
|
123
|
-
def get_user_info()
|
124
|
-
data, _status_code, _headers = get_user_info_with_http_info()
|
125
|
-
return data
|
126
|
-
end
|
127
|
-
|
128
|
-
# Get User Info To Sign Document
|
129
|
-
#
|
130
|
-
# @return [Array<(UserInfoResponse, Fixnum, Hash)>] UserInfoResponse data, response status code and response headers
|
131
|
-
def get_user_info_with_http_info()
|
132
|
-
if @api_client.config.debugging
|
133
|
-
@api_client.config.logger.debug "Calling API: TrustServiceProvidersApi.get_user_info ..."
|
134
|
-
end
|
135
|
-
# resource path
|
136
|
-
local_var_path = "/v2/signature/userInfo".sub('{format}','json')
|
137
|
-
|
138
|
-
# query parameters
|
139
|
-
query_params = {}
|
140
|
-
|
141
|
-
# header parameters
|
142
|
-
header_params = {}
|
143
|
-
# HTTP header 'Accept' (if needed)
|
144
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
145
|
-
|
146
|
-
# form parameters
|
147
|
-
form_params = {}
|
148
|
-
|
149
|
-
# http body (model)
|
150
|
-
post_body = nil
|
151
|
-
auth_names = []
|
152
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
153
|
-
:header_params => header_params,
|
154
|
-
:query_params => query_params,
|
155
|
-
:form_params => form_params,
|
156
|
-
:body => post_body,
|
157
|
-
:auth_names => auth_names,
|
158
|
-
:return_type => 'UserInfoResponse')
|
159
|
-
if @api_client.config.debugging
|
160
|
-
@api_client.config.logger.debug "API called: TrustServiceProvidersApi#get_user_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
161
|
-
end
|
162
|
-
return data, status_code, headers
|
163
|
-
end
|
164
|
-
|
165
|
-
# Report status from the TSP to DocuSign
|
166
|
-
#
|
167
|
-
# @param tsp_health_check_request (optional parameter)
|
168
|
-
# @return [nil]
|
169
|
-
def health_check(tsp_health_check_request)
|
170
|
-
health_check_with_http_info( tsp_health_check_request)
|
171
|
-
return nil
|
172
|
-
end
|
173
|
-
|
174
|
-
# Report status from the TSP to DocuSign
|
175
|
-
#
|
176
|
-
# @param tsp_health_check_request (optional parameter)
|
177
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
178
|
-
def health_check_with_http_info(tsp_health_check_request)
|
179
|
-
if @api_client.config.debugging
|
180
|
-
@api_client.config.logger.debug "Calling API: TrustServiceProvidersApi.health_check ..."
|
181
|
-
end
|
182
|
-
# resource path
|
183
|
-
local_var_path = "/v2/signature/healthcheck".sub('{format}','json')
|
184
|
-
|
185
|
-
# query parameters
|
186
|
-
query_params = {}
|
187
|
-
|
188
|
-
# header parameters
|
189
|
-
header_params = {}
|
190
|
-
# HTTP header 'Accept' (if needed)
|
191
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
192
|
-
|
193
|
-
# form parameters
|
194
|
-
form_params = {}
|
195
|
-
|
196
|
-
# http body (model)
|
197
|
-
post_body = @api_client.object_to_http_body(tsp_health_check_request)
|
198
|
-
auth_names = []
|
199
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
200
|
-
:header_params => header_params,
|
201
|
-
:query_params => query_params,
|
202
|
-
:form_params => form_params,
|
203
|
-
:body => post_body,
|
204
|
-
:auth_names => auth_names)
|
205
|
-
if @api_client.config.debugging
|
206
|
-
@api_client.config.logger.debug "API called: TrustServiceProvidersApi#health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
207
|
-
end
|
208
|
-
return data, status_code, headers
|
209
|
-
end
|
210
|
-
|
211
|
-
# Get Signature Session Info To Sign Document Hash
|
212
|
-
#
|
213
|
-
# @param sign_session_info_request (optional parameter)
|
214
|
-
# @return [SignHashSessionInfoResponse]
|
215
|
-
def sign_hash_session_info(sign_session_info_request)
|
216
|
-
data, _status_code, _headers = sign_hash_session_info_with_http_info( sign_session_info_request)
|
217
|
-
return data
|
218
|
-
end
|
219
|
-
|
220
|
-
# Get Signature Session Info To Sign Document Hash
|
221
|
-
#
|
222
|
-
# @param sign_session_info_request (optional parameter)
|
223
|
-
# @return [Array<(SignHashSessionInfoResponse, Fixnum, Hash)>] SignHashSessionInfoResponse data, response status code and response headers
|
224
|
-
def sign_hash_session_info_with_http_info(sign_session_info_request)
|
225
|
-
if @api_client.config.debugging
|
226
|
-
@api_client.config.logger.debug "Calling API: TrustServiceProvidersApi.sign_hash_session_info ..."
|
227
|
-
end
|
228
|
-
# resource path
|
229
|
-
local_var_path = "/v2/signature/signhashsessioninfo".sub('{format}','json')
|
230
|
-
|
231
|
-
# query parameters
|
232
|
-
query_params = {}
|
233
|
-
|
234
|
-
# header parameters
|
235
|
-
header_params = {}
|
236
|
-
# HTTP header 'Accept' (if needed)
|
237
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
238
|
-
|
239
|
-
# form parameters
|
240
|
-
form_params = {}
|
241
|
-
|
242
|
-
# http body (model)
|
243
|
-
post_body = @api_client.object_to_http_body(sign_session_info_request)
|
244
|
-
auth_names = []
|
245
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
246
|
-
:header_params => header_params,
|
247
|
-
:query_params => query_params,
|
248
|
-
:form_params => form_params,
|
249
|
-
:body => post_body,
|
250
|
-
:auth_names => auth_names,
|
251
|
-
:return_type => 'SignHashSessionInfoResponse')
|
252
|
-
if @api_client.config.debugging
|
253
|
-
@api_client.config.logger.debug "API called: TrustServiceProvidersApi#sign_hash_session_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
254
|
-
end
|
255
|
-
return data, status_code, headers
|
256
|
-
end
|
257
|
-
|
258
|
-
# Report an error from the tsp to docusign
|
259
|
-
#
|
260
|
-
# @param update_transaction_request (optional parameter)
|
261
|
-
# @return [UpdateTransactionResponse]
|
262
|
-
def update_transaction(update_transaction_request)
|
263
|
-
data, _status_code, _headers = update_transaction_with_http_info( update_transaction_request)
|
264
|
-
return data
|
265
|
-
end
|
266
|
-
|
267
|
-
# Report an error from the tsp to docusign
|
268
|
-
#
|
269
|
-
# @param update_transaction_request (optional parameter)
|
270
|
-
# @return [Array<(UpdateTransactionResponse, Fixnum, Hash)>] UpdateTransactionResponse data, response status code and response headers
|
271
|
-
def update_transaction_with_http_info(update_transaction_request)
|
272
|
-
if @api_client.config.debugging
|
273
|
-
@api_client.config.logger.debug "Calling API: TrustServiceProvidersApi.update_transaction ..."
|
274
|
-
end
|
275
|
-
# resource path
|
276
|
-
local_var_path = "/v2/signature/updatetransaction".sub('{format}','json')
|
277
|
-
|
278
|
-
# query parameters
|
279
|
-
query_params = {}
|
280
|
-
|
281
|
-
# header parameters
|
282
|
-
header_params = {}
|
283
|
-
# HTTP header 'Accept' (if needed)
|
284
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
285
|
-
|
286
|
-
# form parameters
|
287
|
-
form_params = {}
|
288
|
-
|
289
|
-
# http body (model)
|
290
|
-
post_body = @api_client.object_to_http_body(update_transaction_request)
|
291
|
-
auth_names = []
|
292
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
293
|
-
:header_params => header_params,
|
294
|
-
:query_params => query_params,
|
295
|
-
:form_params => form_params,
|
296
|
-
:body => post_body,
|
297
|
-
:auth_names => auth_names,
|
298
|
-
:return_type => 'UpdateTransactionResponse')
|
299
|
-
if @api_client.config.debugging
|
300
|
-
@api_client.config.logger.debug "API called: TrustServiceProvidersApi#update_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
301
|
-
end
|
302
|
-
return data, status_code, headers
|
303
|
-
end
|
304
72
|
end
|
305
73
|
end
|
@@ -995,58 +995,6 @@ module DocuSign_eSign
|
|
995
995
|
return data, status_code, headers
|
996
996
|
end
|
997
997
|
|
998
|
-
# Retrieves UserList Export Results data.
|
999
|
-
#
|
1000
|
-
# @param organization_id
|
1001
|
-
# @param result_id
|
1002
|
-
# @return [nil]
|
1003
|
-
def get_user_list_export(organization_id, result_id)
|
1004
|
-
get_user_list_export_with_http_info(organization_id, result_id)
|
1005
|
-
return nil
|
1006
|
-
end
|
1007
|
-
|
1008
|
-
# Retrieves UserList Export Results data.
|
1009
|
-
#
|
1010
|
-
# @param organization_id
|
1011
|
-
# @param result_id
|
1012
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
1013
|
-
def get_user_list_export_with_http_info(organization_id, result_id)
|
1014
|
-
if @api_client.config.debugging
|
1015
|
-
@api_client.config.logger.debug "Calling API: UsersApi.get_user_list_export ..."
|
1016
|
-
end
|
1017
|
-
# verify the required parameter 'organization_id' is set
|
1018
|
-
fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.get_user_list_export" if organization_id.nil?
|
1019
|
-
# verify the required parameter 'result_id' is set
|
1020
|
-
fail ArgumentError, "Missing the required parameter 'result_id' when calling UsersApi.get_user_list_export" if result_id.nil?
|
1021
|
-
# resource path
|
1022
|
-
local_var_path = "/v2/organization_exports/{organizationId}/user_list/{resultId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'resultId' + '}', result_id.to_s)
|
1023
|
-
|
1024
|
-
# query parameters
|
1025
|
-
query_params = {}
|
1026
|
-
|
1027
|
-
# header parameters
|
1028
|
-
header_params = {}
|
1029
|
-
# HTTP header 'Accept' (if needed)
|
1030
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1031
|
-
|
1032
|
-
# form parameters
|
1033
|
-
form_params = {}
|
1034
|
-
|
1035
|
-
# http body (model)
|
1036
|
-
post_body = nil
|
1037
|
-
auth_names = []
|
1038
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1039
|
-
:header_params => header_params,
|
1040
|
-
:query_params => query_params,
|
1041
|
-
:form_params => form_params,
|
1042
|
-
:body => post_body,
|
1043
|
-
:auth_names => auth_names)
|
1044
|
-
if @api_client.config.debugging
|
1045
|
-
@api_client.config.logger.debug "API called: UsersApi#get_user_list_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1046
|
-
end
|
1047
|
-
return data, status_code, headers
|
1048
|
-
end
|
1049
|
-
|
1050
998
|
# Retrieves the list of users for the specified account.
|
1051
999
|
# Retrieves the list of users for the specified account. The response returns the list of users for the account along with the information about the result set. If the `additional_info` query was added to the endpoint and set to **true**, the full user information is returned for each user
|
1052
1000
|
# @param account_id The external account number (int) or account ID Guid.
|
@@ -71,6 +71,12 @@ module DocuSign_eSign
|
|
71
71
|
# The name of the Billing Plan.
|
72
72
|
attr_accessor :plan_name
|
73
73
|
|
74
|
+
#
|
75
|
+
attr_accessor :plan_start_date
|
76
|
+
|
77
|
+
#
|
78
|
+
attr_accessor :renewal_date
|
79
|
+
|
74
80
|
# The renewal status for the account. The acceptable values are: * auto: The account automatically renews. * queued_for_close: Account will be closed at the billingPeriodEndDate. * queued_for_downgrade: Account will be downgraded at the billingPeriodEndDate.
|
75
81
|
attr_accessor :renewal_status
|
76
82
|
|
@@ -105,6 +111,8 @@ module DocuSign_eSign
|
|
105
111
|
:'plan_feature_sets' => :'planFeatureSets',
|
106
112
|
:'plan_id' => :'planId',
|
107
113
|
:'plan_name' => :'planName',
|
114
|
+
:'plan_start_date' => :'planStartDate',
|
115
|
+
:'renewal_date' => :'renewalDate',
|
108
116
|
:'renewal_status' => :'renewalStatus',
|
109
117
|
:'seat_discounts' => :'seatDiscounts',
|
110
118
|
:'support_incident_fee' => :'supportIncidentFee',
|
@@ -134,6 +142,8 @@ module DocuSign_eSign
|
|
134
142
|
:'plan_feature_sets' => :'Array<FeatureSet>',
|
135
143
|
:'plan_id' => :'String',
|
136
144
|
:'plan_name' => :'String',
|
145
|
+
:'plan_start_date' => :'String',
|
146
|
+
:'renewal_date' => :'String',
|
137
147
|
:'renewal_status' => :'String',
|
138
148
|
:'seat_discounts' => :'Array<SeatDiscount>',
|
139
149
|
:'support_incident_fee' => :'String',
|
@@ -229,6 +239,14 @@ module DocuSign_eSign
|
|
229
239
|
self.plan_name = attributes[:'planName']
|
230
240
|
end
|
231
241
|
|
242
|
+
if attributes.has_key?(:'planStartDate')
|
243
|
+
self.plan_start_date = attributes[:'planStartDate']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.has_key?(:'renewalDate')
|
247
|
+
self.renewal_date = attributes[:'renewalDate']
|
248
|
+
end
|
249
|
+
|
232
250
|
if attributes.has_key?(:'renewalStatus')
|
233
251
|
self.renewal_status = attributes[:'renewalStatus']
|
234
252
|
end
|
@@ -285,6 +303,8 @@ module DocuSign_eSign
|
|
285
303
|
plan_feature_sets == o.plan_feature_sets &&
|
286
304
|
plan_id == o.plan_id &&
|
287
305
|
plan_name == o.plan_name &&
|
306
|
+
plan_start_date == o.plan_start_date &&
|
307
|
+
renewal_date == o.renewal_date &&
|
288
308
|
renewal_status == o.renewal_status &&
|
289
309
|
seat_discounts == o.seat_discounts &&
|
290
310
|
support_incident_fee == o.support_incident_fee &&
|
@@ -300,7 +320,7 @@ module DocuSign_eSign
|
|
300
320
|
# Calculates hash code according to all attributes.
|
301
321
|
# @return [Fixnum] Hash code
|
302
322
|
def hash
|
303
|
-
[add_ons, app_store_receipt_expiration_date, app_store_receipt_purchase_date, can_cancel_renewal, can_upgrade, currency_code, enable_support, included_seats, incremental_seats, is_downgrade, notification_type, other_discount_percent, payment_cycle, payment_method, per_seat_price, plan_classification, plan_feature_sets, plan_id, plan_name, renewal_status, seat_discounts, support_incident_fee, support_plan_fee].hash
|
323
|
+
[add_ons, app_store_receipt_expiration_date, app_store_receipt_purchase_date, can_cancel_renewal, can_upgrade, currency_code, enable_support, included_seats, incremental_seats, is_downgrade, notification_type, other_discount_percent, payment_cycle, payment_method, per_seat_price, plan_classification, plan_feature_sets, plan_id, plan_name, plan_start_date, renewal_date, renewal_status, seat_discounts, support_incident_fee, support_plan_fee].hash
|
304
324
|
end
|
305
325
|
|
306
326
|
# Builds the object from hash
|
@@ -22,7 +22,6 @@ module DocuSign_eSign
|
|
22
22
|
#
|
23
23
|
attr_accessor :form_data
|
24
24
|
|
25
|
-
#
|
26
25
|
attr_accessor :prefill_form_data
|
27
26
|
|
28
27
|
#
|
@@ -53,7 +52,7 @@ module DocuSign_eSign
|
|
53
52
|
:'email_subject' => :'String',
|
54
53
|
:'envelope_id' => :'String',
|
55
54
|
:'form_data' => :'Array<NameValue>',
|
56
|
-
:'prefill_form_data' => :'
|
55
|
+
:'prefill_form_data' => :'PrefillFormData',
|
57
56
|
:'recipient_form_data' => :'Array<RecipientFormData>',
|
58
57
|
:'sent_date_time' => :'String',
|
59
58
|
:'status' => :'String'
|
@@ -83,9 +82,7 @@ module DocuSign_eSign
|
|
83
82
|
end
|
84
83
|
|
85
84
|
if attributes.has_key?(:'prefillFormData')
|
86
|
-
|
87
|
-
self.prefill_form_data = value
|
88
|
-
end
|
85
|
+
self.prefill_form_data = attributes[:'prefillFormData']
|
89
86
|
end
|
90
87
|
|
91
88
|
if attributes.has_key?(:'recipientFormData')
|
@@ -0,0 +1,186 @@
|
|
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
|
+
class EnvelopeFormDataPrefillFormData
|
16
|
+
#
|
17
|
+
attr_accessor :form_data
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'form_data' => :'formData'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.swagger_types
|
28
|
+
{
|
29
|
+
:'form_data' => :'Array<NameValue>'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the object
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return unless attributes.is_a?(Hash)
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
40
|
+
|
41
|
+
if attributes.has_key?(:'formData')
|
42
|
+
if (value = attributes[:'formData']).is_a?(Array)
|
43
|
+
self.form_data = value
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
49
|
+
# @return Array for valid properties with the reasons
|
50
|
+
def list_invalid_properties
|
51
|
+
invalid_properties = Array.new
|
52
|
+
invalid_properties
|
53
|
+
end
|
54
|
+
|
55
|
+
# Check to see if the all the properties in the model are valid
|
56
|
+
# @return true if the model is valid
|
57
|
+
def valid?
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
# Checks equality by comparing each attribute.
|
62
|
+
# @param [Object] Object to be compared
|
63
|
+
def ==(o)
|
64
|
+
return true if self.equal?(o)
|
65
|
+
self.class == o.class &&
|
66
|
+
form_data == o.form_data
|
67
|
+
end
|
68
|
+
|
69
|
+
# @see the `==` method
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def eql?(o)
|
72
|
+
self == o
|
73
|
+
end
|
74
|
+
|
75
|
+
# Calculates hash code according to all attributes.
|
76
|
+
# @return [Fixnum] Hash code
|
77
|
+
def hash
|
78
|
+
[form_data].hash
|
79
|
+
end
|
80
|
+
|
81
|
+
# Builds the object from hash
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
# @return [Object] Returns the model itself
|
84
|
+
def build_from_hash(attributes)
|
85
|
+
return nil unless attributes.is_a?(Hash)
|
86
|
+
self.class.swagger_types.each_pair do |key, type|
|
87
|
+
if type =~ /\AArray<(.*)>/i
|
88
|
+
# check to ensure the input is an array given that the attribute
|
89
|
+
# is documented as an array but the input is not
|
90
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
92
|
+
end
|
93
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
94
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
95
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
96
|
+
end
|
97
|
+
|
98
|
+
self
|
99
|
+
end
|
100
|
+
|
101
|
+
# Deserializes the data based on type
|
102
|
+
# @param string type Data type
|
103
|
+
# @param string value Value to be deserialized
|
104
|
+
# @return [Object] Deserialized data
|
105
|
+
def _deserialize(type, value)
|
106
|
+
case type.to_sym
|
107
|
+
when :DateTime
|
108
|
+
DateTime.parse(value)
|
109
|
+
when :Date
|
110
|
+
Date.parse(value)
|
111
|
+
when :String
|
112
|
+
value.to_s
|
113
|
+
when :Integer
|
114
|
+
value.to_i
|
115
|
+
when :Float
|
116
|
+
value.to_f
|
117
|
+
when :BOOLEAN
|
118
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
119
|
+
true
|
120
|
+
else
|
121
|
+
false
|
122
|
+
end
|
123
|
+
when :Object
|
124
|
+
# generic object (usually a Hash), return directly
|
125
|
+
value
|
126
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
127
|
+
inner_type = Regexp.last_match[:inner_type]
|
128
|
+
value.map { |v| _deserialize(inner_type, v) }
|
129
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
130
|
+
k_type = Regexp.last_match[:k_type]
|
131
|
+
v_type = Regexp.last_match[:v_type]
|
132
|
+
{}.tap do |hash|
|
133
|
+
value.each do |k, v|
|
134
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
else # model
|
138
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
139
|
+
temp_model.build_from_hash(value)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
# Returns the string representation of the object
|
144
|
+
# @return [String] String presentation of the object
|
145
|
+
def to_s
|
146
|
+
to_hash.to_s
|
147
|
+
end
|
148
|
+
|
149
|
+
# to_body is an alias to to_hash (backward compatibility)
|
150
|
+
# @return [Hash] Returns the object in the form of hash
|
151
|
+
def to_body
|
152
|
+
to_hash
|
153
|
+
end
|
154
|
+
|
155
|
+
# Returns the object in the form of hash
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
def to_hash
|
158
|
+
hash = {}
|
159
|
+
self.class.attribute_map.each_pair do |attr, param|
|
160
|
+
value = self.send(attr)
|
161
|
+
next if value.nil?
|
162
|
+
hash[param] = _to_hash(value)
|
163
|
+
end
|
164
|
+
hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Outputs non-array value in the form of hash
|
168
|
+
# For object, use to_hash. Otherwise, just return the value
|
169
|
+
# @param [Object] value Any valid value
|
170
|
+
# @return [Hash] Returns the value in the form of hash
|
171
|
+
def _to_hash(value)
|
172
|
+
if value.is_a?(Array)
|
173
|
+
value.compact.map { |v| _to_hash(v) }
|
174
|
+
elsif value.is_a?(Hash)
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
177
|
+
end
|
178
|
+
elsif value.respond_to? :to_hash
|
179
|
+
value.to_hash
|
180
|
+
else
|
181
|
+
value
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
end
|
186
|
+
end
|