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,360 @@
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 SubAccountCreateWorker
16
+ # The target account being created
17
+ attr_accessor :target_account
18
+
19
+ # The subscription info to create the account
20
+ attr_accessor :subscription_details
21
+
22
+ # The create account work id.
23
+ attr_accessor :asset_group_work_id
24
+
25
+ # The asset group id the accounts belong to.
26
+ attr_accessor :asset_group_id
27
+
28
+ # The type of asset group work.
29
+ attr_accessor :asset_group_work_type
30
+
31
+ # The account creation status.
32
+ attr_accessor :status
33
+
34
+ # The order id created by the creation work.
35
+ attr_accessor :order_id
36
+
37
+ # The number of times the work has been attempted.
38
+ attr_accessor :attempts
39
+
40
+ # The date the account creation work is initiated.
41
+ attr_accessor :created_date
42
+
43
+ # The name of the initiator of the account creation work.
44
+ attr_accessor :created_by_name
45
+
46
+ # The email of the creator of the account creation work.
47
+ attr_accessor :created_by_email
48
+
49
+ # The message associated with the account creation work.
50
+ attr_accessor :message
51
+
52
+ # The processing failures if the work is in PendingError/ProcessingError status.
53
+ attr_accessor :create_account_processing_failure_details
54
+
55
+ class EnumAttributeValidator
56
+ attr_reader :datatype
57
+ attr_reader :allowable_values
58
+
59
+ def initialize(datatype, allowable_values)
60
+ @allowable_values = allowable_values.map do |value|
61
+ case datatype.to_s
62
+ when /Integer/i
63
+ value.to_i
64
+ when /Float/i
65
+ value.to_f
66
+ else
67
+ value
68
+ end
69
+ end
70
+ end
71
+
72
+ def valid?(value)
73
+ !value || allowable_values.include?(value)
74
+ end
75
+ end
76
+
77
+ # Attribute mapping from ruby-style variable name to JSON key.
78
+ def self.attribute_map
79
+ {
80
+ :'target_account' => :'targetAccount',
81
+ :'subscription_details' => :'subscriptionDetails',
82
+ :'asset_group_work_id' => :'assetGroupWorkId',
83
+ :'asset_group_id' => :'assetGroupId',
84
+ :'asset_group_work_type' => :'assetGroupWorkType',
85
+ :'status' => :'status',
86
+ :'order_id' => :'orderId',
87
+ :'attempts' => :'attempts',
88
+ :'created_date' => :'createdDate',
89
+ :'created_by_name' => :'createdByName',
90
+ :'created_by_email' => :'createdByEmail',
91
+ :'message' => :'message',
92
+ :'create_account_processing_failure_details' => :'createAccountProcessingFailureDetails'
93
+ }
94
+ end
95
+
96
+ # Attribute type mapping.
97
+ def self.swagger_types
98
+ {
99
+ :'target_account' => :'SubAccountCreateTargetAccount',
100
+ :'subscription_details' => :'SubAccountCreateSubscriptionDetails',
101
+ :'asset_group_work_id' => :'String',
102
+ :'asset_group_id' => :'String',
103
+ :'asset_group_work_type' => :'String',
104
+ :'status' => :'String',
105
+ :'order_id' => :'String',
106
+ :'attempts' => :'Integer',
107
+ :'created_date' => :'DateTime',
108
+ :'created_by_name' => :'String',
109
+ :'created_by_email' => :'String',
110
+ :'message' => :'String',
111
+ :'create_account_processing_failure_details' => :'SubAccountErrorDetails'
112
+ }
113
+ end
114
+
115
+ # Initializes the object
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ def initialize(attributes = {})
118
+ return unless attributes.is_a?(Hash)
119
+
120
+ # convert string to symbol for hash key
121
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
122
+
123
+ if attributes.has_key?(:'targetAccount')
124
+ self.target_account = attributes[:'targetAccount']
125
+ end
126
+
127
+ if attributes.has_key?(:'subscriptionDetails')
128
+ self.subscription_details = attributes[:'subscriptionDetails']
129
+ end
130
+
131
+ if attributes.has_key?(:'assetGroupWorkId')
132
+ self.asset_group_work_id = attributes[:'assetGroupWorkId']
133
+ end
134
+
135
+ if attributes.has_key?(:'assetGroupId')
136
+ self.asset_group_id = attributes[:'assetGroupId']
137
+ end
138
+
139
+ if attributes.has_key?(:'assetGroupWorkType')
140
+ self.asset_group_work_type = attributes[:'assetGroupWorkType']
141
+ end
142
+
143
+ if attributes.has_key?(:'status')
144
+ self.status = attributes[:'status']
145
+ end
146
+
147
+ if attributes.has_key?(:'orderId')
148
+ self.order_id = attributes[:'orderId']
149
+ end
150
+
151
+ if attributes.has_key?(:'attempts')
152
+ self.attempts = attributes[:'attempts']
153
+ end
154
+
155
+ if attributes.has_key?(:'createdDate')
156
+ self.created_date = attributes[:'createdDate']
157
+ end
158
+
159
+ if attributes.has_key?(:'createdByName')
160
+ self.created_by_name = attributes[:'createdByName']
161
+ end
162
+
163
+ if attributes.has_key?(:'createdByEmail')
164
+ self.created_by_email = attributes[:'createdByEmail']
165
+ end
166
+
167
+ if attributes.has_key?(:'message')
168
+ self.message = attributes[:'message']
169
+ end
170
+
171
+ if attributes.has_key?(:'createAccountProcessingFailureDetails')
172
+ self.create_account_processing_failure_details = attributes[:'createAccountProcessingFailureDetails']
173
+ end
174
+ end
175
+
176
+ # Show invalid properties with the reasons. Usually used together with valid?
177
+ # @return Array for valid properties with the reasons
178
+ def list_invalid_properties
179
+ invalid_properties = Array.new
180
+ if @target_account.nil?
181
+ invalid_properties.push('invalid value for "target_account", target_account cannot be nil.')
182
+ end
183
+
184
+ if @subscription_details.nil?
185
+ invalid_properties.push('invalid value for "subscription_details", subscription_details cannot be nil.')
186
+ end
187
+
188
+ invalid_properties
189
+ end
190
+
191
+ # Check to see if the all the properties in the model are valid
192
+ # @return true if the model is valid
193
+ def valid?
194
+ return false if @target_account.nil?
195
+ return false if @subscription_details.nil?
196
+ asset_group_work_type_validator = EnumAttributeValidator.new('String', ['Undefined', 'GroupAssetFulfillment', 'AccountAssetFulfillment', 'AccountAssetClone', 'AccountAssetCreate', 'SubscriptionSync'])
197
+ return false unless asset_group_work_type_validator.valid?(@asset_group_work_type)
198
+ status_validator = EnumAttributeValidator.new('String', ['Undefined', 'Pending', 'Processing', 'ProcessingOnHold', 'PendingError', 'ProcessingError', 'Completed', 'Canceled', 'PermanentFailure'])
199
+ return false unless status_validator.valid?(@status)
200
+ true
201
+ end
202
+
203
+ # Custom attribute writer method checking allowed values (enum).
204
+ # @param [Object] asset_group_work_type Object to be assigned
205
+ def asset_group_work_type=(asset_group_work_type)
206
+ validator = EnumAttributeValidator.new('String', ['Undefined', 'GroupAssetFulfillment', 'AccountAssetFulfillment', 'AccountAssetClone', 'AccountAssetCreate', 'SubscriptionSync'])
207
+ unless validator.valid?(asset_group_work_type)
208
+ fail ArgumentError, 'invalid value for "asset_group_work_type", must be one of #{validator.allowable_values}.'
209
+ end
210
+ @asset_group_work_type = asset_group_work_type
211
+ end
212
+
213
+ # Custom attribute writer method checking allowed values (enum).
214
+ # @param [Object] status Object to be assigned
215
+ def status=(status)
216
+ validator = EnumAttributeValidator.new('String', ['Undefined', 'Pending', 'Processing', 'ProcessingOnHold', 'PendingError', 'ProcessingError', 'Completed', 'Canceled', 'PermanentFailure'])
217
+ unless validator.valid?(status)
218
+ fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
219
+ end
220
+ @status = status
221
+ end
222
+
223
+ # Checks equality by comparing each attribute.
224
+ # @param [Object] Object to be compared
225
+ def ==(o)
226
+ return true if self.equal?(o)
227
+ self.class == o.class &&
228
+ target_account == o.target_account &&
229
+ subscription_details == o.subscription_details &&
230
+ asset_group_work_id == o.asset_group_work_id &&
231
+ asset_group_id == o.asset_group_id &&
232
+ asset_group_work_type == o.asset_group_work_type &&
233
+ status == o.status &&
234
+ order_id == o.order_id &&
235
+ attempts == o.attempts &&
236
+ created_date == o.created_date &&
237
+ created_by_name == o.created_by_name &&
238
+ created_by_email == o.created_by_email &&
239
+ message == o.message &&
240
+ create_account_processing_failure_details == o.create_account_processing_failure_details
241
+ end
242
+
243
+ # @see the `==` method
244
+ # @param [Object] Object to be compared
245
+ def eql?(o)
246
+ self == o
247
+ end
248
+
249
+ # Calculates hash code according to all attributes.
250
+ # @return [Fixnum] Hash code
251
+ def hash
252
+ [target_account, subscription_details, asset_group_work_id, asset_group_id, asset_group_work_type, status, order_id, attempts, created_date, created_by_name, created_by_email, message, create_account_processing_failure_details].hash
253
+ end
254
+
255
+ # Builds the object from hash
256
+ # @param [Hash] attributes Model attributes in the form of hash
257
+ # @return [Object] Returns the model itself
258
+ def build_from_hash(attributes)
259
+ return nil unless attributes.is_a?(Hash)
260
+ self.class.swagger_types.each_pair do |key, type|
261
+ if type =~ /\AArray<(.*)>/i
262
+ # check to ensure the input is an array given that the attribute
263
+ # is documented as an array but the input is not
264
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
265
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
266
+ end
267
+ elsif !attributes[self.class.attribute_map[key]].nil?
268
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
269
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
270
+ end
271
+
272
+ self
273
+ end
274
+
275
+ # Deserializes the data based on type
276
+ # @param string type Data type
277
+ # @param string value Value to be deserialized
278
+ # @return [Object] Deserialized data
279
+ def _deserialize(type, value)
280
+ case type.to_sym
281
+ when :DateTime
282
+ DateTime.parse(value)
283
+ when :Date
284
+ Date.parse(value)
285
+ when :String
286
+ value.to_s
287
+ when :Integer
288
+ value.to_i
289
+ when :Float
290
+ value.to_f
291
+ when :BOOLEAN
292
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
293
+ true
294
+ else
295
+ false
296
+ end
297
+ when :Object
298
+ # generic object (usually a Hash), return directly
299
+ value
300
+ when /\AArray<(?<inner_type>.+)>\z/
301
+ inner_type = Regexp.last_match[:inner_type]
302
+ value.map { |v| _deserialize(inner_type, v) }
303
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
304
+ k_type = Regexp.last_match[:k_type]
305
+ v_type = Regexp.last_match[:v_type]
306
+ {}.tap do |hash|
307
+ value.each do |k, v|
308
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
309
+ end
310
+ end
311
+ else # model
312
+ temp_model = DocuSign_Admin.const_get(type).new
313
+ temp_model.build_from_hash(value)
314
+ end
315
+ end
316
+
317
+ # Returns the string representation of the object
318
+ # @return [String] String presentation of the object
319
+ def to_s
320
+ to_hash.to_s
321
+ end
322
+
323
+ # to_body is an alias to to_hash (backward compatibility)
324
+ # @return [Hash] Returns the object in the form of hash
325
+ def to_body
326
+ to_hash
327
+ end
328
+
329
+ # Returns the object in the form of hash
330
+ # @return [Hash] Returns the object in the form of hash
331
+ def to_hash
332
+ hash = {}
333
+ self.class.attribute_map.each_pair do |attr, param|
334
+ value = self.send(attr)
335
+ next if value.nil?
336
+ hash[param] = _to_hash(value)
337
+ end
338
+ hash
339
+ end
340
+
341
+ # Outputs non-array value in the form of hash
342
+ # For object, use to_hash. Otherwise, just return the value
343
+ # @param [Object] value Any valid value
344
+ # @return [Hash] Returns the value in the form of hash
345
+ def _to_hash(value)
346
+ if value.is_a?(Array)
347
+ value.compact.map { |v| _to_hash(v) }
348
+ elsif value.is_a?(Hash)
349
+ {}.tap do |hash|
350
+ value.each { |k, v| hash[k] = _to_hash(v) }
351
+ end
352
+ elsif value.respond_to? :to_hash
353
+ value.to_hash
354
+ else
355
+ value
356
+ end
357
+ end
358
+
359
+ end
360
+ 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 SubAccountCreateWorkerResponse
16
+ # The list of create acccount processes
17
+ attr_accessor :asset_group_works
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'asset_group_works' => :'assetGroupWorks'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'asset_group_works' => :'Array<SubAccountCreateWorker>'
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?(:'assetGroupWorks')
42
+ if (value = attributes[:'assetGroupWorks']).is_a?(Array)
43
+ self.asset_group_works = 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_works == o.asset_group_works
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_works].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