docusign_esign 3.4.0.rc1 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1 -1
  3. data/Gemfile.lock +73 -0
  4. data/README.md +7 -5
  5. data/docusign_esign-2.6.0.gem +0 -0
  6. data/docusign_esign-2.6.0.rc1.gem +0 -0
  7. data/docusign_esign-2.7.0.rc1.gem +0 -0
  8. data/docusign_esign-3.5.0.gem +0 -0
  9. data/docusign_esign-3.5.0.rc1.gem +0 -0
  10. data/docusign_esign-3.6.0.rc1.gem +0 -0
  11. data/lib/docusign_esign.rb +34 -0
  12. data/lib/docusign_esign/.DS_Store +0 -0
  13. data/lib/docusign_esign/api/.DS_Store +0 -0
  14. data/lib/docusign_esign/api/accounts_api.rb +949 -35
  15. data/lib/docusign_esign/api/bulk_envelopes_api.rb +126 -4
  16. data/lib/docusign_esign/api/envelopes_api.rb +376 -2
  17. data/lib/docusign_esign/client/.DS_Store +0 -0
  18. data/lib/docusign_esign/models/account_settings_information.rb +30 -1
  19. data/lib/docusign_esign/models/account_signature.rb +497 -0
  20. data/lib/docusign_esign/models/account_signature_definition.rb +338 -0
  21. data/lib/docusign_esign/models/account_signatures_information.rb +187 -0
  22. data/lib/docusign_esign/models/bulk_send_batch_status.rb +287 -0
  23. data/lib/docusign_esign/models/bulk_send_batch_summaries.rb +277 -0
  24. data/lib/docusign_esign/models/bulk_send_batch_summary.rb +255 -0
  25. data/lib/docusign_esign/models/bulk_send_error_status.rb +207 -0
  26. data/lib/docusign_esign/models/conditional_recipient_rule.rb +216 -0
  27. data/lib/docusign_esign/models/conditional_recipient_rule_condition.rb +207 -0
  28. data/lib/docusign_esign/models/conditional_recipient_rule_filter.rb +235 -0
  29. data/lib/docusign_esign/models/correct_view_request.rb +14 -4
  30. data/lib/docusign_esign/models/e_note_configuration.rb +11 -1
  31. data/lib/docusign_esign/models/envelope.rb +13 -4
  32. data/lib/docusign_esign/models/envelope_definition.rb +13 -4
  33. data/lib/docusign_esign/models/envelope_template.rb +13 -4
  34. data/lib/docusign_esign/models/in_person_signer.rb +11 -1
  35. data/lib/docusign_esign/models/new_user.rb +11 -1
  36. data/lib/docusign_esign/models/notary_certificate.rb +869 -0
  37. data/lib/docusign_esign/models/notary_recipient.rb +1097 -0
  38. data/lib/docusign_esign/models/notary_seal.rb +983 -0
  39. data/lib/docusign_esign/models/proof_service_resource_token.rb +14 -4
  40. data/lib/docusign_esign/models/recipient_additional_notification.rb +14 -4
  41. data/lib/docusign_esign/models/recipient_group.rb +207 -0
  42. data/lib/docusign_esign/models/recipient_option.rb +225 -0
  43. data/lib/docusign_esign/models/recipient_routing.rb +184 -0
  44. data/lib/docusign_esign/models/recipient_rules.rb +187 -0
  45. data/lib/docusign_esign/models/recipients.rb +13 -1
  46. data/lib/docusign_esign/models/report_in_product_csv_run_request.rb +437 -0
  47. data/lib/docusign_esign/models/report_in_product_field.rb +215 -0
  48. data/lib/docusign_esign/models/report_in_product_get.rb +466 -0
  49. data/lib/docusign_esign/models/report_in_product_list.rb +187 -0
  50. data/lib/docusign_esign/models/report_in_product_list_item.rb +315 -0
  51. data/lib/docusign_esign/models/report_in_product_run_request.rb +397 -0
  52. data/lib/docusign_esign/models/report_in_product_run_response.rb +247 -0
  53. data/lib/docusign_esign/models/report_in_product_run_response_row.rb +194 -0
  54. data/lib/docusign_esign/models/report_in_product_run_response_row_fields.rb +1395 -0
  55. data/lib/docusign_esign/models/report_in_product_save_response.rb +185 -0
  56. data/lib/docusign_esign/models/report_in_product_sent_by_details.rb +199 -0
  57. data/lib/docusign_esign/models/sender_email_notifications.rb +11 -1
  58. data/lib/docusign_esign/models/signature_group.rb +205 -0
  59. data/lib/docusign_esign/models/signature_group_def.rb +195 -0
  60. data/lib/docusign_esign/models/signature_user.rb +215 -0
  61. data/lib/docusign_esign/models/signature_user_def.rb +205 -0
  62. data/lib/docusign_esign/models/signer.rb +11 -1
  63. data/lib/docusign_esign/models/tab_metadata.rb +21 -1
  64. data/lib/docusign_esign/models/tabs.rb +25 -1
  65. data/lib/docusign_esign/models/template_recipients.rb +13 -1
  66. data/lib/docusign_esign/models/template_tabs.rb +25 -1
  67. data/lib/docusign_esign/models/user_account_management_granular_information.rb +20 -1
  68. data/lib/docusign_esign/models/witness.rb +11 -1
  69. data/lib/docusign_esign/models/workflow.rb +207 -0
  70. data/lib/docusign_esign/models/workflow_step.rb +254 -0
  71. data/lib/docusign_esign/version.rb +1 -1
  72. data/tests/Gemfile.lock +3 -3
  73. metadata +48 -5
  74. data/docusign_esign-2.4.0.gem +0 -0
@@ -0,0 +1,185 @@
1
+ =begin
2
+ #DocuSign REST API
3
+
4
+ #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
5
+
6
+ OpenAPI spec version: v2.1
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.13-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module DocuSign_eSign
16
+ class ReportInProductSaveResponse
17
+ #
18
+ attr_accessor :report_customized_id
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'report_customized_id' => :'reportCustomizedId'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ :'report_customized_id' => :'String'
31
+ }
32
+ end
33
+
34
+ # Initializes the object
35
+ # @param [Hash] attributes Model attributes in the form of hash
36
+ def initialize(attributes = {})
37
+ return unless attributes.is_a?(Hash)
38
+
39
+ # convert string to symbol for hash key
40
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
41
+
42
+ if attributes.has_key?(:'reportCustomizedId')
43
+ self.report_customized_id = attributes[:'reportCustomizedId']
44
+ end
45
+ end
46
+
47
+ # Show invalid properties with the reasons. Usually used together with valid?
48
+ # @return Array for valid properties with the reasons
49
+ def list_invalid_properties
50
+ invalid_properties = Array.new
51
+ invalid_properties
52
+ end
53
+
54
+ # Check to see if the all the properties in the model are valid
55
+ # @return true if the model is valid
56
+ def valid?
57
+ true
58
+ end
59
+
60
+ # Checks equality by comparing each attribute.
61
+ # @param [Object] Object to be compared
62
+ def ==(o)
63
+ return true if self.equal?(o)
64
+ self.class == o.class &&
65
+ report_customized_id == o.report_customized_id
66
+ end
67
+
68
+ # @see the `==` method
69
+ # @param [Object] Object to be compared
70
+ def eql?(o)
71
+ self == o
72
+ end
73
+
74
+ # Calculates hash code according to all attributes.
75
+ # @return [Fixnum] Hash code
76
+ def hash
77
+ [report_customized_id].hash
78
+ end
79
+
80
+ # Builds the object from hash
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ # @return [Object] Returns the model itself
83
+ def build_from_hash(attributes)
84
+ return nil unless attributes.is_a?(Hash)
85
+ self.class.swagger_types.each_pair do |key, type|
86
+ if type =~ /\AArray<(.*)>/i
87
+ # check to ensure the input is an array given that the attribute
88
+ # is documented as an array but the input is not
89
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
90
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
91
+ end
92
+ elsif !attributes[self.class.attribute_map[key]].nil?
93
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
94
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
95
+ end
96
+
97
+ self
98
+ end
99
+
100
+ # Deserializes the data based on type
101
+ # @param string type Data type
102
+ # @param string value Value to be deserialized
103
+ # @return [Object] Deserialized data
104
+ def _deserialize(type, value)
105
+ case type.to_sym
106
+ when :DateTime
107
+ DateTime.parse(value)
108
+ when :Date
109
+ Date.parse(value)
110
+ when :String
111
+ value.to_s
112
+ when :Integer
113
+ value.to_i
114
+ when :Float
115
+ value.to_f
116
+ when :BOOLEAN
117
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
118
+ true
119
+ else
120
+ false
121
+ end
122
+ when :Object
123
+ # generic object (usually a Hash), return directly
124
+ value
125
+ when /\AArray<(?<inner_type>.+)>\z/
126
+ inner_type = Regexp.last_match[:inner_type]
127
+ value.map { |v| _deserialize(inner_type, v) }
128
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
129
+ k_type = Regexp.last_match[:k_type]
130
+ v_type = Regexp.last_match[:v_type]
131
+ {}.tap do |hash|
132
+ value.each do |k, v|
133
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
134
+ end
135
+ end
136
+ else # model
137
+ temp_model = DocuSign_eSign.const_get(type).new
138
+ temp_model.build_from_hash(value)
139
+ end
140
+ end
141
+
142
+ # Returns the string representation of the object
143
+ # @return [String] String presentation of the object
144
+ def to_s
145
+ to_hash.to_s
146
+ end
147
+
148
+ # to_body is an alias to to_hash (backward compatibility)
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_body
151
+ to_hash
152
+ end
153
+
154
+ # Returns the object in the form of hash
155
+ # @return [Hash] Returns the object in the form of hash
156
+ def to_hash
157
+ hash = {}
158
+ self.class.attribute_map.each_pair do |attr, param|
159
+ value = self.send(attr)
160
+ next if value.nil?
161
+ hash[param] = _to_hash(value)
162
+ end
163
+ hash
164
+ end
165
+
166
+ # Outputs non-array value in the form of hash
167
+ # For object, use to_hash. Otherwise, just return the value
168
+ # @param [Object] value Any valid value
169
+ # @return [Hash] Returns the value in the form of hash
170
+ def _to_hash(value)
171
+ if value.is_a?(Array)
172
+ value.compact.map { |v| _to_hash(v) }
173
+ elsif value.is_a?(Hash)
174
+ {}.tap do |hash|
175
+ value.each { |k, v| hash[k] = _to_hash(v) }
176
+ end
177
+ elsif value.respond_to? :to_hash
178
+ value.to_hash
179
+ else
180
+ value
181
+ end
182
+ end
183
+
184
+ end
185
+ end
@@ -0,0 +1,199 @@
1
+ =begin
2
+ #DocuSign REST API
3
+
4
+ #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
5
+
6
+ OpenAPI spec version: v2.1
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.13-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module DocuSign_eSign
16
+ class ReportInProductSentByDetails
17
+ # A collection group objects containing information about the groups returned.
18
+ attr_accessor :groups
19
+
20
+ #
21
+ attr_accessor :users
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'groups' => :'groups',
27
+ :'users' => :'users'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'groups' => :'Array<Group>',
35
+ :'users' => :'Array<UserInfo>'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'groups')
48
+ if (value = attributes[:'groups']).is_a?(Array)
49
+ self.groups = value
50
+ end
51
+ end
52
+
53
+ if attributes.has_key?(:'users')
54
+ if (value = attributes[:'users']).is_a?(Array)
55
+ self.users = value
56
+ end
57
+ end
58
+ end
59
+
60
+ # Show invalid properties with the reasons. Usually used together with valid?
61
+ # @return Array for valid properties with the reasons
62
+ def list_invalid_properties
63
+ invalid_properties = Array.new
64
+ 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
+ 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
+ groups == o.groups &&
79
+ users == o.users
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
+ [groups, users].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 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
+ end
@@ -32,6 +32,9 @@ module DocuSign_eSign
32
32
  # When set to **true**, the user receives notification if the offline signing failed.
33
33
  attr_accessor :offline_signing_failed
34
34
 
35
+ #
36
+ attr_accessor :powerform_responses_limit_notification_email
37
+
35
38
  #
36
39
  attr_accessor :purge_documents
37
40
 
@@ -53,6 +56,7 @@ module DocuSign_eSign
53
56
  :'delivery_failed' => :'deliveryFailed',
54
57
  :'envelope_complete' => :'envelopeComplete',
55
58
  :'offline_signing_failed' => :'offlineSigningFailed',
59
+ :'powerform_responses_limit_notification_email' => :'powerformResponsesLimitNotificationEmail',
56
60
  :'purge_documents' => :'purgeDocuments',
57
61
  :'recipient_viewed' => :'recipientViewed',
58
62
  :'sender_envelope_declined' => :'senderEnvelopeDeclined',
@@ -69,6 +73,7 @@ module DocuSign_eSign
69
73
  :'delivery_failed' => :'String',
70
74
  :'envelope_complete' => :'String',
71
75
  :'offline_signing_failed' => :'String',
76
+ :'powerform_responses_limit_notification_email' => :'String',
72
77
  :'purge_documents' => :'String',
73
78
  :'recipient_viewed' => :'String',
74
79
  :'sender_envelope_declined' => :'String',
@@ -108,6 +113,10 @@ module DocuSign_eSign
108
113
  self.offline_signing_failed = attributes[:'offlineSigningFailed']
109
114
  end
110
115
 
116
+ if attributes.has_key?(:'powerformResponsesLimitNotificationEmail')
117
+ self.powerform_responses_limit_notification_email = attributes[:'powerformResponsesLimitNotificationEmail']
118
+ end
119
+
111
120
  if attributes.has_key?(:'purgeDocuments')
112
121
  self.purge_documents = attributes[:'purgeDocuments']
113
122
  end
@@ -149,6 +158,7 @@ module DocuSign_eSign
149
158
  delivery_failed == o.delivery_failed &&
150
159
  envelope_complete == o.envelope_complete &&
151
160
  offline_signing_failed == o.offline_signing_failed &&
161
+ powerform_responses_limit_notification_email == o.powerform_responses_limit_notification_email &&
152
162
  purge_documents == o.purge_documents &&
153
163
  recipient_viewed == o.recipient_viewed &&
154
164
  sender_envelope_declined == o.sender_envelope_declined &&
@@ -164,7 +174,7 @@ module DocuSign_eSign
164
174
  # Calculates hash code according to all attributes.
165
175
  # @return [Fixnum] Hash code
166
176
  def hash
167
- [changed_signer, comments_only_private_and_mention, comments_receive_all, delivery_failed, envelope_complete, offline_signing_failed, purge_documents, recipient_viewed, sender_envelope_declined, withdrawn_consent].hash
177
+ [changed_signer, comments_only_private_and_mention, comments_receive_all, delivery_failed, envelope_complete, offline_signing_failed, powerform_responses_limit_notification_email, purge_documents, recipient_viewed, sender_envelope_declined, withdrawn_consent].hash
168
178
  end
169
179
 
170
180
  # Builds the object from hash
@@ -0,0 +1,205 @@
1
+ =begin
2
+ #DocuSign REST API
3
+
4
+ #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
5
+
6
+ OpenAPI spec version: v2.1
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.13-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module DocuSign_eSign
16
+ class SignatureGroup
17
+ #
18
+ attr_accessor :group_id
19
+
20
+ # The name of the group.
21
+ attr_accessor :group_name
22
+
23
+ #
24
+ attr_accessor :rights
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'group_id' => :'groupId',
30
+ :'group_name' => :'groupName',
31
+ :'rights' => :'rights'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'group_id' => :'String',
39
+ :'group_name' => :'String',
40
+ :'rights' => :'String'
41
+ }
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ return unless attributes.is_a?(Hash)
48
+
49
+ # convert string to symbol for hash key
50
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
51
+
52
+ if attributes.has_key?(:'groupId')
53
+ self.group_id = attributes[:'groupId']
54
+ end
55
+
56
+ if attributes.has_key?(:'groupName')
57
+ self.group_name = attributes[:'groupName']
58
+ end
59
+
60
+ if attributes.has_key?(:'rights')
61
+ self.rights = attributes[:'rights']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ group_id == o.group_id &&
84
+ group_name == o.group_name &&
85
+ rights == o.rights
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Fixnum] Hash code
96
+ def hash
97
+ [group_id, group_name, rights].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.swagger_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :BOOLEAN
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ temp_model = DocuSign_eSign.const_get(type).new
158
+ temp_model.build_from_hash(value)
159
+ end
160
+ end
161
+
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # to_body is an alias to to_hash (backward compatibility)
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_body
171
+ to_hash
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ next if value.nil?
181
+ hash[param] = _to_hash(value)
182
+ end
183
+ hash
184
+ end
185
+
186
+ # Outputs non-array value in the form of hash
187
+ # For object, use to_hash. Otherwise, just return the value
188
+ # @param [Object] value Any valid value
189
+ # @return [Hash] Returns the value in the form of hash
190
+ def _to_hash(value)
191
+ if value.is_a?(Array)
192
+ value.compact.map { |v| _to_hash(v) }
193
+ elsif value.is_a?(Hash)
194
+ {}.tap do |hash|
195
+ value.each { |k, v| hash[k] = _to_hash(v) }
196
+ end
197
+ elsif value.respond_to? :to_hash
198
+ value.to_hash
199
+ else
200
+ value
201
+ end
202
+ end
203
+
204
+ end
205
+ end