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