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