docusign_esign 3.22.0 → 3.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/docusign_esign/api/accounts_api.rb +507 -0
- data/lib/docusign_esign/client/api_client.rb +1 -1
- data/lib/docusign_esign/models/authorization_user.rb +214 -0
- data/lib/docusign_esign/models/user_authorization.rb +274 -0
- data/lib/docusign_esign/models/user_authorization_create_request.rb +214 -0
- data/lib/docusign_esign/models/user_authorization_create_request_with_id.rb +224 -0
- data/lib/docusign_esign/models/user_authorization_id_with_status.rb +204 -0
- data/lib/docusign_esign/models/user_authorization_update_request.rb +194 -0
- data/lib/docusign_esign/models/user_authorization_with_status.rb +204 -0
- data/lib/docusign_esign/models/user_authorizations.rb +246 -0
- data/lib/docusign_esign/models/user_authorizations_delete_request.rb +186 -0
- data/lib/docusign_esign/models/user_authorizations_delete_response.rb +186 -0
- data/lib/docusign_esign/models/user_authorizations_request.rb +186 -0
- data/lib/docusign_esign/models/user_authorizations_response.rb +186 -0
- data/lib/docusign_esign/version.rb +1 -1
- data/lib/docusign_esign.rb +12 -0
- metadata +14 -2
@@ -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 AuthorizationUser
|
16
|
+
# The account ID associated with the envelope.
|
17
|
+
attr_accessor :account_id
|
18
|
+
|
19
|
+
#
|
20
|
+
attr_accessor :email
|
21
|
+
|
22
|
+
#
|
23
|
+
attr_accessor :name
|
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
|
+
:'account_id' => :'accountId',
|
32
|
+
:'email' => :'email',
|
33
|
+
:'name' => :'name',
|
34
|
+
:'user_id' => :'userId'
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.swagger_types
|
40
|
+
{
|
41
|
+
:'account_id' => :'String',
|
42
|
+
:'email' => :'String',
|
43
|
+
:'name' => :'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?(:'accountId')
|
57
|
+
self.account_id = attributes[:'accountId']
|
58
|
+
end
|
59
|
+
|
60
|
+
if attributes.has_key?(:'email')
|
61
|
+
self.email = attributes[:'email']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.has_key?(:'name')
|
65
|
+
self.name = attributes[:'name']
|
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
|
+
account_id == o.account_id &&
|
92
|
+
email == o.email &&
|
93
|
+
name == o.name &&
|
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
|
+
[account_id, email, name, 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,274 @@
|
|
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 UserAuthorization
|
16
|
+
#
|
17
|
+
attr_accessor :agent_user
|
18
|
+
|
19
|
+
#
|
20
|
+
attr_accessor :authorization_id
|
21
|
+
|
22
|
+
#
|
23
|
+
attr_accessor :created
|
24
|
+
|
25
|
+
#
|
26
|
+
attr_accessor :created_by
|
27
|
+
|
28
|
+
#
|
29
|
+
attr_accessor :end_date
|
30
|
+
|
31
|
+
#
|
32
|
+
attr_accessor :modified
|
33
|
+
|
34
|
+
#
|
35
|
+
attr_accessor :modified_by
|
36
|
+
|
37
|
+
#
|
38
|
+
attr_accessor :permission
|
39
|
+
|
40
|
+
#
|
41
|
+
attr_accessor :principal_user
|
42
|
+
|
43
|
+
#
|
44
|
+
attr_accessor :start_date
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'agent_user' => :'agentUser',
|
50
|
+
:'authorization_id' => :'authorizationId',
|
51
|
+
:'created' => :'created',
|
52
|
+
:'created_by' => :'createdBy',
|
53
|
+
:'end_date' => :'endDate',
|
54
|
+
:'modified' => :'modified',
|
55
|
+
:'modified_by' => :'modifiedBy',
|
56
|
+
:'permission' => :'permission',
|
57
|
+
:'principal_user' => :'principalUser',
|
58
|
+
:'start_date' => :'startDate'
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute type mapping.
|
63
|
+
def self.swagger_types
|
64
|
+
{
|
65
|
+
:'agent_user' => :'AuthorizationUser',
|
66
|
+
:'authorization_id' => :'String',
|
67
|
+
:'created' => :'String',
|
68
|
+
:'created_by' => :'String',
|
69
|
+
:'end_date' => :'String',
|
70
|
+
:'modified' => :'String',
|
71
|
+
:'modified_by' => :'String',
|
72
|
+
:'permission' => :'String',
|
73
|
+
:'principal_user' => :'AuthorizationUser',
|
74
|
+
:'start_date' => :'String'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Initializes the object
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
80
|
+
def initialize(attributes = {})
|
81
|
+
return unless attributes.is_a?(Hash)
|
82
|
+
|
83
|
+
# convert string to symbol for hash key
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
85
|
+
|
86
|
+
if attributes.has_key?(:'agentUser')
|
87
|
+
self.agent_user = attributes[:'agentUser']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.has_key?(:'authorizationId')
|
91
|
+
self.authorization_id = attributes[:'authorizationId']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.has_key?(:'created')
|
95
|
+
self.created = attributes[:'created']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'createdBy')
|
99
|
+
self.created_by = attributes[:'createdBy']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.has_key?(:'endDate')
|
103
|
+
self.end_date = attributes[:'endDate']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'modified')
|
107
|
+
self.modified = attributes[:'modified']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.has_key?(:'modifiedBy')
|
111
|
+
self.modified_by = attributes[:'modifiedBy']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.has_key?(:'permission')
|
115
|
+
self.permission = attributes[:'permission']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.has_key?(:'principalUser')
|
119
|
+
self.principal_user = attributes[:'principalUser']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.has_key?(:'startDate')
|
123
|
+
self.start_date = attributes[:'startDate']
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
128
|
+
# @return Array for valid properties with the reasons
|
129
|
+
def list_invalid_properties
|
130
|
+
invalid_properties = Array.new
|
131
|
+
invalid_properties
|
132
|
+
end
|
133
|
+
|
134
|
+
# Check to see if the all the properties in the model are valid
|
135
|
+
# @return true if the model is valid
|
136
|
+
def valid?
|
137
|
+
true
|
138
|
+
end
|
139
|
+
|
140
|
+
# Checks equality by comparing each attribute.
|
141
|
+
# @param [Object] Object to be compared
|
142
|
+
def ==(o)
|
143
|
+
return true if self.equal?(o)
|
144
|
+
self.class == o.class &&
|
145
|
+
agent_user == o.agent_user &&
|
146
|
+
authorization_id == o.authorization_id &&
|
147
|
+
created == o.created &&
|
148
|
+
created_by == o.created_by &&
|
149
|
+
end_date == o.end_date &&
|
150
|
+
modified == o.modified &&
|
151
|
+
modified_by == o.modified_by &&
|
152
|
+
permission == o.permission &&
|
153
|
+
principal_user == o.principal_user &&
|
154
|
+
start_date == o.start_date
|
155
|
+
end
|
156
|
+
|
157
|
+
# @see the `==` method
|
158
|
+
# @param [Object] Object to be compared
|
159
|
+
def eql?(o)
|
160
|
+
self == o
|
161
|
+
end
|
162
|
+
|
163
|
+
# Calculates hash code according to all attributes.
|
164
|
+
# @return [Fixnum] Hash code
|
165
|
+
def hash
|
166
|
+
[agent_user, authorization_id, created, created_by, end_date, modified, modified_by, permission, principal_user, start_date].hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Builds the object from hash
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
171
|
+
# @return [Object] Returns the model itself
|
172
|
+
def build_from_hash(attributes)
|
173
|
+
return nil unless attributes.is_a?(Hash)
|
174
|
+
self.class.swagger_types.each_pair do |key, type|
|
175
|
+
if type =~ /\AArray<(.*)>/i
|
176
|
+
# check to ensure the input is an array given that the attribute
|
177
|
+
# is documented as an array but the input is not
|
178
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
179
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
180
|
+
end
|
181
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
182
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
183
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
184
|
+
end
|
185
|
+
|
186
|
+
self
|
187
|
+
end
|
188
|
+
|
189
|
+
# Deserializes the data based on type
|
190
|
+
# @param string type Data type
|
191
|
+
# @param string value Value to be deserialized
|
192
|
+
# @return [Object] Deserialized data
|
193
|
+
def _deserialize(type, value)
|
194
|
+
case type.to_sym
|
195
|
+
when :DateTime
|
196
|
+
DateTime.parse(value)
|
197
|
+
when :Date
|
198
|
+
Date.parse(value)
|
199
|
+
when :String
|
200
|
+
value.to_s
|
201
|
+
when :Integer
|
202
|
+
value.to_i
|
203
|
+
when :Float
|
204
|
+
value.to_f
|
205
|
+
when :BOOLEAN
|
206
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
207
|
+
true
|
208
|
+
else
|
209
|
+
false
|
210
|
+
end
|
211
|
+
when :Object
|
212
|
+
# generic object (usually a Hash), return directly
|
213
|
+
value
|
214
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
215
|
+
inner_type = Regexp.last_match[:inner_type]
|
216
|
+
value.map { |v| _deserialize(inner_type, v) }
|
217
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
218
|
+
k_type = Regexp.last_match[:k_type]
|
219
|
+
v_type = Regexp.last_match[:v_type]
|
220
|
+
{}.tap do |hash|
|
221
|
+
value.each do |k, v|
|
222
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
else # model
|
226
|
+
temp_model = DocuSign_eSign.const_get(type).new
|
227
|
+
temp_model.build_from_hash(value)
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
# Returns the string representation of the object
|
232
|
+
# @return [String] String presentation of the object
|
233
|
+
def to_s
|
234
|
+
to_hash.to_s
|
235
|
+
end
|
236
|
+
|
237
|
+
# to_body is an alias to to_hash (backward compatibility)
|
238
|
+
# @return [Hash] Returns the object in the form of hash
|
239
|
+
def to_body
|
240
|
+
to_hash
|
241
|
+
end
|
242
|
+
|
243
|
+
# Returns the object in the form of hash
|
244
|
+
# @return [Hash] Returns the object in the form of hash
|
245
|
+
def to_hash
|
246
|
+
hash = {}
|
247
|
+
self.class.attribute_map.each_pair do |attr, param|
|
248
|
+
value = self.send(attr)
|
249
|
+
next if value.nil?
|
250
|
+
hash[param] = _to_hash(value)
|
251
|
+
end
|
252
|
+
hash
|
253
|
+
end
|
254
|
+
|
255
|
+
# Outputs non-array value in the form of hash
|
256
|
+
# For object, use to_hash. Otherwise, just return the value
|
257
|
+
# @param [Object] value Any valid value
|
258
|
+
# @return [Hash] Returns the value in the form of hash
|
259
|
+
def _to_hash(value)
|
260
|
+
if value.is_a?(Array)
|
261
|
+
value.compact.map { |v| _to_hash(v) }
|
262
|
+
elsif value.is_a?(Hash)
|
263
|
+
{}.tap do |hash|
|
264
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
265
|
+
end
|
266
|
+
elsif value.respond_to? :to_hash
|
267
|
+
value.to_hash
|
268
|
+
else
|
269
|
+
value
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
end
|
274
|
+
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 UserAuthorizationCreateRequest
|
16
|
+
#
|
17
|
+
attr_accessor :agent_user
|
18
|
+
|
19
|
+
#
|
20
|
+
attr_accessor :end_date
|
21
|
+
|
22
|
+
#
|
23
|
+
attr_accessor :permission
|
24
|
+
|
25
|
+
#
|
26
|
+
attr_accessor :start_date
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'agent_user' => :'agentUser',
|
32
|
+
:'end_date' => :'endDate',
|
33
|
+
:'permission' => :'permission',
|
34
|
+
:'start_date' => :'startDate'
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.swagger_types
|
40
|
+
{
|
41
|
+
:'agent_user' => :'AuthorizationUser',
|
42
|
+
:'end_date' => :'String',
|
43
|
+
:'permission' => :'String',
|
44
|
+
:'start_date' => :'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?(:'agentUser')
|
57
|
+
self.agent_user = attributes[:'agentUser']
|
58
|
+
end
|
59
|
+
|
60
|
+
if attributes.has_key?(:'endDate')
|
61
|
+
self.end_date = attributes[:'endDate']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.has_key?(:'permission')
|
65
|
+
self.permission = attributes[:'permission']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'startDate')
|
69
|
+
self.start_date = attributes[:'startDate']
|
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
|
+
agent_user == o.agent_user &&
|
92
|
+
end_date == o.end_date &&
|
93
|
+
permission == o.permission &&
|
94
|
+
start_date == o.start_date
|
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
|
+
[agent_user, end_date, permission, start_date].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
|