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