docusign_admin 1.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/LICENSE +21 -0
- data/README.md +51 -0
- data/Rakefile +8 -0
- data/docusign_admin.gemspec +45 -0
- data/git_push.sh +55 -0
- data/lib/docusign_admin/.DS_Store +0 -0
- data/lib/docusign_admin/api/accounts_api.rb +213 -0
- data/lib/docusign_admin/api/bulk_exports_api.rb +456 -0
- data/lib/docusign_admin/api/bulk_imports_api.rb +785 -0
- data/lib/docusign_admin/api/ds_groups_api.rb +472 -0
- data/lib/docusign_admin/api/identity_providers_api.rb +75 -0
- data/lib/docusign_admin/api/product_permission_profiles_api.rb +201 -0
- data/lib/docusign_admin/api/reserved_domains_api.rb +75 -0
- data/lib/docusign_admin/api/users_api.rb +650 -0
- data/lib/docusign_admin/client/.DS_Store +0 -0
- data/lib/docusign_admin/client/api_client.rb +597 -0
- data/lib/docusign_admin/client/api_error.rb +37 -0
- data/lib/docusign_admin/client/auth/oauth.rb +1061 -0
- data/lib/docusign_admin/configuration.rb +202 -0
- data/lib/docusign_admin/models/add_ds_group_and_users_response.rb +192 -0
- data/lib/docusign_admin/models/add_ds_group_users_response.rb +203 -0
- data/lib/docusign_admin/models/add_user_response.rb +257 -0
- data/lib/docusign_admin/models/add_user_response_account_properties.rb +232 -0
- data/lib/docusign_admin/models/certificate_response.rb +230 -0
- data/lib/docusign_admin/models/delete_membership_request.rb +188 -0
- data/lib/docusign_admin/models/delete_membership_response.rb +192 -0
- data/lib/docusign_admin/models/delete_memberships_request.rb +190 -0
- data/lib/docusign_admin/models/delete_memberships_response.rb +194 -0
- data/lib/docusign_admin/models/delete_response.rb +194 -0
- data/lib/docusign_admin/models/delete_user_identity_request.rb +190 -0
- data/lib/docusign_admin/models/domain_response.rb +241 -0
- data/lib/docusign_admin/models/domains_response.rb +185 -0
- data/lib/docusign_admin/models/ds_group_add_request.rb +197 -0
- data/lib/docusign_admin/models/ds_group_and_users_response.rb +192 -0
- data/lib/docusign_admin/models/ds_group_list_response.rb +221 -0
- data/lib/docusign_admin/models/ds_group_request.rb +188 -0
- data/lib/docusign_admin/models/ds_group_response.rb +273 -0
- data/lib/docusign_admin/models/ds_group_user_response.rb +246 -0
- data/lib/docusign_admin/models/ds_group_users_add_request.rb +190 -0
- data/lib/docusign_admin/models/ds_group_users_remove_request.rb +190 -0
- data/lib/docusign_admin/models/ds_group_users_response.rb +212 -0
- data/lib/docusign_admin/models/error_details.rb +192 -0
- data/lib/docusign_admin/models/force_activate_membership_request.rb +188 -0
- data/lib/docusign_admin/models/group_request.rb +206 -0
- data/lib/docusign_admin/models/identity_provider_response.rb +230 -0
- data/lib/docusign_admin/models/identity_providers_response.rb +185 -0
- data/lib/docusign_admin/models/link_response.rb +192 -0
- data/lib/docusign_admin/models/member_group_response.rb +201 -0
- data/lib/docusign_admin/models/member_groups_response.rb +194 -0
- data/lib/docusign_admin/models/membership_response.rb +266 -0
- data/lib/docusign_admin/models/new_account_user_request.rb +289 -0
- data/lib/docusign_admin/models/new_multi_product_user_add_request.rb +287 -0
- data/lib/docusign_admin/models/new_user_request.rb +285 -0
- data/lib/docusign_admin/models/new_user_request_account_properties.rb +226 -0
- data/lib/docusign_admin/models/new_user_response.rb +257 -0
- data/lib/docusign_admin/models/new_user_response_account_properties.rb +230 -0
- data/lib/docusign_admin/models/oasirr_error_details.rb +192 -0
- data/lib/docusign_admin/models/oasirr_organization_account_settings_error_data_response.rb +219 -0
- data/lib/docusign_admin/models/oetr_error_details.rb +192 -0
- data/lib/docusign_admin/models/org_export_selected_account.rb +183 -0
- data/lib/docusign_admin/models/org_export_selected_domain.rb +183 -0
- data/lib/docusign_admin/models/org_report_configuration_response.rb +203 -0
- data/lib/docusign_admin/models/org_report_create_response.rb +183 -0
- data/lib/docusign_admin/models/org_report_list_response.rb +185 -0
- data/lib/docusign_admin/models/org_report_list_response_org_report.rb +282 -0
- data/lib/docusign_admin/models/org_report_list_response_requestor.rb +192 -0
- data/lib/docusign_admin/models/org_report_request.rb +221 -0
- data/lib/docusign_admin/models/organization_account_request.rb +188 -0
- data/lib/docusign_admin/models/organization_account_response.rb +210 -0
- data/lib/docusign_admin/models/organization_account_settings_import_requestor_response.rb +210 -0
- data/lib/docusign_admin/models/organization_account_settings_import_response.rb +313 -0
- data/lib/docusign_admin/models/organization_account_settings_import_result_response.rb +239 -0
- data/lib/docusign_admin/models/organization_accounts_request.rb +185 -0
- data/lib/docusign_admin/models/organization_export_account.rb +183 -0
- data/lib/docusign_admin/models/organization_export_domain.rb +183 -0
- data/lib/docusign_admin/models/organization_export_request.rb +205 -0
- data/lib/docusign_admin/models/organization_export_requestor_response.rb +210 -0
- data/lib/docusign_admin/models/organization_export_response.rb +324 -0
- data/lib/docusign_admin/models/organization_export_task_response.rb +228 -0
- data/lib/docusign_admin/models/organization_exports_response.rb +185 -0
- data/lib/docusign_admin/models/organization_import_response.rb +414 -0
- data/lib/docusign_admin/models/organization_import_response_error_rollup.rb +192 -0
- data/lib/docusign_admin/models/organization_import_response_requestor.rb +210 -0
- data/lib/docusign_admin/models/organization_import_response_warning_rollup.rb +192 -0
- data/lib/docusign_admin/models/organization_imports_response.rb +185 -0
- data/lib/docusign_admin/models/organization_response.rb +310 -0
- data/lib/docusign_admin/models/organization_salesforce_account_managers_response.rb +228 -0
- data/lib/docusign_admin/models/organization_simple_id_object.rb +183 -0
- data/lib/docusign_admin/models/organization_user_response.rb +275 -0
- data/lib/docusign_admin/models/organization_users_response.rb +194 -0
- data/lib/docusign_admin/models/organizations_response.rb +185 -0
- data/lib/docusign_admin/models/osamr_contact.rb +201 -0
- data/lib/docusign_admin/models/paging_response_properties.rb +228 -0
- data/lib/docusign_admin/models/permission_profile_request.rb +197 -0
- data/lib/docusign_admin/models/permission_profile_response.rb +192 -0
- data/lib/docusign_admin/models/permission_profile_response2_1.rb +192 -0
- data/lib/docusign_admin/models/permissions_response.rb +185 -0
- data/lib/docusign_admin/models/product_permission_profile_request.rb +202 -0
- data/lib/docusign_admin/models/product_permission_profile_response.rb +212 -0
- data/lib/docusign_admin/models/product_permission_profiles_request.rb +190 -0
- data/lib/docusign_admin/models/product_permission_profiles_response.rb +185 -0
- data/lib/docusign_admin/models/remove_ds_group_users_response.rb +194 -0
- data/lib/docusign_admin/models/required_attribute_mapping_response.rb +210 -0
- data/lib/docusign_admin/models/saml2_identity_provider_response.rb +216 -0
- data/lib/docusign_admin/models/setting_response.rb +201 -0
- data/lib/docusign_admin/models/update_membership_request.rb +244 -0
- data/lib/docusign_admin/models/update_response.rb +183 -0
- data/lib/docusign_admin/models/update_user_email_request.rb +216 -0
- data/lib/docusign_admin/models/update_user_request.rb +303 -0
- data/lib/docusign_admin/models/update_users_email_request.rb +185 -0
- data/lib/docusign_admin/models/update_users_request.rb +185 -0
- data/lib/docusign_admin/models/user_drilldown_response.rb +340 -0
- data/lib/docusign_admin/models/user_identity_request.rb +183 -0
- data/lib/docusign_admin/models/user_identity_response.rb +219 -0
- data/lib/docusign_admin/models/user_product_permission_profiles_response.rb +203 -0
- data/lib/docusign_admin/models/user_update_response.rb +210 -0
- data/lib/docusign_admin/models/users_drilldown_response.rb +185 -0
- data/lib/docusign_admin/models/users_update_response.rb +194 -0
- data/lib/docusign_admin/version.rb +14 -0
- data/lib/docusign_admin.rb +148 -0
- data/tests/.DS_Store +0 -0
- data/tests/Gemfile +5 -0
- data/tests/docs/Test.pdf +0 -0
- data/tests/docs/organization_user_import.csv +2 -0
- data/tests/spec/unit_tests_using_jwt_spec.rb +231 -0
- metadata +370 -0
@@ -0,0 +1,228 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Admin API
|
3
|
+
|
4
|
+
#An API for an organization administrator to manage organizations, accounts and users
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
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_Admin
|
15
|
+
class OrganizationSalesforceAccountManagersResponse
|
16
|
+
attr_accessor :account_id
|
17
|
+
|
18
|
+
attr_accessor :account_name
|
19
|
+
|
20
|
+
attr_accessor :account_type
|
21
|
+
|
22
|
+
attr_accessor :account_owner
|
23
|
+
|
24
|
+
attr_accessor :account_manager
|
25
|
+
|
26
|
+
attr_accessor :parent_account
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'account_id' => :'account_id',
|
32
|
+
:'account_name' => :'account_name',
|
33
|
+
:'account_type' => :'account_type',
|
34
|
+
:'account_owner' => :'account_owner',
|
35
|
+
:'account_manager' => :'account_manager',
|
36
|
+
:'parent_account' => :'parent_account'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.swagger_types
|
42
|
+
{
|
43
|
+
:'account_id' => :'String',
|
44
|
+
:'account_name' => :'String',
|
45
|
+
:'account_type' => :'String',
|
46
|
+
:'account_owner' => :'OSAMRContact',
|
47
|
+
:'account_manager' => :'OSAMRContact',
|
48
|
+
:'parent_account' => :'OrganizationSalesforceAccountManagersResponse'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
return unless attributes.is_a?(Hash)
|
56
|
+
|
57
|
+
# convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
59
|
+
|
60
|
+
if attributes.has_key?(:'account_id')
|
61
|
+
self.account_id = attributes[:'account_id']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.has_key?(:'account_name')
|
65
|
+
self.account_name = attributes[:'account_name']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'account_type')
|
69
|
+
self.account_type = attributes[:'account_type']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'account_owner')
|
73
|
+
self.account_owner = attributes[:'account_owner']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.has_key?(:'account_manager')
|
77
|
+
self.account_manager = attributes[:'account_manager']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'parent_account')
|
81
|
+
self.parent_account = attributes[:'parent_account']
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
86
|
+
# @return Array for valid properties with the reasons
|
87
|
+
def list_invalid_properties
|
88
|
+
invalid_properties = Array.new
|
89
|
+
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
|
+
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
|
+
account_id == o.account_id &&
|
104
|
+
account_name == o.account_name &&
|
105
|
+
account_type == o.account_type &&
|
106
|
+
account_owner == o.account_owner &&
|
107
|
+
account_manager == o.account_manager &&
|
108
|
+
parent_account == o.parent_account
|
109
|
+
end
|
110
|
+
|
111
|
+
# @see the `==` method
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def eql?(o)
|
114
|
+
self == o
|
115
|
+
end
|
116
|
+
|
117
|
+
# Calculates hash code according to all attributes.
|
118
|
+
# @return [Fixnum] Hash code
|
119
|
+
def hash
|
120
|
+
[account_id, account_name, account_type, account_owner, account_manager, parent_account].hash
|
121
|
+
end
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def build_from_hash(attributes)
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
128
|
+
self.class.swagger_types.each_pair do |key, type|
|
129
|
+
if type =~ /\AArray<(.*)>/i
|
130
|
+
# check to ensure the input is an array given that the attribute
|
131
|
+
# is documented as an array but the input is not
|
132
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
133
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
134
|
+
end
|
135
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
136
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
137
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
138
|
+
end
|
139
|
+
|
140
|
+
self
|
141
|
+
end
|
142
|
+
|
143
|
+
# Deserializes the data based on type
|
144
|
+
# @param string type Data type
|
145
|
+
# @param string value Value to be deserialized
|
146
|
+
# @return [Object] Deserialized data
|
147
|
+
def _deserialize(type, value)
|
148
|
+
case type.to_sym
|
149
|
+
when :DateTime
|
150
|
+
DateTime.parse(value)
|
151
|
+
when :Date
|
152
|
+
Date.parse(value)
|
153
|
+
when :String
|
154
|
+
value.to_s
|
155
|
+
when :Integer
|
156
|
+
value.to_i
|
157
|
+
when :Float
|
158
|
+
value.to_f
|
159
|
+
when :BOOLEAN
|
160
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
161
|
+
true
|
162
|
+
else
|
163
|
+
false
|
164
|
+
end
|
165
|
+
when :Object
|
166
|
+
# generic object (usually a Hash), return directly
|
167
|
+
value
|
168
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
169
|
+
inner_type = Regexp.last_match[:inner_type]
|
170
|
+
value.map { |v| _deserialize(inner_type, v) }
|
171
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
172
|
+
k_type = Regexp.last_match[:k_type]
|
173
|
+
v_type = Regexp.last_match[:v_type]
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each do |k, v|
|
176
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
else # model
|
180
|
+
temp_model = DocuSign_Admin.const_get(type).new
|
181
|
+
temp_model.build_from_hash(value)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the string representation of the object
|
186
|
+
# @return [String] String presentation of the object
|
187
|
+
def to_s
|
188
|
+
to_hash.to_s
|
189
|
+
end
|
190
|
+
|
191
|
+
# to_body is an alias to to_hash (backward compatibility)
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_body
|
194
|
+
to_hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns the object in the form of hash
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
def to_hash
|
200
|
+
hash = {}
|
201
|
+
self.class.attribute_map.each_pair do |attr, param|
|
202
|
+
value = self.send(attr)
|
203
|
+
next if value.nil?
|
204
|
+
hash[param] = _to_hash(value)
|
205
|
+
end
|
206
|
+
hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Outputs non-array value in the form of hash
|
210
|
+
# For object, use to_hash. Otherwise, just return the value
|
211
|
+
# @param [Object] value Any valid value
|
212
|
+
# @return [Hash] Returns the value in the form of hash
|
213
|
+
def _to_hash(value)
|
214
|
+
if value.is_a?(Array)
|
215
|
+
value.compact.map { |v| _to_hash(v) }
|
216
|
+
elsif value.is_a?(Hash)
|
217
|
+
{}.tap do |hash|
|
218
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
219
|
+
end
|
220
|
+
elsif value.respond_to? :to_hash
|
221
|
+
value.to_hash
|
222
|
+
else
|
223
|
+
value
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
228
|
+
end
|
@@ -0,0 +1,183 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Admin API
|
3
|
+
|
4
|
+
#An API for an organization administrator to manage organizations, accounts and users
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
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_Admin
|
15
|
+
class OrganizationSimpleIdObject
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'id' => :'id'
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.swagger_types
|
27
|
+
{
|
28
|
+
:'id' => :'String'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Initializes the object
|
33
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
34
|
+
def initialize(attributes = {})
|
35
|
+
return unless attributes.is_a?(Hash)
|
36
|
+
|
37
|
+
# convert string to symbol for hash key
|
38
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
39
|
+
|
40
|
+
if attributes.has_key?(:'id')
|
41
|
+
self.id = attributes[:'id']
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
46
|
+
# @return Array for valid properties with the reasons
|
47
|
+
def list_invalid_properties
|
48
|
+
invalid_properties = Array.new
|
49
|
+
invalid_properties
|
50
|
+
end
|
51
|
+
|
52
|
+
# Check to see if the all the properties in the model are valid
|
53
|
+
# @return true if the model is valid
|
54
|
+
def valid?
|
55
|
+
true
|
56
|
+
end
|
57
|
+
|
58
|
+
# Checks equality by comparing each attribute.
|
59
|
+
# @param [Object] Object to be compared
|
60
|
+
def ==(o)
|
61
|
+
return true if self.equal?(o)
|
62
|
+
self.class == o.class &&
|
63
|
+
id == o.id
|
64
|
+
end
|
65
|
+
|
66
|
+
# @see the `==` method
|
67
|
+
# @param [Object] Object to be compared
|
68
|
+
def eql?(o)
|
69
|
+
self == o
|
70
|
+
end
|
71
|
+
|
72
|
+
# Calculates hash code according to all attributes.
|
73
|
+
# @return [Fixnum] Hash code
|
74
|
+
def hash
|
75
|
+
[id].hash
|
76
|
+
end
|
77
|
+
|
78
|
+
# Builds the object from hash
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
80
|
+
# @return [Object] Returns the model itself
|
81
|
+
def build_from_hash(attributes)
|
82
|
+
return nil unless attributes.is_a?(Hash)
|
83
|
+
self.class.swagger_types.each_pair do |key, type|
|
84
|
+
if type =~ /\AArray<(.*)>/i
|
85
|
+
# check to ensure the input is an array given that the attribute
|
86
|
+
# is documented as an array but the input is not
|
87
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
88
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
89
|
+
end
|
90
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
91
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
92
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
93
|
+
end
|
94
|
+
|
95
|
+
self
|
96
|
+
end
|
97
|
+
|
98
|
+
# Deserializes the data based on type
|
99
|
+
# @param string type Data type
|
100
|
+
# @param string value Value to be deserialized
|
101
|
+
# @return [Object] Deserialized data
|
102
|
+
def _deserialize(type, value)
|
103
|
+
case type.to_sym
|
104
|
+
when :DateTime
|
105
|
+
DateTime.parse(value)
|
106
|
+
when :Date
|
107
|
+
Date.parse(value)
|
108
|
+
when :String
|
109
|
+
value.to_s
|
110
|
+
when :Integer
|
111
|
+
value.to_i
|
112
|
+
when :Float
|
113
|
+
value.to_f
|
114
|
+
when :BOOLEAN
|
115
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
116
|
+
true
|
117
|
+
else
|
118
|
+
false
|
119
|
+
end
|
120
|
+
when :Object
|
121
|
+
# generic object (usually a Hash), return directly
|
122
|
+
value
|
123
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
124
|
+
inner_type = Regexp.last_match[:inner_type]
|
125
|
+
value.map { |v| _deserialize(inner_type, v) }
|
126
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
127
|
+
k_type = Regexp.last_match[:k_type]
|
128
|
+
v_type = Regexp.last_match[:v_type]
|
129
|
+
{}.tap do |hash|
|
130
|
+
value.each do |k, v|
|
131
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
else # model
|
135
|
+
temp_model = DocuSign_Admin.const_get(type).new
|
136
|
+
temp_model.build_from_hash(value)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
# Returns the string representation of the object
|
141
|
+
# @return [String] String presentation of the object
|
142
|
+
def to_s
|
143
|
+
to_hash.to_s
|
144
|
+
end
|
145
|
+
|
146
|
+
# to_body is an alias to to_hash (backward compatibility)
|
147
|
+
# @return [Hash] Returns the object in the form of hash
|
148
|
+
def to_body
|
149
|
+
to_hash
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns the object in the form of hash
|
153
|
+
# @return [Hash] Returns the object in the form of hash
|
154
|
+
def to_hash
|
155
|
+
hash = {}
|
156
|
+
self.class.attribute_map.each_pair do |attr, param|
|
157
|
+
value = self.send(attr)
|
158
|
+
next if value.nil?
|
159
|
+
hash[param] = _to_hash(value)
|
160
|
+
end
|
161
|
+
hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Outputs non-array value in the form of hash
|
165
|
+
# For object, use to_hash. Otherwise, just return the value
|
166
|
+
# @param [Object] value Any valid value
|
167
|
+
# @return [Hash] Returns the value in the form of hash
|
168
|
+
def _to_hash(value)
|
169
|
+
if value.is_a?(Array)
|
170
|
+
value.compact.map { |v| _to_hash(v) }
|
171
|
+
elsif value.is_a?(Hash)
|
172
|
+
{}.tap do |hash|
|
173
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
174
|
+
end
|
175
|
+
elsif value.respond_to? :to_hash
|
176
|
+
value.to_hash
|
177
|
+
else
|
178
|
+
value
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
end
|
183
|
+
end
|
@@ -0,0 +1,275 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Admin API
|
3
|
+
|
4
|
+
#An API for an organization administrator to manage organizations, accounts and users
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
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_Admin
|
15
|
+
class OrganizationUserResponse
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
attr_accessor :user_name
|
19
|
+
|
20
|
+
attr_accessor :first_name
|
21
|
+
|
22
|
+
attr_accessor :last_name
|
23
|
+
|
24
|
+
attr_accessor :user_status
|
25
|
+
|
26
|
+
attr_accessor :membership_status
|
27
|
+
|
28
|
+
attr_accessor :email
|
29
|
+
|
30
|
+
attr_accessor :created_on
|
31
|
+
|
32
|
+
attr_accessor :membership_created_on
|
33
|
+
|
34
|
+
attr_accessor :ds_groups
|
35
|
+
|
36
|
+
attr_accessor :membership_id
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'id' => :'id',
|
42
|
+
:'user_name' => :'user_name',
|
43
|
+
:'first_name' => :'first_name',
|
44
|
+
:'last_name' => :'last_name',
|
45
|
+
:'user_status' => :'user_status',
|
46
|
+
:'membership_status' => :'membership_status',
|
47
|
+
:'email' => :'email',
|
48
|
+
:'created_on' => :'created_on',
|
49
|
+
:'membership_created_on' => :'membership_created_on',
|
50
|
+
:'ds_groups' => :'ds_groups',
|
51
|
+
:'membership_id' => :'membership_id'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Attribute type mapping.
|
56
|
+
def self.swagger_types
|
57
|
+
{
|
58
|
+
:'id' => :'String',
|
59
|
+
:'user_name' => :'String',
|
60
|
+
:'first_name' => :'String',
|
61
|
+
:'last_name' => :'String',
|
62
|
+
:'user_status' => :'String',
|
63
|
+
:'membership_status' => :'String',
|
64
|
+
:'email' => :'String',
|
65
|
+
:'created_on' => :'DateTime',
|
66
|
+
:'membership_created_on' => :'DateTime',
|
67
|
+
:'ds_groups' => :'Array<DSGroupResponse>',
|
68
|
+
:'membership_id' => :'String'
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
# Initializes the object
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
+
def initialize(attributes = {})
|
75
|
+
return unless attributes.is_a?(Hash)
|
76
|
+
|
77
|
+
# convert string to symbol for hash key
|
78
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
79
|
+
|
80
|
+
if attributes.has_key?(:'id')
|
81
|
+
self.id = attributes[:'id']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.has_key?(:'user_name')
|
85
|
+
self.user_name = attributes[:'user_name']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.has_key?(:'first_name')
|
89
|
+
self.first_name = attributes[:'first_name']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.has_key?(:'last_name')
|
93
|
+
self.last_name = attributes[:'last_name']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.has_key?(:'user_status')
|
97
|
+
self.user_status = attributes[:'user_status']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.has_key?(:'membership_status')
|
101
|
+
self.membership_status = attributes[:'membership_status']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'email')
|
105
|
+
self.email = attributes[:'email']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.has_key?(:'created_on')
|
109
|
+
self.created_on = attributes[:'created_on']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.has_key?(:'membership_created_on')
|
113
|
+
self.membership_created_on = attributes[:'membership_created_on']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.has_key?(:'ds_groups')
|
117
|
+
if (value = attributes[:'ds_groups']).is_a?(Array)
|
118
|
+
self.ds_groups = value
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.has_key?(:'membership_id')
|
123
|
+
self.membership_id = attributes[:'membership_id']
|
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
|
+
id == o.id &&
|
146
|
+
user_name == o.user_name &&
|
147
|
+
first_name == o.first_name &&
|
148
|
+
last_name == o.last_name &&
|
149
|
+
user_status == o.user_status &&
|
150
|
+
membership_status == o.membership_status &&
|
151
|
+
email == o.email &&
|
152
|
+
created_on == o.created_on &&
|
153
|
+
membership_created_on == o.membership_created_on &&
|
154
|
+
ds_groups == o.ds_groups &&
|
155
|
+
membership_id == o.membership_id
|
156
|
+
end
|
157
|
+
|
158
|
+
# @see the `==` method
|
159
|
+
# @param [Object] Object to be compared
|
160
|
+
def eql?(o)
|
161
|
+
self == o
|
162
|
+
end
|
163
|
+
|
164
|
+
# Calculates hash code according to all attributes.
|
165
|
+
# @return [Fixnum] Hash code
|
166
|
+
def hash
|
167
|
+
[id, user_name, first_name, last_name, user_status, membership_status, email, created_on, membership_created_on, ds_groups, membership_id].hash
|
168
|
+
end
|
169
|
+
|
170
|
+
# Builds the object from hash
|
171
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
172
|
+
# @return [Object] Returns the model itself
|
173
|
+
def build_from_hash(attributes)
|
174
|
+
return nil unless attributes.is_a?(Hash)
|
175
|
+
self.class.swagger_types.each_pair do |key, type|
|
176
|
+
if type =~ /\AArray<(.*)>/i
|
177
|
+
# check to ensure the input is an array given that the attribute
|
178
|
+
# is documented as an array but the input is not
|
179
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
180
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
181
|
+
end
|
182
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
183
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
184
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
185
|
+
end
|
186
|
+
|
187
|
+
self
|
188
|
+
end
|
189
|
+
|
190
|
+
# Deserializes the data based on type
|
191
|
+
# @param string type Data type
|
192
|
+
# @param string value Value to be deserialized
|
193
|
+
# @return [Object] Deserialized data
|
194
|
+
def _deserialize(type, value)
|
195
|
+
case type.to_sym
|
196
|
+
when :DateTime
|
197
|
+
DateTime.parse(value)
|
198
|
+
when :Date
|
199
|
+
Date.parse(value)
|
200
|
+
when :String
|
201
|
+
value.to_s
|
202
|
+
when :Integer
|
203
|
+
value.to_i
|
204
|
+
when :Float
|
205
|
+
value.to_f
|
206
|
+
when :BOOLEAN
|
207
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
208
|
+
true
|
209
|
+
else
|
210
|
+
false
|
211
|
+
end
|
212
|
+
when :Object
|
213
|
+
# generic object (usually a Hash), return directly
|
214
|
+
value
|
215
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
216
|
+
inner_type = Regexp.last_match[:inner_type]
|
217
|
+
value.map { |v| _deserialize(inner_type, v) }
|
218
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
219
|
+
k_type = Regexp.last_match[:k_type]
|
220
|
+
v_type = Regexp.last_match[:v_type]
|
221
|
+
{}.tap do |hash|
|
222
|
+
value.each do |k, v|
|
223
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
224
|
+
end
|
225
|
+
end
|
226
|
+
else # model
|
227
|
+
temp_model = DocuSign_Admin.const_get(type).new
|
228
|
+
temp_model.build_from_hash(value)
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
# Returns the string representation of the object
|
233
|
+
# @return [String] String presentation of the object
|
234
|
+
def to_s
|
235
|
+
to_hash.to_s
|
236
|
+
end
|
237
|
+
|
238
|
+
# to_body is an alias to to_hash (backward compatibility)
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
240
|
+
def to_body
|
241
|
+
to_hash
|
242
|
+
end
|
243
|
+
|
244
|
+
# Returns the object in the form of hash
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
246
|
+
def to_hash
|
247
|
+
hash = {}
|
248
|
+
self.class.attribute_map.each_pair do |attr, param|
|
249
|
+
value = self.send(attr)
|
250
|
+
next if value.nil?
|
251
|
+
hash[param] = _to_hash(value)
|
252
|
+
end
|
253
|
+
hash
|
254
|
+
end
|
255
|
+
|
256
|
+
# Outputs non-array value in the form of hash
|
257
|
+
# For object, use to_hash. Otherwise, just return the value
|
258
|
+
# @param [Object] value Any valid value
|
259
|
+
# @return [Hash] Returns the value in the form of hash
|
260
|
+
def _to_hash(value)
|
261
|
+
if value.is_a?(Array)
|
262
|
+
value.compact.map { |v| _to_hash(v) }
|
263
|
+
elsif value.is_a?(Hash)
|
264
|
+
{}.tap do |hash|
|
265
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
266
|
+
end
|
267
|
+
elsif value.respond_to? :to_hash
|
268
|
+
value.to_hash
|
269
|
+
else
|
270
|
+
value
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
end
|
275
|
+
end
|