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,188 +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 BulkSendRequest
17
- #
18
- attr_accessor :envelope_or_template_id
19
-
20
-
21
- # Attribute mapping from ruby-style variable name to JSON key.
22
- def self.attribute_map
23
- {
24
- :'envelope_or_template_id' => :'envelopeOrTemplateId'
25
- }
26
- end
27
-
28
- # Attribute type mapping.
29
- def self.swagger_types
30
- {
31
- :'envelope_or_template_id' => :'String'
32
- }
33
- end
34
-
35
- # Initializes the object
36
- # @param [Hash] attributes Model attributes in the form of hash
37
- def initialize(attributes = {})
38
- return unless attributes.is_a?(Hash)
39
-
40
- # convert string to symbol for hash key
41
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
42
-
43
- if attributes.has_key?(:'envelopeOrTemplateId')
44
- self.envelope_or_template_id = attributes[:'envelopeOrTemplateId']
45
- end
46
-
47
- end
48
-
49
- # Show invalid properties with the reasons. Usually used together with valid?
50
- # @return Array for valid properies with the reasons
51
- def list_invalid_properties
52
- invalid_properties = Array.new
53
- return invalid_properties
54
- end
55
-
56
- # Check to see if the all the properties in the model are valid
57
- # @return true if the model is valid
58
- def valid?
59
- return true
60
- end
61
-
62
- # Checks equality by comparing each attribute.
63
- # @param [Object] Object to be compared
64
- def ==(o)
65
- return true if self.equal?(o)
66
- self.class == o.class &&
67
- envelope_or_template_id == o.envelope_or_template_id
68
- end
69
-
70
- # @see the `==` method
71
- # @param [Object] Object to be compared
72
- def eql?(o)
73
- self == o
74
- end
75
-
76
- # Calculates hash code according to all attributes.
77
- # @return [Fixnum] Hash code
78
- def hash
79
- [envelope_or_template_id].hash
80
- end
81
-
82
- # Builds the object from hash
83
- # @param [Hash] attributes Model attributes in the form of hash
84
- # @return [Object] Returns the model itself
85
- def build_from_hash(attributes)
86
- return nil unless attributes.is_a?(Hash)
87
- self.class.swagger_types.each_pair do |key, type|
88
- if type =~ /\AArray<(.*)>/i
89
- # check to ensure the input is an array given that the the attribute
90
- # is documented as an array but the input is not
91
- if attributes[self.class.attribute_map[key]].is_a?(Array)
92
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
93
- end
94
- elsif !attributes[self.class.attribute_map[key]].nil?
95
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
96
- end # or else data not found in attributes(hash), not an issue as the data can be optional
97
- end
98
-
99
- self
100
- end
101
-
102
- # Deserializes the data based on type
103
- # @param string type Data type
104
- # @param string value Value to be deserialized
105
- # @return [Object] Deserialized data
106
- def _deserialize(type, value)
107
- case type.to_sym
108
- when :DateTime
109
- DateTime.parse(value)
110
- when :Date
111
- Date.parse(value)
112
- when :String
113
- value.to_s
114
- when :Integer
115
- value.to_i
116
- when :Float
117
- value.to_f
118
- when :BOOLEAN
119
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
120
- true
121
- else
122
- false
123
- end
124
- when :Object
125
- # generic object (usually a Hash), return directly
126
- value
127
- when /\AArray<(?<inner_type>.+)>\z/
128
- inner_type = Regexp.last_match[:inner_type]
129
- value.map { |v| _deserialize(inner_type, v) }
130
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
131
- k_type = Regexp.last_match[:k_type]
132
- v_type = Regexp.last_match[:v_type]
133
- {}.tap do |hash|
134
- value.each do |k, v|
135
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
136
- end
137
- end
138
- else # model
139
- temp_model = DocuSign_eSign.const_get(type).new
140
- temp_model.build_from_hash(value)
141
- end
142
- end
143
-
144
- # Returns the string representation of the object
145
- # @return [String] String presentation of the object
146
- def to_s
147
- to_hash.to_s
148
- end
149
-
150
- # to_body is an alias to to_hash (backward compatibility)
151
- # @return [Hash] Returns the object in the form of hash
152
- def to_body
153
- to_hash
154
- end
155
-
156
- # Returns the object in the form of hash
157
- # @return [Hash] Returns the object in the form of hash
158
- def to_hash
159
- hash = {}
160
- self.class.attribute_map.each_pair do |attr, param|
161
- value = self.send(attr)
162
- next if value.nil?
163
- hash[param] = _to_hash(value)
164
- end
165
- hash
166
- end
167
-
168
- # Outputs non-array value in the form of hash
169
- # For object, use to_hash. Otherwise, just return the value
170
- # @param [Object] value Any valid value
171
- # @return [Hash] Returns the value in the form of hash
172
- def _to_hash(value)
173
- if value.is_a?(Array)
174
- value.compact.map{ |v| _to_hash(v) }
175
- elsif value.is_a?(Hash)
176
- {}.tap do |hash|
177
- value.each { |k, v| hash[k] = _to_hash(v) }
178
- end
179
- elsif value.respond_to? :to_hash
180
- value.to_hash
181
- else
182
- value
183
- end
184
- end
185
-
186
- end
187
-
188
- end
@@ -1,222 +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 BulkSendResponse
17
- #
18
- attr_accessor :batch_id
19
-
20
- #
21
- attr_accessor :envelope_or_template_id
22
-
23
- # Array or errors.
24
- attr_accessor :error_details
25
-
26
- #
27
- attr_accessor :errors
28
-
29
-
30
- # Attribute mapping from ruby-style variable name to JSON key.
31
- def self.attribute_map
32
- {
33
- :'batch_id' => :'batchId',
34
- :'envelope_or_template_id' => :'envelopeOrTemplateId',
35
- :'error_details' => :'errorDetails',
36
- :'errors' => :'errors'
37
- }
38
- end
39
-
40
- # Attribute type mapping.
41
- def self.swagger_types
42
- {
43
- :'batch_id' => :'String',
44
- :'envelope_or_template_id' => :'String',
45
- :'error_details' => :'Array<String>',
46
- :'errors' => :'Array<String>'
47
- }
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- return unless attributes.is_a?(Hash)
54
-
55
- # convert string to symbol for hash key
56
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
57
-
58
- if attributes.has_key?(:'batchId')
59
- self.batch_id = attributes[:'batchId']
60
- end
61
-
62
- if attributes.has_key?(:'envelopeOrTemplateId')
63
- self.envelope_or_template_id = attributes[:'envelopeOrTemplateId']
64
- end
65
-
66
- if attributes.has_key?(:'errorDetails')
67
- if (value = attributes[:'errorDetails']).is_a?(Array)
68
- self.error_details = value
69
- end
70
- end
71
-
72
- if attributes.has_key?(:'errors')
73
- if (value = attributes[:'errors']).is_a?(Array)
74
- self.errors = value
75
- end
76
- end
77
-
78
- end
79
-
80
- # Show invalid properties with the reasons. Usually used together with valid?
81
- # @return Array for valid properies with the reasons
82
- def list_invalid_properties
83
- invalid_properties = Array.new
84
- return invalid_properties
85
- end
86
-
87
- # Check to see if the all the properties in the model are valid
88
- # @return true if the model is valid
89
- def valid?
90
- return true
91
- end
92
-
93
- # Checks equality by comparing each attribute.
94
- # @param [Object] Object to be compared
95
- def ==(o)
96
- return true if self.equal?(o)
97
- self.class == o.class &&
98
- batch_id == o.batch_id &&
99
- envelope_or_template_id == o.envelope_or_template_id &&
100
- error_details == o.error_details &&
101
- errors == o.errors
102
- end
103
-
104
- # @see the `==` method
105
- # @param [Object] Object to be compared
106
- def eql?(o)
107
- self == o
108
- end
109
-
110
- # Calculates hash code according to all attributes.
111
- # @return [Fixnum] Hash code
112
- def hash
113
- [batch_id, envelope_or_template_id, error_details, errors].hash
114
- end
115
-
116
- # Builds the object from hash
117
- # @param [Hash] attributes Model attributes in the form of hash
118
- # @return [Object] Returns the model itself
119
- def build_from_hash(attributes)
120
- return nil unless attributes.is_a?(Hash)
121
- self.class.swagger_types.each_pair do |key, type|
122
- if type =~ /\AArray<(.*)>/i
123
- # check to ensure the input is an array given that the the attribute
124
- # is documented as an array but the input is not
125
- if attributes[self.class.attribute_map[key]].is_a?(Array)
126
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
127
- end
128
- elsif !attributes[self.class.attribute_map[key]].nil?
129
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
- end # or else data not found in attributes(hash), not an issue as the data can be optional
131
- end
132
-
133
- self
134
- end
135
-
136
- # Deserializes the data based on type
137
- # @param string type Data type
138
- # @param string value Value to be deserialized
139
- # @return [Object] Deserialized data
140
- def _deserialize(type, value)
141
- case type.to_sym
142
- when :DateTime
143
- DateTime.parse(value)
144
- when :Date
145
- Date.parse(value)
146
- when :String
147
- value.to_s
148
- when :Integer
149
- value.to_i
150
- when :Float
151
- value.to_f
152
- when :BOOLEAN
153
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
- true
155
- else
156
- false
157
- end
158
- when :Object
159
- # generic object (usually a Hash), return directly
160
- value
161
- when /\AArray<(?<inner_type>.+)>\z/
162
- inner_type = Regexp.last_match[:inner_type]
163
- value.map { |v| _deserialize(inner_type, v) }
164
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
- k_type = Regexp.last_match[:k_type]
166
- v_type = Regexp.last_match[:v_type]
167
- {}.tap do |hash|
168
- value.each do |k, v|
169
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
- end
171
- end
172
- else # model
173
- temp_model = DocuSign_eSign.const_get(type).new
174
- temp_model.build_from_hash(value)
175
- end
176
- end
177
-
178
- # Returns the string representation of the object
179
- # @return [String] String presentation of the object
180
- def to_s
181
- to_hash.to_s
182
- end
183
-
184
- # to_body is an alias to to_hash (backward compatibility)
185
- # @return [Hash] Returns the object in the form of hash
186
- def to_body
187
- to_hash
188
- end
189
-
190
- # Returns the object in the form of hash
191
- # @return [Hash] Returns the object in the form of hash
192
- def to_hash
193
- hash = {}
194
- self.class.attribute_map.each_pair do |attr, param|
195
- value = self.send(attr)
196
- next if value.nil?
197
- hash[param] = _to_hash(value)
198
- end
199
- hash
200
- end
201
-
202
- # Outputs non-array value in the form of hash
203
- # For object, use to_hash. Otherwise, just return the value
204
- # @param [Object] value Any valid value
205
- # @return [Hash] Returns the value in the form of hash
206
- def _to_hash(value)
207
- if value.is_a?(Array)
208
- value.compact.map{ |v| _to_hash(v) }
209
- elsif value.is_a?(Hash)
210
- {}.tap do |hash|
211
- value.each { |k, v| hash[k] = _to_hash(v) }
212
- end
213
- elsif value.respond_to? :to_hash
214
- value.to_hash
215
- else
216
- value
217
- end
218
- end
219
-
220
- end
221
-
222
- end
@@ -1,212 +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 BulkSendTestResponse
17
- #
18
- attr_accessor :can_be_sent
19
-
20
- #
21
- attr_accessor :validation_error_details
22
-
23
- #
24
- attr_accessor :validation_errors
25
-
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'can_be_sent' => :'canBeSent',
31
- :'validation_error_details' => :'validationErrorDetails',
32
- :'validation_errors' => :'validationErrors'
33
- }
34
- end
35
-
36
- # Attribute type mapping.
37
- def self.swagger_types
38
- {
39
- :'can_be_sent' => :'BOOLEAN',
40
- :'validation_error_details' => :'Array<String>',
41
- :'validation_errors' => :'Array<String>'
42
- }
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- return unless attributes.is_a?(Hash)
49
-
50
- # convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
52
-
53
- if attributes.has_key?(:'canBeSent')
54
- self.can_be_sent = attributes[:'canBeSent']
55
- end
56
-
57
- if attributes.has_key?(:'validationErrorDetails')
58
- if (value = attributes[:'validationErrorDetails']).is_a?(Array)
59
- self.validation_error_details = value
60
- end
61
- end
62
-
63
- if attributes.has_key?(:'validationErrors')
64
- if (value = attributes[:'validationErrors']).is_a?(Array)
65
- self.validation_errors = value
66
- end
67
- end
68
-
69
- end
70
-
71
- # Show invalid properties with the reasons. Usually used together with valid?
72
- # @return Array for valid properies with the reasons
73
- def list_invalid_properties
74
- invalid_properties = Array.new
75
- return invalid_properties
76
- end
77
-
78
- # Check to see if the all the properties in the model are valid
79
- # @return true if the model is valid
80
- def valid?
81
- return true
82
- end
83
-
84
- # Checks equality by comparing each attribute.
85
- # @param [Object] Object to be compared
86
- def ==(o)
87
- return true if self.equal?(o)
88
- self.class == o.class &&
89
- can_be_sent == o.can_be_sent &&
90
- validation_error_details == o.validation_error_details &&
91
- validation_errors == o.validation_errors
92
- end
93
-
94
- # @see the `==` method
95
- # @param [Object] Object to be compared
96
- def eql?(o)
97
- self == o
98
- end
99
-
100
- # Calculates hash code according to all attributes.
101
- # @return [Fixnum] Hash code
102
- def hash
103
- [can_be_sent, validation_error_details, validation_errors].hash
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
- return nil unless attributes.is_a?(Hash)
111
- self.class.swagger_types.each_pair do |key, type|
112
- if type =~ /\AArray<(.*)>/i
113
- # check to ensure the input is an array given that the the attribute
114
- # is documented as an array but the input is not
115
- if attributes[self.class.attribute_map[key]].is_a?(Array)
116
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
117
- end
118
- elsif !attributes[self.class.attribute_map[key]].nil?
119
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- end # or else data not found in attributes(hash), not an issue as the data can be optional
121
- end
122
-
123
- self
124
- end
125
-
126
- # Deserializes the data based on type
127
- # @param string type Data type
128
- # @param string value Value to be deserialized
129
- # @return [Object] Deserialized data
130
- def _deserialize(type, value)
131
- case type.to_sym
132
- when :DateTime
133
- DateTime.parse(value)
134
- when :Date
135
- Date.parse(value)
136
- when :String
137
- value.to_s
138
- when :Integer
139
- value.to_i
140
- when :Float
141
- value.to_f
142
- when :BOOLEAN
143
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
- true
145
- else
146
- false
147
- end
148
- when :Object
149
- # generic object (usually a Hash), return directly
150
- value
151
- when /\AArray<(?<inner_type>.+)>\z/
152
- inner_type = Regexp.last_match[:inner_type]
153
- value.map { |v| _deserialize(inner_type, v) }
154
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
- k_type = Regexp.last_match[:k_type]
156
- v_type = Regexp.last_match[:v_type]
157
- {}.tap do |hash|
158
- value.each do |k, v|
159
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
- end
161
- end
162
- else # model
163
- temp_model = DocuSign_eSign.const_get(type).new
164
- temp_model.build_from_hash(value)
165
- end
166
- end
167
-
168
- # Returns the string representation of the object
169
- # @return [String] String presentation of the object
170
- def to_s
171
- to_hash.to_s
172
- end
173
-
174
- # to_body is an alias to to_hash (backward compatibility)
175
- # @return [Hash] Returns the object in the form of hash
176
- def to_body
177
- to_hash
178
- end
179
-
180
- # Returns the object in the form of hash
181
- # @return [Hash] Returns the object in the form of hash
182
- def to_hash
183
- hash = {}
184
- self.class.attribute_map.each_pair do |attr, param|
185
- value = self.send(attr)
186
- next if value.nil?
187
- hash[param] = _to_hash(value)
188
- end
189
- hash
190
- end
191
-
192
- # Outputs non-array value in the form of hash
193
- # For object, use to_hash. Otherwise, just return the value
194
- # @param [Object] value Any valid value
195
- # @return [Hash] Returns the value in the form of hash
196
- def _to_hash(value)
197
- if value.is_a?(Array)
198
- value.compact.map{ |v| _to_hash(v) }
199
- elsif value.is_a?(Hash)
200
- {}.tap do |hash|
201
- value.each { |k, v| hash[k] = _to_hash(v) }
202
- end
203
- elsif value.respond_to? :to_hash
204
- value.to_hash
205
- else
206
- value
207
- end
208
- end
209
-
210
- end
211
-
212
- end