docusign_admin 1.2.0 → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/docusign_admin.gemspec +3 -3
  4. data/lib/docusign_admin/api/accounts_api.rb +1 -1
  5. data/lib/docusign_admin/api/bulk_exports_api.rb +1 -1
  6. data/lib/docusign_admin/api/bulk_imports_api.rb +1 -1
  7. data/lib/docusign_admin/api/ds_groups_api.rb +1 -1
  8. data/lib/docusign_admin/api/identity_providers_api.rb +1 -1
  9. data/lib/docusign_admin/api/organizations_api.rb +1 -1
  10. data/lib/docusign_admin/api/product_permission_profiles_api.rb +1 -1
  11. data/lib/docusign_admin/api/provision_asset_group_api.rb +524 -0
  12. data/lib/docusign_admin/api/reserved_domains_api.rb +1 -1
  13. data/lib/docusign_admin/api/users_api.rb +5 -1
  14. data/lib/docusign_admin/client/api_client.rb +10 -10
  15. data/lib/docusign_admin/client/api_error.rb +1 -1
  16. data/lib/docusign_admin/configuration.rb +1 -1
  17. data/lib/docusign_admin/models/add_ds_group_and_users_response.rb +1 -1
  18. data/lib/docusign_admin/models/add_ds_group_users_response.rb +1 -1
  19. data/lib/docusign_admin/models/add_user_response.rb +1 -1
  20. data/lib/docusign_admin/models/add_user_response_account_properties.rb +1 -1
  21. data/lib/docusign_admin/models/address_information.rb +246 -0
  22. data/lib/docusign_admin/models/asset_group_account_clone.rb +370 -0
  23. data/lib/docusign_admin/models/asset_group_account_clone_source_account.rb +219 -0
  24. data/lib/docusign_admin/models/asset_group_account_clone_target_account.rb +234 -0
  25. data/lib/docusign_admin/models/asset_group_account_clone_target_account_admin.rb +248 -0
  26. data/lib/docusign_admin/models/asset_group_account_clones.rb +186 -0
  27. data/lib/docusign_admin/models/asset_group_account_response.rb +254 -0
  28. data/lib/docusign_admin/models/asset_group_accounts_response.rb +186 -0
  29. data/lib/docusign_admin/models/certificate_response.rb +1 -1
  30. data/lib/docusign_admin/models/clone_error_details.rb +204 -0
  31. data/lib/docusign_admin/models/delete_membership_request.rb +1 -1
  32. data/lib/docusign_admin/models/delete_membership_response.rb +1 -1
  33. data/lib/docusign_admin/models/delete_memberships_request.rb +1 -1
  34. data/lib/docusign_admin/models/delete_memberships_response.rb +1 -1
  35. data/lib/docusign_admin/models/delete_response.rb +1 -1
  36. data/lib/docusign_admin/models/delete_user_identity_request.rb +1 -1
  37. data/lib/docusign_admin/models/docu_sign_account_domain_model_address.rb +255 -0
  38. data/lib/docusign_admin/models/domain_response.rb +1 -1
  39. data/lib/docusign_admin/models/domains_response.rb +1 -1
  40. data/lib/docusign_admin/models/ds_group_add_request.rb +1 -1
  41. data/lib/docusign_admin/models/ds_group_and_users_response.rb +1 -1
  42. data/lib/docusign_admin/models/ds_group_list_response.rb +1 -1
  43. data/lib/docusign_admin/models/ds_group_request.rb +1 -1
  44. data/lib/docusign_admin/models/ds_group_response.rb +1 -1
  45. data/lib/docusign_admin/models/ds_group_user_response.rb +1 -1
  46. data/lib/docusign_admin/models/ds_group_users_add_request.rb +1 -1
  47. data/lib/docusign_admin/models/ds_group_users_remove_request.rb +1 -1
  48. data/lib/docusign_admin/models/ds_group_users_response.rb +1 -1
  49. data/lib/docusign_admin/models/error_details.rb +1 -1
  50. data/lib/docusign_admin/models/force_activate_membership_request.rb +1 -1
  51. data/lib/docusign_admin/models/group_request.rb +1 -1
  52. data/lib/docusign_admin/models/identity_provider_response.rb +1 -1
  53. data/lib/docusign_admin/models/identity_providers_response.rb +1 -1
  54. data/lib/docusign_admin/models/individual_membership_data_redaction_request.rb +1 -1
  55. data/lib/docusign_admin/models/individual_user_data_redaction_request.rb +1 -1
  56. data/lib/docusign_admin/models/individual_user_data_redaction_response.rb +1 -1
  57. data/lib/docusign_admin/models/link_response.rb +1 -1
  58. data/lib/docusign_admin/models/member_group_response.rb +1 -1
  59. data/lib/docusign_admin/models/member_groups_response.rb +1 -1
  60. data/lib/docusign_admin/models/membership_data_redaction_request.rb +1 -1
  61. data/lib/docusign_admin/models/membership_data_redaction_response.rb +1 -1
  62. data/lib/docusign_admin/models/membership_response.rb +1 -1
  63. data/lib/docusign_admin/models/new_account_user_request.rb +1 -1
  64. data/lib/docusign_admin/models/new_multi_product_user_add_request.rb +1 -1
  65. data/lib/docusign_admin/models/new_user_request.rb +1 -1
  66. data/lib/docusign_admin/models/new_user_request_account_properties.rb +1 -1
  67. data/lib/docusign_admin/models/new_user_response.rb +1 -1
  68. data/lib/docusign_admin/models/new_user_response_account_properties.rb +1 -1
  69. data/lib/docusign_admin/models/oasirr_error_details.rb +1 -1
  70. data/lib/docusign_admin/models/oasirr_organization_account_settings_error_data_response.rb +1 -1
  71. data/lib/docusign_admin/models/oetr_error_details.rb +1 -1
  72. data/lib/docusign_admin/models/org_export_selected_account.rb +1 -1
  73. data/lib/docusign_admin/models/org_export_selected_domain.rb +1 -1
  74. data/lib/docusign_admin/models/org_report_configuration_response.rb +1 -1
  75. data/lib/docusign_admin/models/org_report_create_response.rb +1 -1
  76. data/lib/docusign_admin/models/org_report_list_response.rb +1 -1
  77. data/lib/docusign_admin/models/org_report_list_response_org_report.rb +1 -1
  78. data/lib/docusign_admin/models/org_report_list_response_requestor.rb +1 -1
  79. data/lib/docusign_admin/models/org_report_request.rb +1 -1
  80. data/lib/docusign_admin/models/organization_account_request.rb +1 -1
  81. data/lib/docusign_admin/models/organization_account_response.rb +1 -1
  82. data/lib/docusign_admin/models/organization_account_settings_import_requestor_response.rb +1 -1
  83. data/lib/docusign_admin/models/organization_account_settings_import_response.rb +1 -1
  84. data/lib/docusign_admin/models/organization_account_settings_import_result_response.rb +1 -1
  85. data/lib/docusign_admin/models/organization_accounts_request.rb +1 -1
  86. data/lib/docusign_admin/models/organization_export_account.rb +1 -1
  87. data/lib/docusign_admin/models/organization_export_domain.rb +1 -1
  88. data/lib/docusign_admin/models/organization_export_request.rb +1 -1
  89. data/lib/docusign_admin/models/organization_export_requestor_response.rb +1 -1
  90. data/lib/docusign_admin/models/organization_export_response.rb +1 -1
  91. data/lib/docusign_admin/models/organization_export_task_response.rb +1 -1
  92. data/lib/docusign_admin/models/organization_exports_response.rb +1 -1
  93. data/lib/docusign_admin/models/organization_import_response.rb +1 -1
  94. data/lib/docusign_admin/models/organization_import_response_error_rollup.rb +1 -1
  95. data/lib/docusign_admin/models/organization_import_response_requestor.rb +1 -1
  96. data/lib/docusign_admin/models/organization_import_response_warning_rollup.rb +1 -1
  97. data/lib/docusign_admin/models/organization_imports_response.rb +1 -1
  98. data/lib/docusign_admin/models/organization_response.rb +1 -1
  99. data/lib/docusign_admin/models/organization_salesforce_account_managers_response.rb +1 -1
  100. data/lib/docusign_admin/models/organization_simple_id_object.rb +1 -1
  101. data/lib/docusign_admin/models/organization_subscription_response.rb +248 -0
  102. data/lib/docusign_admin/models/organization_user_response.rb +1 -1
  103. data/lib/docusign_admin/models/organization_users_response.rb +1 -1
  104. data/lib/docusign_admin/models/organizations_response.rb +1 -1
  105. data/lib/docusign_admin/models/osamr_contact.rb +1 -1
  106. data/lib/docusign_admin/models/paging_response_properties.rb +1 -1
  107. data/lib/docusign_admin/models/permission_profile_request.rb +1 -1
  108. data/lib/docusign_admin/models/permission_profile_response.rb +1 -1
  109. data/lib/docusign_admin/models/permission_profile_response2_1.rb +1 -1
  110. data/lib/docusign_admin/models/permissions_response.rb +1 -1
  111. data/lib/docusign_admin/models/product_permission_profile_request.rb +1 -1
  112. data/lib/docusign_admin/models/product_permission_profile_response.rb +1 -1
  113. data/lib/docusign_admin/models/product_permission_profiles_request.rb +1 -1
  114. data/lib/docusign_admin/models/product_permission_profiles_response.rb +1 -1
  115. data/lib/docusign_admin/models/remove_ds_group_users_response.rb +1 -1
  116. data/lib/docusign_admin/models/remove_user_products_response.rb +1 -1
  117. data/lib/docusign_admin/models/required_attribute_mapping_response.rb +1 -1
  118. data/lib/docusign_admin/models/saml2_identity_provider_response.rb +1 -1
  119. data/lib/docusign_admin/models/setting_response.rb +1 -1
  120. data/lib/docusign_admin/models/sub_account_create_request.rb +192 -0
  121. data/lib/docusign_admin/models/sub_account_create_request_sub_account_creation_subscription.rb +203 -0
  122. data/lib/docusign_admin/models/sub_account_create_request_sub_account_creation_target_account_admin.rb +253 -0
  123. data/lib/docusign_admin/models/sub_account_create_request_sub_account_creation_target_account_details.rb +237 -0
  124. data/lib/docusign_admin/models/sub_account_create_subscription_details.rb +216 -0
  125. data/lib/docusign_admin/models/sub_account_create_subscription_module_details.rb +194 -0
  126. data/lib/docusign_admin/models/sub_account_create_target_account.rb +234 -0
  127. data/lib/docusign_admin/models/sub_account_create_target_account_admin.rb +248 -0
  128. data/lib/docusign_admin/models/sub_account_create_worker.rb +360 -0
  129. data/lib/docusign_admin/models/sub_account_create_worker_response.rb +186 -0
  130. data/lib/docusign_admin/models/sub_account_error_details.rb +204 -0
  131. data/lib/docusign_admin/models/subscription_plan_item_response.rb +210 -0
  132. data/lib/docusign_admin/models/subscription_provision_model_account_create_account_admin.rb +253 -0
  133. data/lib/docusign_admin/models/subscription_provision_model_account_create_create_account_details.rb +271 -0
  134. data/lib/docusign_admin/models/subscription_provision_model_account_create_create_account_subscription_details.rb +203 -0
  135. data/lib/docusign_admin/models/subscription_provision_model_account_create_create_sub_account_details.rb +280 -0
  136. data/lib/docusign_admin/models/subscription_provision_model_asset_group_work.rb +516 -0
  137. data/lib/docusign_admin/models/subscription_provision_model_asset_group_work_result.rb +201 -0
  138. data/lib/docusign_admin/models/subscription_provision_model_change_event.rb +201 -0
  139. data/lib/docusign_admin/models/subscription_provision_model_service_error_details.rb +210 -0
  140. data/lib/docusign_admin/models/update_membership_request.rb +1 -1
  141. data/lib/docusign_admin/models/update_response.rb +1 -1
  142. data/lib/docusign_admin/models/update_user_email_request.rb +1 -1
  143. data/lib/docusign_admin/models/update_user_request.rb +1 -1
  144. data/lib/docusign_admin/models/update_users_email_request.rb +1 -1
  145. data/lib/docusign_admin/models/update_users_request.rb +1 -1
  146. data/lib/docusign_admin/models/user_drilldown_response.rb +1 -1
  147. data/lib/docusign_admin/models/user_identity_request.rb +1 -1
  148. data/lib/docusign_admin/models/user_identity_response.rb +1 -1
  149. data/lib/docusign_admin/models/user_product_permission_profiles_request.rb +1 -1
  150. data/lib/docusign_admin/models/user_product_permission_profiles_response.rb +1 -1
  151. data/lib/docusign_admin/models/user_product_profile_delete_request.rb +1 -1
  152. data/lib/docusign_admin/models/user_update_response.rb +1 -1
  153. data/lib/docusign_admin/models/users_drilldown_response.rb +1 -1
  154. data/lib/docusign_admin/models/users_update_response.rb +1 -1
  155. data/lib/docusign_admin/version.rb +2 -2
  156. data/lib/docusign_admin.rb +32 -1
  157. data/tests/Gemfile +1 -0
  158. metadata +38 -6
@@ -0,0 +1,254 @@
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.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_Admin
15
+ class AssetGroupAccountResponse
16
+ # The asset group id that the asset group account belongs to.
17
+ attr_accessor :asset_group_id
18
+
19
+ # The name of asset group that the asset group account belongs to.
20
+ attr_accessor :asset_group_name
21
+
22
+ # The account id of the asset group account.
23
+ attr_accessor :account_id
24
+
25
+ # The account name of the asset group account.
26
+ attr_accessor :account_name
27
+
28
+ # The external account id of the asset group account.
29
+ attr_accessor :external_account_id
30
+
31
+ # The compliant status for the account.
32
+ attr_accessor :compliant
33
+
34
+ # The site id of the asset group account.
35
+ attr_accessor :site_id
36
+
37
+ # The site name of the asset group account.
38
+ attr_accessor :site_name
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'asset_group_id' => :'assetGroupId',
44
+ :'asset_group_name' => :'assetGroupName',
45
+ :'account_id' => :'accountId',
46
+ :'account_name' => :'accountName',
47
+ :'external_account_id' => :'externalAccountId',
48
+ :'compliant' => :'compliant',
49
+ :'site_id' => :'siteId',
50
+ :'site_name' => :'siteName'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ {
57
+ :'asset_group_id' => :'String',
58
+ :'asset_group_name' => :'String',
59
+ :'account_id' => :'String',
60
+ :'account_name' => :'String',
61
+ :'external_account_id' => :'Integer',
62
+ :'compliant' => :'BOOLEAN',
63
+ :'site_id' => :'Integer',
64
+ :'site_name' => :'String'
65
+ }
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ return unless attributes.is_a?(Hash)
72
+
73
+ # convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
75
+
76
+ if attributes.has_key?(:'assetGroupId')
77
+ self.asset_group_id = attributes[:'assetGroupId']
78
+ end
79
+
80
+ if attributes.has_key?(:'assetGroupName')
81
+ self.asset_group_name = attributes[:'assetGroupName']
82
+ end
83
+
84
+ if attributes.has_key?(:'accountId')
85
+ self.account_id = attributes[:'accountId']
86
+ end
87
+
88
+ if attributes.has_key?(:'accountName')
89
+ self.account_name = attributes[:'accountName']
90
+ end
91
+
92
+ if attributes.has_key?(:'externalAccountId')
93
+ self.external_account_id = attributes[:'externalAccountId']
94
+ end
95
+
96
+ if attributes.has_key?(:'compliant')
97
+ self.compliant = attributes[:'compliant']
98
+ end
99
+
100
+ if attributes.has_key?(:'siteId')
101
+ self.site_id = attributes[:'siteId']
102
+ end
103
+
104
+ if attributes.has_key?(:'siteName')
105
+ self.site_name = attributes[:'siteName']
106
+ end
107
+ end
108
+
109
+ # Show invalid properties with the reasons. Usually used together with valid?
110
+ # @return Array for valid properties with the reasons
111
+ def list_invalid_properties
112
+ invalid_properties = Array.new
113
+ invalid_properties
114
+ end
115
+
116
+ # Check to see if the all the properties in the model are valid
117
+ # @return true if the model is valid
118
+ def valid?
119
+ true
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] Object to be compared
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ asset_group_id == o.asset_group_id &&
128
+ asset_group_name == o.asset_group_name &&
129
+ account_id == o.account_id &&
130
+ account_name == o.account_name &&
131
+ external_account_id == o.external_account_id &&
132
+ compliant == o.compliant &&
133
+ site_id == o.site_id &&
134
+ site_name == o.site_name
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Fixnum] Hash code
145
+ def hash
146
+ [asset_group_id, asset_group_name, account_id, account_name, external_account_id, compliant, site_id, site_name].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ self.class.swagger_types.each_pair do |key, type|
155
+ if type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :DateTime
176
+ DateTime.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :BOOLEAN
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ temp_model = DocuSign_Admin.const_get(type).new
207
+ temp_model.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ next if value.nil?
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ # Outputs non-array value in the form of hash
236
+ # For object, use to_hash. Otherwise, just return the value
237
+ # @param [Object] value Any valid value
238
+ # @return [Hash] Returns the value in the form of hash
239
+ def _to_hash(value)
240
+ if value.is_a?(Array)
241
+ value.compact.map { |v| _to_hash(v) }
242
+ elsif value.is_a?(Hash)
243
+ {}.tap do |hash|
244
+ value.each { |k, v| hash[k] = _to_hash(v) }
245
+ end
246
+ elsif value.respond_to? :to_hash
247
+ value.to_hash
248
+ else
249
+ value
250
+ end
251
+ end
252
+
253
+ end
254
+ end
@@ -0,0 +1,186 @@
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.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_Admin
15
+ class AssetGroupAccountsResponse
16
+ # The list of asset group accounts.
17
+ attr_accessor :asset_group_accounts
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'asset_group_accounts' => :'assetGroupAccounts'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'asset_group_accounts' => :'Array<AssetGroupAccountResponse>'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'assetGroupAccounts')
42
+ if (value = attributes[:'assetGroupAccounts']).is_a?(Array)
43
+ self.asset_group_accounts = value
44
+ end
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ asset_group_accounts == o.asset_group_accounts
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [asset_group_accounts].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+ self.class.swagger_types.each_pair do |key, type|
87
+ if type =~ /\AArray<(.*)>/i
88
+ # check to ensure the input is an array given that the attribute
89
+ # is documented as an array but the input is not
90
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
91
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
92
+ end
93
+ elsif !attributes[self.class.attribute_map[key]].nil?
94
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
95
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ end
97
+
98
+ self
99
+ end
100
+
101
+ # Deserializes the data based on type
102
+ # @param string type Data type
103
+ # @param string value Value to be deserialized
104
+ # @return [Object] Deserialized data
105
+ def _deserialize(type, value)
106
+ case type.to_sym
107
+ when :DateTime
108
+ DateTime.parse(value)
109
+ when :Date
110
+ Date.parse(value)
111
+ when :String
112
+ value.to_s
113
+ when :Integer
114
+ value.to_i
115
+ when :Float
116
+ value.to_f
117
+ when :BOOLEAN
118
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
119
+ true
120
+ else
121
+ false
122
+ end
123
+ when :Object
124
+ # generic object (usually a Hash), return directly
125
+ value
126
+ when /\AArray<(?<inner_type>.+)>\z/
127
+ inner_type = Regexp.last_match[:inner_type]
128
+ value.map { |v| _deserialize(inner_type, v) }
129
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
130
+ k_type = Regexp.last_match[:k_type]
131
+ v_type = Regexp.last_match[:v_type]
132
+ {}.tap do |hash|
133
+ value.each do |k, v|
134
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
135
+ end
136
+ end
137
+ else # model
138
+ temp_model = DocuSign_Admin.const_get(type).new
139
+ temp_model.build_from_hash(value)
140
+ end
141
+ end
142
+
143
+ # Returns the string representation of the object
144
+ # @return [String] String presentation of the object
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_hash (backward compatibility)
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_body
152
+ to_hash
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ next if value.nil?
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ # Outputs non-array value in the form of hash
168
+ # For object, use to_hash. Otherwise, just return the value
169
+ # @param [Object] value Any valid value
170
+ # @return [Hash] Returns the value in the form of hash
171
+ def _to_hash(value)
172
+ if value.is_a?(Array)
173
+ value.compact.map { |v| _to_hash(v) }
174
+ elsif value.is_a?(Hash)
175
+ {}.tap do |hash|
176
+ value.each { |k, v| hash[k] = _to_hash(v) }
177
+ end
178
+ elsif value.respond_to? :to_hash
179
+ value.to_hash
180
+ else
181
+ value
182
+ end
183
+ end
184
+
185
+ end
186
+ end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #DocuSign Admin API
2
+ #Docusign Admin API
3
3
 
4
4
  #An API for an organization administrator to manage organizations, accounts and users
5
5
 
@@ -0,0 +1,204 @@
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.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_Admin
15
+ class CloneErrorDetails
16
+ # The error code.
17
+ attr_accessor :error
18
+
19
+ # The error description.
20
+ attr_accessor :error_description
21
+
22
+ # Whether the error is caused by the system or user.
23
+ attr_accessor :is_system_error
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'error' => :'error',
29
+ :'error_description' => :'errorDescription',
30
+ :'is_system_error' => :'isSystemError'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'error' => :'String',
38
+ :'error_description' => :'String',
39
+ :'is_system_error' => :'BOOLEAN'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
+
51
+ if attributes.has_key?(:'error')
52
+ self.error = attributes[:'error']
53
+ end
54
+
55
+ if attributes.has_key?(:'errorDescription')
56
+ self.error_description = attributes[:'errorDescription']
57
+ end
58
+
59
+ if attributes.has_key?(:'isSystemError')
60
+ self.is_system_error = attributes[:'isSystemError']
61
+ end
62
+ end
63
+
64
+ # Show invalid properties with the reasons. Usually used together with valid?
65
+ # @return Array for valid properties with the reasons
66
+ def list_invalid_properties
67
+ invalid_properties = Array.new
68
+ invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ error == o.error &&
83
+ error_description == o.error_description &&
84
+ is_system_error == o.is_system_error
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Fixnum] Hash code
95
+ def hash
96
+ [error, error_description, is_system_error].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+ self.class.swagger_types.each_pair do |key, type|
105
+ if type =~ /\AArray<(.*)>/i
106
+ # check to ensure the input is an array given that the attribute
107
+ # is documented as an array but the input is not
108
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
109
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
110
+ end
111
+ elsif !attributes[self.class.attribute_map[key]].nil?
112
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
113
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
114
+ end
115
+
116
+ self
117
+ end
118
+
119
+ # Deserializes the data based on type
120
+ # @param string type Data type
121
+ # @param string value Value to be deserialized
122
+ # @return [Object] Deserialized data
123
+ def _deserialize(type, value)
124
+ case type.to_sym
125
+ when :DateTime
126
+ DateTime.parse(value)
127
+ when :Date
128
+ Date.parse(value)
129
+ when :String
130
+ value.to_s
131
+ when :Integer
132
+ value.to_i
133
+ when :Float
134
+ value.to_f
135
+ when :BOOLEAN
136
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
137
+ true
138
+ else
139
+ false
140
+ end
141
+ when :Object
142
+ # generic object (usually a Hash), return directly
143
+ value
144
+ when /\AArray<(?<inner_type>.+)>\z/
145
+ inner_type = Regexp.last_match[:inner_type]
146
+ value.map { |v| _deserialize(inner_type, v) }
147
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
148
+ k_type = Regexp.last_match[:k_type]
149
+ v_type = Regexp.last_match[:v_type]
150
+ {}.tap do |hash|
151
+ value.each do |k, v|
152
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
153
+ end
154
+ end
155
+ else # model
156
+ temp_model = DocuSign_Admin.const_get(type).new
157
+ temp_model.build_from_hash(value)
158
+ end
159
+ end
160
+
161
+ # Returns the string representation of the object
162
+ # @return [String] String presentation of the object
163
+ def to_s
164
+ to_hash.to_s
165
+ end
166
+
167
+ # to_body is an alias to to_hash (backward compatibility)
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_body
170
+ to_hash
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ next if value.nil?
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ # Outputs non-array value in the form of hash
186
+ # For object, use to_hash. Otherwise, just return the value
187
+ # @param [Object] value Any valid value
188
+ # @return [Hash] Returns the value in the form of hash
189
+ def _to_hash(value)
190
+ if value.is_a?(Array)
191
+ value.compact.map { |v| _to_hash(v) }
192
+ elsif value.is_a?(Hash)
193
+ {}.tap do |hash|
194
+ value.each { |k, v| hash[k] = _to_hash(v) }
195
+ end
196
+ elsif value.respond_to? :to_hash
197
+ value.to_hash
198
+ else
199
+ value
200
+ end
201
+ end
202
+
203
+ end
204
+ end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #DocuSign Admin API
2
+ #Docusign Admin API
3
3
 
4
4
  #An API for an organization administrator to manage organizations, accounts and users
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #DocuSign Admin API
2
+ #Docusign Admin API
3
3
 
4
4
  #An API for an organization administrator to manage organizations, accounts and users
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #DocuSign Admin API
2
+ #Docusign Admin API
3
3
 
4
4
  #An API for an organization administrator to manage organizations, accounts and users
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #DocuSign Admin API
2
+ #Docusign Admin API
3
3
 
4
4
  #An API for an organization administrator to manage organizations, accounts and users
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #DocuSign Admin API
2
+ #Docusign Admin API
3
3
 
4
4
  #An API for an organization administrator to manage organizations, accounts and users
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #DocuSign Admin API
2
+ #Docusign Admin API
3
3
 
4
4
  #An API for an organization administrator to manage organizations, accounts and users
5
5