docusign_esign 3.4.0 → 3.5.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +73 -0
- data/docusign_esign-2.6.0.rc1.gem +0 -0
- data/lib/docusign_esign.rb +24 -0
- data/lib/docusign_esign/.DS_Store +0 -0
- data/lib/docusign_esign/api/.DS_Store +0 -0
- data/lib/docusign_esign/api/accounts_api.rb +362 -0
- data/lib/docusign_esign/api/bulk_envelopes_api.rb +126 -4
- data/lib/docusign_esign/api/envelopes_api.rb +320 -0
- data/lib/docusign_esign/client/.DS_Store +0 -0
- data/lib/docusign_esign/models/account_settings_information.rb +11 -1
- data/lib/docusign_esign/models/bulk_send_batch_status.rb +287 -0
- data/lib/docusign_esign/models/bulk_send_batch_summaries.rb +277 -0
- data/lib/docusign_esign/models/bulk_send_batch_summary.rb +255 -0
- data/lib/docusign_esign/models/bulk_send_error_status.rb +207 -0
- data/lib/docusign_esign/models/conditional_recipient_rule.rb +216 -0
- data/lib/docusign_esign/models/conditional_recipient_rule_condition.rb +207 -0
- data/lib/docusign_esign/models/conditional_recipient_rule_filter.rb +235 -0
- data/lib/docusign_esign/models/e_note_configuration.rb +11 -1
- data/lib/docusign_esign/models/envelope.rb +13 -4
- data/lib/docusign_esign/models/envelope_definition.rb +13 -4
- data/lib/docusign_esign/models/envelope_template.rb +13 -4
- data/lib/docusign_esign/models/new_user.rb +11 -1
- data/lib/docusign_esign/models/proof_service_resource_token.rb +14 -4
- data/lib/docusign_esign/models/recipient_additional_notification.rb +14 -4
- data/lib/docusign_esign/models/recipient_group.rb +207 -0
- data/lib/docusign_esign/models/recipient_option.rb +225 -0
- data/lib/docusign_esign/models/recipient_routing.rb +184 -0
- data/lib/docusign_esign/models/recipient_rules.rb +187 -0
- data/lib/docusign_esign/models/report_in_product_csv_run_request.rb +437 -0
- data/lib/docusign_esign/models/report_in_product_field.rb +215 -0
- data/lib/docusign_esign/models/report_in_product_get.rb +466 -0
- data/lib/docusign_esign/models/report_in_product_list.rb +187 -0
- data/lib/docusign_esign/models/report_in_product_list_item.rb +315 -0
- data/lib/docusign_esign/models/report_in_product_run_request.rb +397 -0
- data/lib/docusign_esign/models/report_in_product_run_response.rb +247 -0
- data/lib/docusign_esign/models/report_in_product_run_response_row.rb +194 -0
- data/lib/docusign_esign/models/report_in_product_run_response_row_fields.rb +1395 -0
- data/lib/docusign_esign/models/report_in_product_save_response.rb +185 -0
- data/lib/docusign_esign/models/report_in_product_sent_by_details.rb +199 -0
- data/lib/docusign_esign/models/sender_email_notifications.rb +11 -1
- data/lib/docusign_esign/models/tab_metadata.rb +21 -1
- data/lib/docusign_esign/models/workflow.rb +207 -0
- data/lib/docusign_esign/models/workflow_step.rb +254 -0
- data/lib/docusign_esign/version.rb +1 -1
- data/tests/Gemfile.lock +3 -3
- metadata +33 -7
- data/docusign_esign-2.4.0.gem +0 -0
- data/docusign_esign-2.5.0.rc1.gem +0 -0
- data/docusign_esign-3.4.0.rc1.gem +0 -0
@@ -0,0 +1,437 @@
|
|
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
|
+
Swagger Codegen version: 2.4.13-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module DocuSign_eSign
|
16
|
+
class ReportInProductCsvRunRequest
|
17
|
+
#
|
18
|
+
attr_accessor :custom_field_filter
|
19
|
+
|
20
|
+
#
|
21
|
+
attr_accessor :date_range_custom_from_date
|
22
|
+
|
23
|
+
#
|
24
|
+
attr_accessor :date_range_custom_to_date
|
25
|
+
|
26
|
+
#
|
27
|
+
attr_accessor :date_range_filter
|
28
|
+
|
29
|
+
#
|
30
|
+
attr_accessor :envelope_date_type_filter
|
31
|
+
|
32
|
+
#
|
33
|
+
attr_accessor :envelope_recipient_name_contains_filter
|
34
|
+
|
35
|
+
#
|
36
|
+
attr_accessor :envelope_status_filter
|
37
|
+
|
38
|
+
#
|
39
|
+
attr_accessor :envelope_subject_contains_filter
|
40
|
+
|
41
|
+
#
|
42
|
+
attr_accessor :fields
|
43
|
+
|
44
|
+
#
|
45
|
+
attr_accessor :for_download
|
46
|
+
|
47
|
+
#
|
48
|
+
attr_accessor :is_dashboard
|
49
|
+
|
50
|
+
#
|
51
|
+
attr_accessor :new_line
|
52
|
+
|
53
|
+
#
|
54
|
+
attr_accessor :override_timezone_key
|
55
|
+
|
56
|
+
#
|
57
|
+
attr_accessor :period_length_filter
|
58
|
+
|
59
|
+
#
|
60
|
+
attr_accessor :quote
|
61
|
+
|
62
|
+
#
|
63
|
+
attr_accessor :report_customized_id
|
64
|
+
|
65
|
+
#
|
66
|
+
attr_accessor :report_description
|
67
|
+
|
68
|
+
#
|
69
|
+
attr_accessor :report_id
|
70
|
+
|
71
|
+
#
|
72
|
+
attr_accessor :report_invocation_type
|
73
|
+
|
74
|
+
#
|
75
|
+
attr_accessor :report_name
|
76
|
+
|
77
|
+
#
|
78
|
+
attr_accessor :sent_by_filter
|
79
|
+
|
80
|
+
#
|
81
|
+
attr_accessor :sent_by_ids
|
82
|
+
|
83
|
+
#
|
84
|
+
attr_accessor :separator
|
85
|
+
|
86
|
+
#
|
87
|
+
attr_accessor :sort_direction
|
88
|
+
|
89
|
+
#
|
90
|
+
attr_accessor :sort_field
|
91
|
+
|
92
|
+
# Starting position of the current result set.
|
93
|
+
attr_accessor :start_position
|
94
|
+
|
95
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
96
|
+
def self.attribute_map
|
97
|
+
{
|
98
|
+
:'custom_field_filter' => :'customFieldFilter',
|
99
|
+
:'date_range_custom_from_date' => :'dateRangeCustomFromDate',
|
100
|
+
:'date_range_custom_to_date' => :'dateRangeCustomToDate',
|
101
|
+
:'date_range_filter' => :'dateRangeFilter',
|
102
|
+
:'envelope_date_type_filter' => :'envelopeDateTypeFilter',
|
103
|
+
:'envelope_recipient_name_contains_filter' => :'envelopeRecipientNameContainsFilter',
|
104
|
+
:'envelope_status_filter' => :'envelopeStatusFilter',
|
105
|
+
:'envelope_subject_contains_filter' => :'envelopeSubjectContainsFilter',
|
106
|
+
:'fields' => :'fields',
|
107
|
+
:'for_download' => :'forDownload',
|
108
|
+
:'is_dashboard' => :'isDashboard',
|
109
|
+
:'new_line' => :'newLine',
|
110
|
+
:'override_timezone_key' => :'overrideTimezoneKey',
|
111
|
+
:'period_length_filter' => :'periodLengthFilter',
|
112
|
+
:'quote' => :'quote',
|
113
|
+
:'report_customized_id' => :'reportCustomizedId',
|
114
|
+
:'report_description' => :'reportDescription',
|
115
|
+
:'report_id' => :'reportId',
|
116
|
+
:'report_invocation_type' => :'reportInvocationType',
|
117
|
+
:'report_name' => :'reportName',
|
118
|
+
:'sent_by_filter' => :'sentByFilter',
|
119
|
+
:'sent_by_ids' => :'sentByIds',
|
120
|
+
:'separator' => :'separator',
|
121
|
+
:'sort_direction' => :'sortDirection',
|
122
|
+
:'sort_field' => :'sortField',
|
123
|
+
:'start_position' => :'startPosition'
|
124
|
+
}
|
125
|
+
end
|
126
|
+
|
127
|
+
# Attribute type mapping.
|
128
|
+
def self.swagger_types
|
129
|
+
{
|
130
|
+
:'custom_field_filter' => :'String',
|
131
|
+
:'date_range_custom_from_date' => :'String',
|
132
|
+
:'date_range_custom_to_date' => :'String',
|
133
|
+
:'date_range_filter' => :'String',
|
134
|
+
:'envelope_date_type_filter' => :'String',
|
135
|
+
:'envelope_recipient_name_contains_filter' => :'String',
|
136
|
+
:'envelope_status_filter' => :'String',
|
137
|
+
:'envelope_subject_contains_filter' => :'String',
|
138
|
+
:'fields' => :'Array<ReportInProductField>',
|
139
|
+
:'for_download' => :'String',
|
140
|
+
:'is_dashboard' => :'String',
|
141
|
+
:'new_line' => :'String',
|
142
|
+
:'override_timezone_key' => :'String',
|
143
|
+
:'period_length_filter' => :'String',
|
144
|
+
:'quote' => :'String',
|
145
|
+
:'report_customized_id' => :'String',
|
146
|
+
:'report_description' => :'String',
|
147
|
+
:'report_id' => :'String',
|
148
|
+
:'report_invocation_type' => :'String',
|
149
|
+
:'report_name' => :'String',
|
150
|
+
:'sent_by_filter' => :'String',
|
151
|
+
:'sent_by_ids' => :'String',
|
152
|
+
:'separator' => :'String',
|
153
|
+
:'sort_direction' => :'String',
|
154
|
+
:'sort_field' => :'String',
|
155
|
+
:'start_position' => :'String'
|
156
|
+
}
|
157
|
+
end
|
158
|
+
|
159
|
+
# Initializes the object
|
160
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
161
|
+
def initialize(attributes = {})
|
162
|
+
return unless attributes.is_a?(Hash)
|
163
|
+
|
164
|
+
# convert string to symbol for hash key
|
165
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
166
|
+
|
167
|
+
if attributes.has_key?(:'customFieldFilter')
|
168
|
+
self.custom_field_filter = attributes[:'customFieldFilter']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'dateRangeCustomFromDate')
|
172
|
+
self.date_range_custom_from_date = attributes[:'dateRangeCustomFromDate']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'dateRangeCustomToDate')
|
176
|
+
self.date_range_custom_to_date = attributes[:'dateRangeCustomToDate']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'dateRangeFilter')
|
180
|
+
self.date_range_filter = attributes[:'dateRangeFilter']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.has_key?(:'envelopeDateTypeFilter')
|
184
|
+
self.envelope_date_type_filter = attributes[:'envelopeDateTypeFilter']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.has_key?(:'envelopeRecipientNameContainsFilter')
|
188
|
+
self.envelope_recipient_name_contains_filter = attributes[:'envelopeRecipientNameContainsFilter']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.has_key?(:'envelopeStatusFilter')
|
192
|
+
self.envelope_status_filter = attributes[:'envelopeStatusFilter']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.has_key?(:'envelopeSubjectContainsFilter')
|
196
|
+
self.envelope_subject_contains_filter = attributes[:'envelopeSubjectContainsFilter']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.has_key?(:'fields')
|
200
|
+
if (value = attributes[:'fields']).is_a?(Array)
|
201
|
+
self.fields = value
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
if attributes.has_key?(:'forDownload')
|
206
|
+
self.for_download = attributes[:'forDownload']
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes.has_key?(:'isDashboard')
|
210
|
+
self.is_dashboard = attributes[:'isDashboard']
|
211
|
+
end
|
212
|
+
|
213
|
+
if attributes.has_key?(:'newLine')
|
214
|
+
self.new_line = attributes[:'newLine']
|
215
|
+
end
|
216
|
+
|
217
|
+
if attributes.has_key?(:'overrideTimezoneKey')
|
218
|
+
self.override_timezone_key = attributes[:'overrideTimezoneKey']
|
219
|
+
end
|
220
|
+
|
221
|
+
if attributes.has_key?(:'periodLengthFilter')
|
222
|
+
self.period_length_filter = attributes[:'periodLengthFilter']
|
223
|
+
end
|
224
|
+
|
225
|
+
if attributes.has_key?(:'quote')
|
226
|
+
self.quote = attributes[:'quote']
|
227
|
+
end
|
228
|
+
|
229
|
+
if attributes.has_key?(:'reportCustomizedId')
|
230
|
+
self.report_customized_id = attributes[:'reportCustomizedId']
|
231
|
+
end
|
232
|
+
|
233
|
+
if attributes.has_key?(:'reportDescription')
|
234
|
+
self.report_description = attributes[:'reportDescription']
|
235
|
+
end
|
236
|
+
|
237
|
+
if attributes.has_key?(:'reportId')
|
238
|
+
self.report_id = attributes[:'reportId']
|
239
|
+
end
|
240
|
+
|
241
|
+
if attributes.has_key?(:'reportInvocationType')
|
242
|
+
self.report_invocation_type = attributes[:'reportInvocationType']
|
243
|
+
end
|
244
|
+
|
245
|
+
if attributes.has_key?(:'reportName')
|
246
|
+
self.report_name = attributes[:'reportName']
|
247
|
+
end
|
248
|
+
|
249
|
+
if attributes.has_key?(:'sentByFilter')
|
250
|
+
self.sent_by_filter = attributes[:'sentByFilter']
|
251
|
+
end
|
252
|
+
|
253
|
+
if attributes.has_key?(:'sentByIds')
|
254
|
+
self.sent_by_ids = attributes[:'sentByIds']
|
255
|
+
end
|
256
|
+
|
257
|
+
if attributes.has_key?(:'separator')
|
258
|
+
self.separator = attributes[:'separator']
|
259
|
+
end
|
260
|
+
|
261
|
+
if attributes.has_key?(:'sortDirection')
|
262
|
+
self.sort_direction = attributes[:'sortDirection']
|
263
|
+
end
|
264
|
+
|
265
|
+
if attributes.has_key?(:'sortField')
|
266
|
+
self.sort_field = attributes[:'sortField']
|
267
|
+
end
|
268
|
+
|
269
|
+
if attributes.has_key?(:'startPosition')
|
270
|
+
self.start_position = attributes[:'startPosition']
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
275
|
+
# @return Array for valid properties with the reasons
|
276
|
+
def list_invalid_properties
|
277
|
+
invalid_properties = Array.new
|
278
|
+
invalid_properties
|
279
|
+
end
|
280
|
+
|
281
|
+
# Check to see if the all the properties in the model are valid
|
282
|
+
# @return true if the model is valid
|
283
|
+
def valid?
|
284
|
+
true
|
285
|
+
end
|
286
|
+
|
287
|
+
# Checks equality by comparing each attribute.
|
288
|
+
# @param [Object] Object to be compared
|
289
|
+
def ==(o)
|
290
|
+
return true if self.equal?(o)
|
291
|
+
self.class == o.class &&
|
292
|
+
custom_field_filter == o.custom_field_filter &&
|
293
|
+
date_range_custom_from_date == o.date_range_custom_from_date &&
|
294
|
+
date_range_custom_to_date == o.date_range_custom_to_date &&
|
295
|
+
date_range_filter == o.date_range_filter &&
|
296
|
+
envelope_date_type_filter == o.envelope_date_type_filter &&
|
297
|
+
envelope_recipient_name_contains_filter == o.envelope_recipient_name_contains_filter &&
|
298
|
+
envelope_status_filter == o.envelope_status_filter &&
|
299
|
+
envelope_subject_contains_filter == o.envelope_subject_contains_filter &&
|
300
|
+
fields == o.fields &&
|
301
|
+
for_download == o.for_download &&
|
302
|
+
is_dashboard == o.is_dashboard &&
|
303
|
+
new_line == o.new_line &&
|
304
|
+
override_timezone_key == o.override_timezone_key &&
|
305
|
+
period_length_filter == o.period_length_filter &&
|
306
|
+
quote == o.quote &&
|
307
|
+
report_customized_id == o.report_customized_id &&
|
308
|
+
report_description == o.report_description &&
|
309
|
+
report_id == o.report_id &&
|
310
|
+
report_invocation_type == o.report_invocation_type &&
|
311
|
+
report_name == o.report_name &&
|
312
|
+
sent_by_filter == o.sent_by_filter &&
|
313
|
+
sent_by_ids == o.sent_by_ids &&
|
314
|
+
separator == o.separator &&
|
315
|
+
sort_direction == o.sort_direction &&
|
316
|
+
sort_field == o.sort_field &&
|
317
|
+
start_position == o.start_position
|
318
|
+
end
|
319
|
+
|
320
|
+
# @see the `==` method
|
321
|
+
# @param [Object] Object to be compared
|
322
|
+
def eql?(o)
|
323
|
+
self == o
|
324
|
+
end
|
325
|
+
|
326
|
+
# Calculates hash code according to all attributes.
|
327
|
+
# @return [Fixnum] Hash code
|
328
|
+
def hash
|
329
|
+
[custom_field_filter, date_range_custom_from_date, date_range_custom_to_date, date_range_filter, envelope_date_type_filter, envelope_recipient_name_contains_filter, envelope_status_filter, envelope_subject_contains_filter, fields, for_download, is_dashboard, new_line, override_timezone_key, period_length_filter, quote, report_customized_id, report_description, report_id, report_invocation_type, report_name, sent_by_filter, sent_by_ids, separator, sort_direction, sort_field, start_position].hash
|
330
|
+
end
|
331
|
+
|
332
|
+
# Builds the object from hash
|
333
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
334
|
+
# @return [Object] Returns the model itself
|
335
|
+
def build_from_hash(attributes)
|
336
|
+
return nil unless attributes.is_a?(Hash)
|
337
|
+
self.class.swagger_types.each_pair do |key, type|
|
338
|
+
if type =~ /\AArray<(.*)>/i
|
339
|
+
# check to ensure the input is an array given that the attribute
|
340
|
+
# is documented as an array but the input is not
|
341
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
342
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
343
|
+
end
|
344
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
345
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
346
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
347
|
+
end
|
348
|
+
|
349
|
+
self
|
350
|
+
end
|
351
|
+
|
352
|
+
# Deserializes the data based on type
|
353
|
+
# @param string type Data type
|
354
|
+
# @param string value Value to be deserialized
|
355
|
+
# @return [Object] Deserialized data
|
356
|
+
def _deserialize(type, value)
|
357
|
+
case type.to_sym
|
358
|
+
when :DateTime
|
359
|
+
DateTime.parse(value)
|
360
|
+
when :Date
|
361
|
+
Date.parse(value)
|
362
|
+
when :String
|
363
|
+
value.to_s
|
364
|
+
when :Integer
|
365
|
+
value.to_i
|
366
|
+
when :Float
|
367
|
+
value.to_f
|
368
|
+
when :BOOLEAN
|
369
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
370
|
+
true
|
371
|
+
else
|
372
|
+
false
|
373
|
+
end
|
374
|
+
when :Object
|
375
|
+
# generic object (usually a Hash), return directly
|
376
|
+
value
|
377
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
378
|
+
inner_type = Regexp.last_match[:inner_type]
|
379
|
+
value.map { |v| _deserialize(inner_type, v) }
|
380
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
381
|
+
k_type = Regexp.last_match[:k_type]
|
382
|
+
v_type = Regexp.last_match[:v_type]
|
383
|
+
{}.tap do |hash|
|
384
|
+
value.each do |k, v|
|
385
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
386
|
+
end
|
387
|
+
end
|
388
|
+
else # model
|
389
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
390
|
+
temp_model.build_from_hash(value)
|
391
|
+
end
|
392
|
+
end
|
393
|
+
|
394
|
+
# Returns the string representation of the object
|
395
|
+
# @return [String] String presentation of the object
|
396
|
+
def to_s
|
397
|
+
to_hash.to_s
|
398
|
+
end
|
399
|
+
|
400
|
+
# to_body is an alias to to_hash (backward compatibility)
|
401
|
+
# @return [Hash] Returns the object in the form of hash
|
402
|
+
def to_body
|
403
|
+
to_hash
|
404
|
+
end
|
405
|
+
|
406
|
+
# Returns the object in the form of hash
|
407
|
+
# @return [Hash] Returns the object in the form of hash
|
408
|
+
def to_hash
|
409
|
+
hash = {}
|
410
|
+
self.class.attribute_map.each_pair do |attr, param|
|
411
|
+
value = self.send(attr)
|
412
|
+
next if value.nil?
|
413
|
+
hash[param] = _to_hash(value)
|
414
|
+
end
|
415
|
+
hash
|
416
|
+
end
|
417
|
+
|
418
|
+
# Outputs non-array value in the form of hash
|
419
|
+
# For object, use to_hash. Otherwise, just return the value
|
420
|
+
# @param [Object] value Any valid value
|
421
|
+
# @return [Hash] Returns the value in the form of hash
|
422
|
+
def _to_hash(value)
|
423
|
+
if value.is_a?(Array)
|
424
|
+
value.compact.map { |v| _to_hash(v) }
|
425
|
+
elsif value.is_a?(Hash)
|
426
|
+
{}.tap do |hash|
|
427
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
428
|
+
end
|
429
|
+
elsif value.respond_to? :to_hash
|
430
|
+
value.to_hash
|
431
|
+
else
|
432
|
+
value
|
433
|
+
end
|
434
|
+
end
|
435
|
+
|
436
|
+
end
|
437
|
+
end
|
@@ -0,0 +1,215 @@
|
|
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
|
+
Swagger Codegen version: 2.4.13-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module DocuSign_eSign
|
16
|
+
class ReportInProductField
|
17
|
+
#
|
18
|
+
attr_accessor :display_order
|
19
|
+
|
20
|
+
#
|
21
|
+
attr_accessor :field_version
|
22
|
+
|
23
|
+
#
|
24
|
+
attr_accessor :name
|
25
|
+
|
26
|
+
#
|
27
|
+
attr_accessor :selected
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'display_order' => :'displayOrder',
|
33
|
+
:'field_version' => :'fieldVersion',
|
34
|
+
:'name' => :'name',
|
35
|
+
:'selected' => :'selected'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'display_order' => :'String',
|
43
|
+
:'field_version' => :'String',
|
44
|
+
:'name' => :'String',
|
45
|
+
:'selected' => :'String'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
|
+
|
57
|
+
if attributes.has_key?(:'displayOrder')
|
58
|
+
self.display_order = attributes[:'displayOrder']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'fieldVersion')
|
62
|
+
self.field_version = attributes[:'fieldVersion']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'name')
|
66
|
+
self.name = attributes[:'name']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'selected')
|
70
|
+
self.selected = attributes[:'selected']
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
75
|
+
# @return Array for valid properties with the reasons
|
76
|
+
def list_invalid_properties
|
77
|
+
invalid_properties = Array.new
|
78
|
+
invalid_properties
|
79
|
+
end
|
80
|
+
|
81
|
+
# Check to see if the all the properties in the model are valid
|
82
|
+
# @return true if the model is valid
|
83
|
+
def valid?
|
84
|
+
true
|
85
|
+
end
|
86
|
+
|
87
|
+
# Checks equality by comparing each attribute.
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def ==(o)
|
90
|
+
return true if self.equal?(o)
|
91
|
+
self.class == o.class &&
|
92
|
+
display_order == o.display_order &&
|
93
|
+
field_version == o.field_version &&
|
94
|
+
name == o.name &&
|
95
|
+
selected == o.selected
|
96
|
+
end
|
97
|
+
|
98
|
+
# @see the `==` method
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def eql?(o)
|
101
|
+
self == o
|
102
|
+
end
|
103
|
+
|
104
|
+
# Calculates hash code according to all attributes.
|
105
|
+
# @return [Fixnum] Hash code
|
106
|
+
def hash
|
107
|
+
[display_order, field_version, name, selected].hash
|
108
|
+
end
|
109
|
+
|
110
|
+
# Builds the object from hash
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
# @return [Object] Returns the model itself
|
113
|
+
def build_from_hash(attributes)
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
115
|
+
self.class.swagger_types.each_pair do |key, type|
|
116
|
+
if type =~ /\AArray<(.*)>/i
|
117
|
+
# check to ensure the input is an array given that the attribute
|
118
|
+
# is documented as an array but the input is not
|
119
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
120
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
121
|
+
end
|
122
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
123
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
124
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
125
|
+
end
|
126
|
+
|
127
|
+
self
|
128
|
+
end
|
129
|
+
|
130
|
+
# Deserializes the data based on type
|
131
|
+
# @param string type Data type
|
132
|
+
# @param string value Value to be deserialized
|
133
|
+
# @return [Object] Deserialized data
|
134
|
+
def _deserialize(type, value)
|
135
|
+
case type.to_sym
|
136
|
+
when :DateTime
|
137
|
+
DateTime.parse(value)
|
138
|
+
when :Date
|
139
|
+
Date.parse(value)
|
140
|
+
when :String
|
141
|
+
value.to_s
|
142
|
+
when :Integer
|
143
|
+
value.to_i
|
144
|
+
when :Float
|
145
|
+
value.to_f
|
146
|
+
when :BOOLEAN
|
147
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
148
|
+
true
|
149
|
+
else
|
150
|
+
false
|
151
|
+
end
|
152
|
+
when :Object
|
153
|
+
# generic object (usually a Hash), return directly
|
154
|
+
value
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
161
|
+
{}.tap do |hash|
|
162
|
+
value.each do |k, v|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
else # model
|
167
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
168
|
+
temp_model.build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
# @return [String] String presentation of the object
|
174
|
+
def to_s
|
175
|
+
to_hash.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_body
|
181
|
+
to_hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = {}
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
next if value.nil?
|
191
|
+
hash[param] = _to_hash(value)
|
192
|
+
end
|
193
|
+
hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Outputs non-array value in the form of hash
|
197
|
+
# For object, use to_hash. Otherwise, just return the value
|
198
|
+
# @param [Object] value Any valid value
|
199
|
+
# @return [Hash] Returns the value in the form of hash
|
200
|
+
def _to_hash(value)
|
201
|
+
if value.is_a?(Array)
|
202
|
+
value.compact.map { |v| _to_hash(v) }
|
203
|
+
elsif value.is_a?(Hash)
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
206
|
+
end
|
207
|
+
elsif value.respond_to? :to_hash
|
208
|
+
value.to_hash
|
209
|
+
else
|
210
|
+
value
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
end
|
215
|
+
end
|