docusign_esign 3.13.0 → 3.14.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/docusign_esign.gemspec +5 -5
  4. data/lib/docusign_esign/api/accounts_api.rb +26 -325
  5. data/lib/docusign_esign/api/connect_api.rb +7 -7
  6. data/lib/docusign_esign/api/envelopes_api.rb +10 -10
  7. data/lib/docusign_esign/api/organizations_api.rb +8 -60
  8. data/lib/docusign_esign/api/users_api.rb +4 -0
  9. data/lib/docusign_esign/client/api_client.rb +16 -10
  10. data/lib/docusign_esign/client/api_error.rb +1 -1
  11. data/lib/docusign_esign/client/auth/oauth.rb +1 -1
  12. data/lib/docusign_esign/models/account_billing_plan_response.rb +7 -8
  13. data/lib/docusign_esign/models/account_settings_information.rb +145 -1
  14. data/lib/docusign_esign/models/billing_entity_information_response.rb +214 -0
  15. data/lib/docusign_esign/models/bulk_send_batch_status.rb +10 -1
  16. data/lib/docusign_esign/models/bulk_send_envelopes_info.rb +204 -0
  17. data/lib/docusign_esign/models/checkbox.rb +21 -1
  18. data/lib/docusign_esign/models/connect_custom_configuration.rb +13 -1
  19. data/lib/docusign_esign/models/connect_user_info.rb +1 -11
  20. data/lib/docusign_esign/models/contact.rb +11 -1
  21. data/lib/docusign_esign/models/delayed_routing_api_model.rb +206 -0
  22. data/lib/docusign_esign/models/delegation_info.rb +214 -0
  23. data/lib/docusign_esign/models/envelope_delay_rule_api_model.rb +194 -0
  24. data/lib/docusign_esign/models/event_notification.rb +13 -1
  25. data/lib/docusign_esign/models/external_primary_account_recipient_auth_requirements.rb +214 -0
  26. data/lib/docusign_esign/models/integrated_connect_user_info_list.rb +6 -6
  27. data/lib/docusign_esign/models/linked_external_primary_account.rb +10 -1
  28. data/lib/docusign_esign/models/notary_recipient.rb +32 -1
  29. data/lib/docusign_esign/models/reserved_domain_existence.rb +194 -0
  30. data/lib/docusign_esign/models/scheduled_sending_api_model.rb +206 -0
  31. data/lib/docusign_esign/models/sender_email_notifications.rb +11 -1
  32. data/lib/docusign_esign/models/signer.rb +32 -1
  33. data/lib/docusign_esign/models/tab_account_settings.rb +20 -1
  34. data/lib/docusign_esign/models/user_account_management_granular_information.rb +20 -1
  35. data/lib/docusign_esign/models/witness.rb +32 -1
  36. data/lib/docusign_esign/models/workflow.rb +20 -1
  37. data/lib/docusign_esign/models/workflow_step.rb +10 -1
  38. data/lib/docusign_esign/version.rb +1 -1
  39. data/lib/docusign_esign.rb +8 -12
  40. metadata +14 -6
@@ -42,6 +42,9 @@ module DocuSign_eSign
42
42
  #
43
43
  attr_accessor :organization
44
44
 
45
+ #
46
+ attr_accessor :room_contact_type
47
+
45
48
  # When set to **true**, this custom tab is shared.
46
49
  attr_accessor :shared
47
50
 
@@ -64,6 +67,7 @@ module DocuSign_eSign
64
67
  :'is_owner' => :'isOwner',
65
68
  :'name' => :'name',
66
69
  :'organization' => :'organization',
70
+ :'room_contact_type' => :'roomContactType',
67
71
  :'shared' => :'shared',
68
72
  :'signing_group' => :'signingGroup',
69
73
  :'signing_group_name' => :'signingGroupName'
@@ -83,6 +87,7 @@ module DocuSign_eSign
83
87
  :'is_owner' => :'BOOLEAN',
84
88
  :'name' => :'String',
85
89
  :'organization' => :'String',
90
+ :'room_contact_type' => :'String',
86
91
  :'shared' => :'String',
87
92
  :'signing_group' => :'String',
88
93
  :'signing_group_name' => :'String'
@@ -141,6 +146,10 @@ module DocuSign_eSign
141
146
  self.organization = attributes[:'organization']
142
147
  end
143
148
 
149
+ if attributes.has_key?(:'roomContactType')
150
+ self.room_contact_type = attributes[:'roomContactType']
151
+ end
152
+
144
153
  if attributes.has_key?(:'shared')
145
154
  self.shared = attributes[:'shared']
146
155
  end
@@ -182,6 +191,7 @@ module DocuSign_eSign
182
191
  is_owner == o.is_owner &&
183
192
  name == o.name &&
184
193
  organization == o.organization &&
194
+ room_contact_type == o.room_contact_type &&
185
195
  shared == o.shared &&
186
196
  signing_group == o.signing_group &&
187
197
  signing_group_name == o.signing_group_name
@@ -196,7 +206,7 @@ module DocuSign_eSign
196
206
  # Calculates hash code according to all attributes.
197
207
  # @return [Fixnum] Hash code
198
208
  def hash
199
- [cloud_provider, cloud_provider_container_id, contact_id, contact_phone_numbers, contact_uri, emails, error_details, is_owner, name, organization, shared, signing_group, signing_group_name].hash
209
+ [cloud_provider, cloud_provider_container_id, contact_id, contact_phone_numbers, contact_uri, emails, error_details, is_owner, name, organization, room_contact_type, shared, signing_group, signing_group_name].hash
200
210
  end
201
211
 
202
212
  # Builds the object from hash
@@ -0,0 +1,206 @@
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
+ class DelayedRoutingApiModel
16
+ #
17
+ attr_accessor :resume_date
18
+
19
+ #
20
+ attr_accessor :rules
21
+
22
+ # 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.
23
+ attr_accessor :status
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'resume_date' => :'ResumeDate',
29
+ :'rules' => :'Rules',
30
+ :'status' => :'Status'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'resume_date' => :'String',
38
+ :'rules' => :'Array<EnvelopeDelayRuleApiModel>',
39
+ :'status' => :'String'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
+
51
+ if attributes.has_key?(:'ResumeDate')
52
+ self.resume_date = attributes[:'ResumeDate']
53
+ end
54
+
55
+ if attributes.has_key?(:'Rules')
56
+ if (value = attributes[:'Rules']).is_a?(Array)
57
+ self.rules = value
58
+ end
59
+ end
60
+
61
+ if attributes.has_key?(:'Status')
62
+ self.status = attributes[:'Status']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ resume_date == o.resume_date &&
85
+ rules == o.rules &&
86
+ status == o.status
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Fixnum] Hash code
97
+ def hash
98
+ [resume_date, rules, status].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ self.class.swagger_types.each_pair do |key, type|
107
+ if type =~ /\AArray<(.*)>/i
108
+ # check to ensure the input is an array given that the attribute
109
+ # is documented as an array but the input is not
110
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ end
117
+
118
+ self
119
+ end
120
+
121
+ # Deserializes the data based on type
122
+ # @param string type Data type
123
+ # @param string value Value to be deserialized
124
+ # @return [Object] Deserialized data
125
+ def _deserialize(type, value)
126
+ case type.to_sym
127
+ when :DateTime
128
+ DateTime.parse(value)
129
+ when :Date
130
+ Date.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :BOOLEAN
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ temp_model = DocuSign_eSign.const_get(type).new
159
+ temp_model.build_from_hash(value)
160
+ end
161
+ end
162
+
163
+ # Returns the string representation of the object
164
+ # @return [String] String presentation of the object
165
+ def to_s
166
+ to_hash.to_s
167
+ end
168
+
169
+ # to_body is an alias to to_hash (backward compatibility)
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_body
172
+ to_hash
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ next if value.nil?
182
+ hash[param] = _to_hash(value)
183
+ end
184
+ hash
185
+ end
186
+
187
+ # Outputs non-array value in the form of hash
188
+ # For object, use to_hash. Otherwise, just return the value
189
+ # @param [Object] value Any valid value
190
+ # @return [Hash] Returns the value in the form of hash
191
+ def _to_hash(value)
192
+ if value.is_a?(Array)
193
+ value.compact.map { |v| _to_hash(v) }
194
+ elsif value.is_a?(Hash)
195
+ {}.tap do |hash|
196
+ value.each { |k, v| hash[k] = _to_hash(v) }
197
+ end
198
+ elsif value.respond_to? :to_hash
199
+ value.to_hash
200
+ else
201
+ value
202
+ end
203
+ end
204
+
205
+ end
206
+ end
@@ -0,0 +1,214 @@
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
+ class DelegationInfo
16
+ #
17
+ attr_accessor :email
18
+
19
+ #
20
+ attr_accessor :name
21
+
22
+ #
23
+ attr_accessor :user_authorization_id
24
+
25
+ #
26
+ attr_accessor :user_id
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'email' => :'Email',
32
+ :'name' => :'Name',
33
+ :'user_authorization_id' => :'UserAuthorizationId',
34
+ :'user_id' => :'UserId'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'email' => :'String',
42
+ :'name' => :'String',
43
+ :'user_authorization_id' => :'String',
44
+ :'user_id' => :'String'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ return unless attributes.is_a?(Hash)
52
+
53
+ # convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
55
+
56
+ if attributes.has_key?(:'Email')
57
+ self.email = attributes[:'Email']
58
+ end
59
+
60
+ if attributes.has_key?(:'Name')
61
+ self.name = attributes[:'Name']
62
+ end
63
+
64
+ if attributes.has_key?(:'UserAuthorizationId')
65
+ self.user_authorization_id = attributes[:'UserAuthorizationId']
66
+ end
67
+
68
+ if attributes.has_key?(:'UserId')
69
+ self.user_id = attributes[:'UserId']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ email == o.email &&
92
+ name == o.name &&
93
+ user_authorization_id == o.user_authorization_id &&
94
+ user_id == o.user_id
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Fixnum] Hash code
105
+ def hash
106
+ [email, name, user_authorization_id, user_id].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ self.class.swagger_types.each_pair do |key, type|
115
+ if type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :DateTime
136
+ DateTime.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :BOOLEAN
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ temp_model = DocuSign_eSign.const_get(type).new
167
+ temp_model.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ next if value.nil?
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+
213
+ end
214
+ end
@@ -0,0 +1,194 @@
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
+ class EnvelopeDelayRuleApiModel
16
+ #
17
+ attr_accessor :delay
18
+
19
+ #
20
+ attr_accessor :resume_date
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'delay' => :'delay',
26
+ :'resume_date' => :'resumeDate'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.swagger_types
32
+ {
33
+ :'delay' => :'String',
34
+ :'resume_date' => :'String'
35
+ }
36
+ end
37
+
38
+ # Initializes the object
39
+ # @param [Hash] attributes Model attributes in the form of hash
40
+ def initialize(attributes = {})
41
+ return unless attributes.is_a?(Hash)
42
+
43
+ # convert string to symbol for hash key
44
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
45
+
46
+ if attributes.has_key?(:'delay')
47
+ self.delay = attributes[:'delay']
48
+ end
49
+
50
+ if attributes.has_key?(:'resumeDate')
51
+ self.resume_date = attributes[:'resumeDate']
52
+ end
53
+ end
54
+
55
+ # Show invalid properties with the reasons. Usually used together with valid?
56
+ # @return Array for valid properties with the reasons
57
+ def list_invalid_properties
58
+ invalid_properties = Array.new
59
+ invalid_properties
60
+ end
61
+
62
+ # Check to see if the all the properties in the model are valid
63
+ # @return true if the model is valid
64
+ def valid?
65
+ true
66
+ end
67
+
68
+ # Checks equality by comparing each attribute.
69
+ # @param [Object] Object to be compared
70
+ def ==(o)
71
+ return true if self.equal?(o)
72
+ self.class == o.class &&
73
+ delay == o.delay &&
74
+ resume_date == o.resume_date
75
+ end
76
+
77
+ # @see the `==` method
78
+ # @param [Object] Object to be compared
79
+ def eql?(o)
80
+ self == o
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Fixnum] Hash code
85
+ def hash
86
+ [delay, resume_date].hash
87
+ end
88
+
89
+ # Builds the object from hash
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ # @return [Object] Returns the model itself
92
+ def build_from_hash(attributes)
93
+ return nil unless attributes.is_a?(Hash)
94
+ self.class.swagger_types.each_pair do |key, type|
95
+ if type =~ /\AArray<(.*)>/i
96
+ # check to ensure the input is an array given that the attribute
97
+ # is documented as an array but the input is not
98
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
99
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
100
+ end
101
+ elsif !attributes[self.class.attribute_map[key]].nil?
102
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
103
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
104
+ end
105
+
106
+ self
107
+ end
108
+
109
+ # Deserializes the data based on type
110
+ # @param string type Data type
111
+ # @param string value Value to be deserialized
112
+ # @return [Object] Deserialized data
113
+ def _deserialize(type, value)
114
+ case type.to_sym
115
+ when :DateTime
116
+ DateTime.parse(value)
117
+ when :Date
118
+ Date.parse(value)
119
+ when :String
120
+ value.to_s
121
+ when :Integer
122
+ value.to_i
123
+ when :Float
124
+ value.to_f
125
+ when :BOOLEAN
126
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
127
+ true
128
+ else
129
+ false
130
+ end
131
+ when :Object
132
+ # generic object (usually a Hash), return directly
133
+ value
134
+ when /\AArray<(?<inner_type>.+)>\z/
135
+ inner_type = Regexp.last_match[:inner_type]
136
+ value.map { |v| _deserialize(inner_type, v) }
137
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
138
+ k_type = Regexp.last_match[:k_type]
139
+ v_type = Regexp.last_match[:v_type]
140
+ {}.tap do |hash|
141
+ value.each do |k, v|
142
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
143
+ end
144
+ end
145
+ else # model
146
+ temp_model = DocuSign_eSign.const_get(type).new
147
+ temp_model.build_from_hash(value)
148
+ end
149
+ end
150
+
151
+ # Returns the string representation of the object
152
+ # @return [String] String presentation of the object
153
+ def to_s
154
+ to_hash.to_s
155
+ end
156
+
157
+ # to_body is an alias to to_hash (backward compatibility)
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_body
160
+ to_hash
161
+ end
162
+
163
+ # Returns the object in the form of hash
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_hash
166
+ hash = {}
167
+ self.class.attribute_map.each_pair do |attr, param|
168
+ value = self.send(attr)
169
+ next if value.nil?
170
+ hash[param] = _to_hash(value)
171
+ end
172
+ hash
173
+ end
174
+
175
+ # Outputs non-array value in the form of hash
176
+ # For object, use to_hash. Otherwise, just return the value
177
+ # @param [Object] value Any valid value
178
+ # @return [Hash] Returns the value in the form of hash
179
+ def _to_hash(value)
180
+ if value.is_a?(Array)
181
+ value.compact.map { |v| _to_hash(v) }
182
+ elsif value.is_a?(Hash)
183
+ {}.tap do |hash|
184
+ value.each { |k, v| hash[k] = _to_hash(v) }
185
+ end
186
+ elsif value.respond_to? :to_hash
187
+ value.to_hash
188
+ else
189
+ value
190
+ end
191
+ end
192
+
193
+ end
194
+ end