docusign_admin 1.3.0 → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -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 +251 -7
  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 +6 -6
  23. data/lib/docusign_admin/models/asset_group_account_clone_source_account.rb +1 -1
  24. data/lib/docusign_admin/models/asset_group_account_clone_target_account.rb +1 -1
  25. data/lib/docusign_admin/models/asset_group_account_clone_target_account_admin.rb +1 -1
  26. data/lib/docusign_admin/models/asset_group_account_clones.rb +1 -1
  27. data/lib/docusign_admin/models/asset_group_account_response.rb +1 -1
  28. data/lib/docusign_admin/models/asset_group_accounts_response.rb +1 -1
  29. data/lib/docusign_admin/models/certificate_response.rb +1 -1
  30. data/lib/docusign_admin/models/delete_membership_request.rb +1 -1
  31. data/lib/docusign_admin/models/delete_membership_response.rb +1 -1
  32. data/lib/docusign_admin/models/delete_memberships_request.rb +1 -1
  33. data/lib/docusign_admin/models/delete_memberships_response.rb +1 -1
  34. data/lib/docusign_admin/models/delete_response.rb +1 -1
  35. data/lib/docusign_admin/models/delete_user_identity_request.rb +1 -1
  36. data/lib/docusign_admin/models/docu_sign_account_domain_model_address.rb +255 -0
  37. data/lib/docusign_admin/models/domain_response.rb +1 -1
  38. data/lib/docusign_admin/models/domains_response.rb +1 -1
  39. data/lib/docusign_admin/models/ds_group_add_request.rb +1 -1
  40. data/lib/docusign_admin/models/ds_group_and_users_response.rb +1 -1
  41. data/lib/docusign_admin/models/ds_group_list_response.rb +1 -1
  42. data/lib/docusign_admin/models/ds_group_request.rb +1 -1
  43. data/lib/docusign_admin/models/ds_group_response.rb +1 -1
  44. data/lib/docusign_admin/models/ds_group_user_response.rb +1 -1
  45. data/lib/docusign_admin/models/ds_group_users_add_request.rb +1 -1
  46. data/lib/docusign_admin/models/ds_group_users_remove_request.rb +1 -1
  47. data/lib/docusign_admin/models/ds_group_users_response.rb +1 -1
  48. data/lib/docusign_admin/models/error_details.rb +1 -1
  49. data/lib/docusign_admin/models/force_activate_membership_request.rb +1 -1
  50. data/lib/docusign_admin/models/group_request.rb +1 -1
  51. data/lib/docusign_admin/models/identity_provider_response.rb +1 -1
  52. data/lib/docusign_admin/models/identity_providers_response.rb +1 -1
  53. data/lib/docusign_admin/models/individual_membership_data_redaction_request.rb +1 -1
  54. data/lib/docusign_admin/models/individual_user_data_redaction_request.rb +1 -1
  55. data/lib/docusign_admin/models/individual_user_data_redaction_response.rb +1 -1
  56. data/lib/docusign_admin/models/link_response.rb +1 -1
  57. data/lib/docusign_admin/models/member_group_response.rb +1 -1
  58. data/lib/docusign_admin/models/member_groups_response.rb +1 -1
  59. data/lib/docusign_admin/models/membership_data_redaction_request.rb +1 -1
  60. data/lib/docusign_admin/models/membership_data_redaction_response.rb +1 -1
  61. data/lib/docusign_admin/models/membership_response.rb +1 -1
  62. data/lib/docusign_admin/models/new_account_user_request.rb +1 -1
  63. data/lib/docusign_admin/models/new_multi_product_user_add_request.rb +1 -1
  64. data/lib/docusign_admin/models/new_user_request.rb +1 -1
  65. data/lib/docusign_admin/models/new_user_request_account_properties.rb +1 -1
  66. data/lib/docusign_admin/models/new_user_response.rb +1 -1
  67. data/lib/docusign_admin/models/new_user_response_account_properties.rb +1 -1
  68. data/lib/docusign_admin/models/oasirr_error_details.rb +1 -1
  69. data/lib/docusign_admin/models/oasirr_organization_account_settings_error_data_response.rb +1 -1
  70. data/lib/docusign_admin/models/oetr_error_details.rb +1 -1
  71. data/lib/docusign_admin/models/org_export_selected_account.rb +1 -1
  72. data/lib/docusign_admin/models/org_export_selected_domain.rb +1 -1
  73. data/lib/docusign_admin/models/org_report_configuration_response.rb +1 -1
  74. data/lib/docusign_admin/models/org_report_create_response.rb +1 -1
  75. data/lib/docusign_admin/models/org_report_list_response.rb +1 -1
  76. data/lib/docusign_admin/models/org_report_list_response_org_report.rb +1 -1
  77. data/lib/docusign_admin/models/org_report_list_response_requestor.rb +1 -1
  78. data/lib/docusign_admin/models/org_report_request.rb +1 -1
  79. data/lib/docusign_admin/models/organization_account_request.rb +1 -1
  80. data/lib/docusign_admin/models/organization_account_response.rb +1 -1
  81. data/lib/docusign_admin/models/organization_account_settings_import_requestor_response.rb +1 -1
  82. data/lib/docusign_admin/models/organization_account_settings_import_response.rb +1 -1
  83. data/lib/docusign_admin/models/organization_account_settings_import_result_response.rb +1 -1
  84. data/lib/docusign_admin/models/organization_accounts_request.rb +1 -1
  85. data/lib/docusign_admin/models/organization_export_account.rb +1 -1
  86. data/lib/docusign_admin/models/organization_export_domain.rb +1 -1
  87. data/lib/docusign_admin/models/organization_export_request.rb +1 -1
  88. data/lib/docusign_admin/models/organization_export_requestor_response.rb +1 -1
  89. data/lib/docusign_admin/models/organization_export_response.rb +1 -1
  90. data/lib/docusign_admin/models/organization_export_task_response.rb +1 -1
  91. data/lib/docusign_admin/models/organization_exports_response.rb +1 -1
  92. data/lib/docusign_admin/models/organization_import_response.rb +1 -1
  93. data/lib/docusign_admin/models/organization_import_response_error_rollup.rb +1 -1
  94. data/lib/docusign_admin/models/organization_import_response_requestor.rb +1 -1
  95. data/lib/docusign_admin/models/organization_import_response_warning_rollup.rb +1 -1
  96. data/lib/docusign_admin/models/organization_imports_response.rb +1 -1
  97. data/lib/docusign_admin/models/organization_response.rb +1 -1
  98. data/lib/docusign_admin/models/organization_salesforce_account_managers_response.rb +1 -1
  99. data/lib/docusign_admin/models/organization_simple_id_object.rb +1 -1
  100. data/lib/docusign_admin/models/organization_subscription_response.rb +248 -0
  101. data/lib/docusign_admin/models/organization_user_response.rb +1 -1
  102. data/lib/docusign_admin/models/organization_users_response.rb +1 -1
  103. data/lib/docusign_admin/models/organizations_response.rb +1 -1
  104. data/lib/docusign_admin/models/osamr_contact.rb +1 -1
  105. data/lib/docusign_admin/models/paging_response_properties.rb +1 -1
  106. data/lib/docusign_admin/models/permission_profile_request.rb +1 -1
  107. data/lib/docusign_admin/models/permission_profile_response.rb +1 -1
  108. data/lib/docusign_admin/models/permission_profile_response2_1.rb +1 -1
  109. data/lib/docusign_admin/models/permissions_response.rb +1 -1
  110. data/lib/docusign_admin/models/product_permission_profile_request.rb +1 -1
  111. data/lib/docusign_admin/models/product_permission_profile_response.rb +1 -1
  112. data/lib/docusign_admin/models/product_permission_profiles_request.rb +1 -1
  113. data/lib/docusign_admin/models/product_permission_profiles_response.rb +1 -1
  114. data/lib/docusign_admin/models/remove_ds_group_users_response.rb +1 -1
  115. data/lib/docusign_admin/models/remove_user_products_response.rb +1 -1
  116. data/lib/docusign_admin/models/required_attribute_mapping_response.rb +1 -1
  117. data/lib/docusign_admin/models/saml2_identity_provider_response.rb +1 -1
  118. data/lib/docusign_admin/models/setting_response.rb +1 -1
  119. data/lib/docusign_admin/models/sub_account_create_request.rb +192 -0
  120. data/lib/docusign_admin/models/sub_account_create_request_sub_account_creation_subscription.rb +203 -0
  121. data/lib/docusign_admin/models/sub_account_create_request_sub_account_creation_target_account_admin.rb +253 -0
  122. data/lib/docusign_admin/models/sub_account_create_request_sub_account_creation_target_account_details.rb +237 -0
  123. data/lib/docusign_admin/models/sub_account_create_subscription_details.rb +216 -0
  124. data/lib/docusign_admin/models/sub_account_create_subscription_module_details.rb +194 -0
  125. data/lib/docusign_admin/models/sub_account_create_target_account.rb +234 -0
  126. data/lib/docusign_admin/models/sub_account_create_target_account_admin.rb +248 -0
  127. data/lib/docusign_admin/models/sub_account_create_worker.rb +360 -0
  128. data/lib/docusign_admin/models/sub_account_create_worker_response.rb +186 -0
  129. data/lib/docusign_admin/models/sub_account_error_details.rb +204 -0
  130. data/lib/docusign_admin/models/subscription_plan_item_response.rb +210 -0
  131. data/lib/docusign_admin/models/subscription_provision_model_account_create_account_admin.rb +253 -0
  132. data/lib/docusign_admin/models/subscription_provision_model_account_create_create_account_details.rb +271 -0
  133. data/lib/docusign_admin/models/subscription_provision_model_account_create_create_account_subscription_details.rb +203 -0
  134. data/lib/docusign_admin/models/subscription_provision_model_account_create_create_sub_account_details.rb +280 -0
  135. data/lib/docusign_admin/models/subscription_provision_model_asset_group_work.rb +516 -0
  136. data/lib/docusign_admin/models/subscription_provision_model_asset_group_work_result.rb +201 -0
  137. data/lib/docusign_admin/models/subscription_provision_model_change_event.rb +201 -0
  138. data/lib/docusign_admin/models/subscription_provision_model_service_error_details.rb +210 -0
  139. data/lib/docusign_admin/models/update_membership_request.rb +1 -1
  140. data/lib/docusign_admin/models/update_response.rb +1 -1
  141. data/lib/docusign_admin/models/update_user_email_request.rb +1 -1
  142. data/lib/docusign_admin/models/update_user_request.rb +1 -1
  143. data/lib/docusign_admin/models/update_users_email_request.rb +1 -1
  144. data/lib/docusign_admin/models/update_users_request.rb +1 -1
  145. data/lib/docusign_admin/models/user_drilldown_response.rb +1 -1
  146. data/lib/docusign_admin/models/user_identity_request.rb +1 -1
  147. data/lib/docusign_admin/models/user_identity_response.rb +1 -1
  148. data/lib/docusign_admin/models/user_product_permission_profiles_request.rb +1 -1
  149. data/lib/docusign_admin/models/user_product_permission_profiles_response.rb +1 -1
  150. data/lib/docusign_admin/models/user_product_profile_delete_request.rb +1 -1
  151. data/lib/docusign_admin/models/user_update_response.rb +1 -1
  152. data/lib/docusign_admin/models/users_drilldown_response.rb +1 -1
  153. data/lib/docusign_admin/models/users_update_response.rb +1 -1
  154. data/lib/docusign_admin/version.rb +2 -2
  155. data/lib/docusign_admin.rb +24 -2
  156. data/tests/Gemfile +1 -0
  157. metadata +29 -6
@@ -0,0 +1,516 @@
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 SubscriptionProvisionModelAssetGroupWork
16
+ attr_accessor :asset_group_work_id
17
+
18
+ attr_accessor :asset_group_id
19
+
20
+ attr_accessor :asset_group_work_type
21
+
22
+ attr_accessor :status
23
+
24
+ attr_accessor :order_id
25
+
26
+ attr_accessor :target_account_id
27
+
28
+ attr_accessor :source_account_id
29
+
30
+ attr_accessor :source_account_external_id
31
+
32
+ attr_accessor :source_account_name
33
+
34
+ attr_accessor :source_account_site
35
+
36
+ attr_accessor :clone_request_id
37
+
38
+ attr_accessor :clone_account_details
39
+
40
+ attr_accessor :create_sub_account_details
41
+
42
+ attr_accessor :attempts
43
+
44
+ attr_accessor :retry_on
45
+
46
+ attr_accessor :message
47
+
48
+ attr_accessor :created_by_name
49
+
50
+ attr_accessor :created_by_email
51
+
52
+ attr_accessor :error_details
53
+
54
+ attr_accessor :old_asset_group_subscription_id
55
+
56
+ attr_accessor :new_asset_group_subscription_id
57
+
58
+ attr_accessor :source_system
59
+
60
+ attr_accessor :source_id
61
+
62
+ attr_accessor :created_by
63
+
64
+ attr_accessor :created_by_type
65
+
66
+ attr_accessor :created_date
67
+
68
+ attr_accessor :updated_by
69
+
70
+ attr_accessor :updated_by_type
71
+
72
+ attr_accessor :updated_date
73
+
74
+ attr_accessor :update_history
75
+
76
+ class EnumAttributeValidator
77
+ attr_reader :datatype
78
+ attr_reader :allowable_values
79
+
80
+ def initialize(datatype, allowable_values)
81
+ @allowable_values = allowable_values.map do |value|
82
+ case datatype.to_s
83
+ when /Integer/i
84
+ value.to_i
85
+ when /Float/i
86
+ value.to_f
87
+ else
88
+ value
89
+ end
90
+ end
91
+ end
92
+
93
+ def valid?(value)
94
+ !value || allowable_values.include?(value)
95
+ end
96
+ end
97
+
98
+ # Attribute mapping from ruby-style variable name to JSON key.
99
+ def self.attribute_map
100
+ {
101
+ :'asset_group_work_id' => :'AssetGroupWorkId',
102
+ :'asset_group_id' => :'AssetGroupId',
103
+ :'asset_group_work_type' => :'AssetGroupWorkType',
104
+ :'status' => :'Status',
105
+ :'order_id' => :'OrderId',
106
+ :'target_account_id' => :'TargetAccountId',
107
+ :'source_account_id' => :'SourceAccountId',
108
+ :'source_account_external_id' => :'SourceAccountExternalId',
109
+ :'source_account_name' => :'SourceAccountName',
110
+ :'source_account_site' => :'SourceAccountSite',
111
+ :'clone_request_id' => :'CloneRequestId',
112
+ :'clone_account_details' => :'CloneAccountDetails',
113
+ :'create_sub_account_details' => :'CreateSubAccountDetails',
114
+ :'attempts' => :'Attempts',
115
+ :'retry_on' => :'RetryOn',
116
+ :'message' => :'Message',
117
+ :'created_by_name' => :'CreatedByName',
118
+ :'created_by_email' => :'CreatedByEmail',
119
+ :'error_details' => :'ErrorDetails',
120
+ :'old_asset_group_subscription_id' => :'OldAssetGroupSubscriptionId',
121
+ :'new_asset_group_subscription_id' => :'NewAssetGroupSubscriptionId',
122
+ :'source_system' => :'SourceSystem',
123
+ :'source_id' => :'SourceId',
124
+ :'created_by' => :'CreatedBy',
125
+ :'created_by_type' => :'CreatedByType',
126
+ :'created_date' => :'CreatedDate',
127
+ :'updated_by' => :'UpdatedBy',
128
+ :'updated_by_type' => :'UpdatedByType',
129
+ :'updated_date' => :'UpdatedDate',
130
+ :'update_history' => :'UpdateHistory'
131
+ }
132
+ end
133
+
134
+ # Attribute type mapping.
135
+ def self.swagger_types
136
+ {
137
+ :'asset_group_work_id' => :'String',
138
+ :'asset_group_id' => :'String',
139
+ :'asset_group_work_type' => :'String',
140
+ :'status' => :'String',
141
+ :'order_id' => :'String',
142
+ :'target_account_id' => :'String',
143
+ :'source_account_id' => :'String',
144
+ :'source_account_external_id' => :'Integer',
145
+ :'source_account_name' => :'String',
146
+ :'source_account_site' => :'String',
147
+ :'clone_request_id' => :'String',
148
+ :'clone_account_details' => :'SubscriptionProvisionModelAccountCreateCreateAccountDetails',
149
+ :'create_sub_account_details' => :'SubscriptionProvisionModelAccountCreateCreateSubAccountDetails',
150
+ :'attempts' => :'Integer',
151
+ :'retry_on' => :'DateTime',
152
+ :'message' => :'String',
153
+ :'created_by_name' => :'String',
154
+ :'created_by_email' => :'String',
155
+ :'error_details' => :'SubscriptionProvisionModelServiceErrorDetails',
156
+ :'old_asset_group_subscription_id' => :'String',
157
+ :'new_asset_group_subscription_id' => :'String',
158
+ :'source_system' => :'String',
159
+ :'source_id' => :'String',
160
+ :'created_by' => :'String',
161
+ :'created_by_type' => :'String',
162
+ :'created_date' => :'DateTime',
163
+ :'updated_by' => :'String',
164
+ :'updated_by_type' => :'String',
165
+ :'updated_date' => :'DateTime',
166
+ :'update_history' => :'Array<SubscriptionProvisionModelChangeEvent>'
167
+ }
168
+ end
169
+
170
+ # Initializes the object
171
+ # @param [Hash] attributes Model attributes in the form of hash
172
+ def initialize(attributes = {})
173
+ return unless attributes.is_a?(Hash)
174
+
175
+ # convert string to symbol for hash key
176
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
177
+
178
+ if attributes.has_key?(:'AssetGroupWorkId')
179
+ self.asset_group_work_id = attributes[:'AssetGroupWorkId']
180
+ end
181
+
182
+ if attributes.has_key?(:'AssetGroupId')
183
+ self.asset_group_id = attributes[:'AssetGroupId']
184
+ end
185
+
186
+ if attributes.has_key?(:'AssetGroupWorkType')
187
+ self.asset_group_work_type = attributes[:'AssetGroupWorkType']
188
+ end
189
+
190
+ if attributes.has_key?(:'Status')
191
+ self.status = attributes[:'Status']
192
+ end
193
+
194
+ if attributes.has_key?(:'OrderId')
195
+ self.order_id = attributes[:'OrderId']
196
+ end
197
+
198
+ if attributes.has_key?(:'TargetAccountId')
199
+ self.target_account_id = attributes[:'TargetAccountId']
200
+ end
201
+
202
+ if attributes.has_key?(:'SourceAccountId')
203
+ self.source_account_id = attributes[:'SourceAccountId']
204
+ end
205
+
206
+ if attributes.has_key?(:'SourceAccountExternalId')
207
+ self.source_account_external_id = attributes[:'SourceAccountExternalId']
208
+ end
209
+
210
+ if attributes.has_key?(:'SourceAccountName')
211
+ self.source_account_name = attributes[:'SourceAccountName']
212
+ end
213
+
214
+ if attributes.has_key?(:'SourceAccountSite')
215
+ self.source_account_site = attributes[:'SourceAccountSite']
216
+ end
217
+
218
+ if attributes.has_key?(:'CloneRequestId')
219
+ self.clone_request_id = attributes[:'CloneRequestId']
220
+ end
221
+
222
+ if attributes.has_key?(:'CloneAccountDetails')
223
+ self.clone_account_details = attributes[:'CloneAccountDetails']
224
+ end
225
+
226
+ if attributes.has_key?(:'CreateSubAccountDetails')
227
+ self.create_sub_account_details = attributes[:'CreateSubAccountDetails']
228
+ end
229
+
230
+ if attributes.has_key?(:'Attempts')
231
+ self.attempts = attributes[:'Attempts']
232
+ end
233
+
234
+ if attributes.has_key?(:'RetryOn')
235
+ self.retry_on = attributes[:'RetryOn']
236
+ end
237
+
238
+ if attributes.has_key?(:'Message')
239
+ self.message = attributes[:'Message']
240
+ end
241
+
242
+ if attributes.has_key?(:'CreatedByName')
243
+ self.created_by_name = attributes[:'CreatedByName']
244
+ end
245
+
246
+ if attributes.has_key?(:'CreatedByEmail')
247
+ self.created_by_email = attributes[:'CreatedByEmail']
248
+ end
249
+
250
+ if attributes.has_key?(:'ErrorDetails')
251
+ self.error_details = attributes[:'ErrorDetails']
252
+ end
253
+
254
+ if attributes.has_key?(:'OldAssetGroupSubscriptionId')
255
+ self.old_asset_group_subscription_id = attributes[:'OldAssetGroupSubscriptionId']
256
+ end
257
+
258
+ if attributes.has_key?(:'NewAssetGroupSubscriptionId')
259
+ self.new_asset_group_subscription_id = attributes[:'NewAssetGroupSubscriptionId']
260
+ end
261
+
262
+ if attributes.has_key?(:'SourceSystem')
263
+ self.source_system = attributes[:'SourceSystem']
264
+ end
265
+
266
+ if attributes.has_key?(:'SourceId')
267
+ self.source_id = attributes[:'SourceId']
268
+ end
269
+
270
+ if attributes.has_key?(:'CreatedBy')
271
+ self.created_by = attributes[:'CreatedBy']
272
+ end
273
+
274
+ if attributes.has_key?(:'CreatedByType')
275
+ self.created_by_type = attributes[:'CreatedByType']
276
+ end
277
+
278
+ if attributes.has_key?(:'CreatedDate')
279
+ self.created_date = attributes[:'CreatedDate']
280
+ end
281
+
282
+ if attributes.has_key?(:'UpdatedBy')
283
+ self.updated_by = attributes[:'UpdatedBy']
284
+ end
285
+
286
+ if attributes.has_key?(:'UpdatedByType')
287
+ self.updated_by_type = attributes[:'UpdatedByType']
288
+ end
289
+
290
+ if attributes.has_key?(:'UpdatedDate')
291
+ self.updated_date = attributes[:'UpdatedDate']
292
+ end
293
+
294
+ if attributes.has_key?(:'UpdateHistory')
295
+ if (value = attributes[:'UpdateHistory']).is_a?(Array)
296
+ self.update_history = value
297
+ end
298
+ end
299
+ end
300
+
301
+ # Show invalid properties with the reasons. Usually used together with valid?
302
+ # @return Array for valid properties with the reasons
303
+ def list_invalid_properties
304
+ invalid_properties = Array.new
305
+ invalid_properties
306
+ end
307
+
308
+ # Check to see if the all the properties in the model are valid
309
+ # @return true if the model is valid
310
+ def valid?
311
+ asset_group_work_type_validator = EnumAttributeValidator.new('String', ['Undefined', 'GroupAssetFulfillment', 'AccountAssetFulfillment', 'AccountAssetClone', 'AccountAssetCreate', 'SubscriptionSync'])
312
+ return false unless asset_group_work_type_validator.valid?(@asset_group_work_type)
313
+ status_validator = EnumAttributeValidator.new('String', ['Undefined', 'Pending', 'Processing', 'ProcessingOnHold', 'PendingError', 'ProcessingError', 'Completed', 'Canceled', 'PermanentFailure'])
314
+ return false unless status_validator.valid?(@status)
315
+ created_by_type_validator = EnumAttributeValidator.new('String', ['Application', 'User', 'Generic', 'RestAPIAuth', 'Resource', 'Restricted'])
316
+ return false unless created_by_type_validator.valid?(@created_by_type)
317
+ updated_by_type_validator = EnumAttributeValidator.new('String', ['Application', 'User', 'Generic', 'RestAPIAuth', 'Resource', 'Restricted'])
318
+ return false unless updated_by_type_validator.valid?(@updated_by_type)
319
+ true
320
+ end
321
+
322
+ # Custom attribute writer method checking allowed values (enum).
323
+ # @param [Object] asset_group_work_type Object to be assigned
324
+ def asset_group_work_type=(asset_group_work_type)
325
+ validator = EnumAttributeValidator.new('String', ['Undefined', 'GroupAssetFulfillment', 'AccountAssetFulfillment', 'AccountAssetClone', 'AccountAssetCreate', 'SubscriptionSync'])
326
+ unless validator.valid?(asset_group_work_type)
327
+ fail ArgumentError, 'invalid value for "asset_group_work_type", must be one of #{validator.allowable_values}.'
328
+ end
329
+ @asset_group_work_type = asset_group_work_type
330
+ end
331
+
332
+ # Custom attribute writer method checking allowed values (enum).
333
+ # @param [Object] status Object to be assigned
334
+ def status=(status)
335
+ validator = EnumAttributeValidator.new('String', ['Undefined', 'Pending', 'Processing', 'ProcessingOnHold', 'PendingError', 'ProcessingError', 'Completed', 'Canceled', 'PermanentFailure'])
336
+ unless validator.valid?(status)
337
+ fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
338
+ end
339
+ @status = status
340
+ end
341
+
342
+ # Custom attribute writer method checking allowed values (enum).
343
+ # @param [Object] created_by_type Object to be assigned
344
+ def created_by_type=(created_by_type)
345
+ validator = EnumAttributeValidator.new('String', ['Application', 'User', 'Generic', 'RestAPIAuth', 'Resource', 'Restricted'])
346
+ unless validator.valid?(created_by_type)
347
+ fail ArgumentError, 'invalid value for "created_by_type", must be one of #{validator.allowable_values}.'
348
+ end
349
+ @created_by_type = created_by_type
350
+ end
351
+
352
+ # Custom attribute writer method checking allowed values (enum).
353
+ # @param [Object] updated_by_type Object to be assigned
354
+ def updated_by_type=(updated_by_type)
355
+ validator = EnumAttributeValidator.new('String', ['Application', 'User', 'Generic', 'RestAPIAuth', 'Resource', 'Restricted'])
356
+ unless validator.valid?(updated_by_type)
357
+ fail ArgumentError, 'invalid value for "updated_by_type", must be one of #{validator.allowable_values}.'
358
+ end
359
+ @updated_by_type = updated_by_type
360
+ end
361
+
362
+ # Checks equality by comparing each attribute.
363
+ # @param [Object] Object to be compared
364
+ def ==(o)
365
+ return true if self.equal?(o)
366
+ self.class == o.class &&
367
+ asset_group_work_id == o.asset_group_work_id &&
368
+ asset_group_id == o.asset_group_id &&
369
+ asset_group_work_type == o.asset_group_work_type &&
370
+ status == o.status &&
371
+ order_id == o.order_id &&
372
+ target_account_id == o.target_account_id &&
373
+ source_account_id == o.source_account_id &&
374
+ source_account_external_id == o.source_account_external_id &&
375
+ source_account_name == o.source_account_name &&
376
+ source_account_site == o.source_account_site &&
377
+ clone_request_id == o.clone_request_id &&
378
+ clone_account_details == o.clone_account_details &&
379
+ create_sub_account_details == o.create_sub_account_details &&
380
+ attempts == o.attempts &&
381
+ retry_on == o.retry_on &&
382
+ message == o.message &&
383
+ created_by_name == o.created_by_name &&
384
+ created_by_email == o.created_by_email &&
385
+ error_details == o.error_details &&
386
+ old_asset_group_subscription_id == o.old_asset_group_subscription_id &&
387
+ new_asset_group_subscription_id == o.new_asset_group_subscription_id &&
388
+ source_system == o.source_system &&
389
+ source_id == o.source_id &&
390
+ created_by == o.created_by &&
391
+ created_by_type == o.created_by_type &&
392
+ created_date == o.created_date &&
393
+ updated_by == o.updated_by &&
394
+ updated_by_type == o.updated_by_type &&
395
+ updated_date == o.updated_date &&
396
+ update_history == o.update_history
397
+ end
398
+
399
+ # @see the `==` method
400
+ # @param [Object] Object to be compared
401
+ def eql?(o)
402
+ self == o
403
+ end
404
+
405
+ # Calculates hash code according to all attributes.
406
+ # @return [Fixnum] Hash code
407
+ def hash
408
+ [asset_group_work_id, asset_group_id, asset_group_work_type, status, order_id, target_account_id, source_account_id, source_account_external_id, source_account_name, source_account_site, clone_request_id, clone_account_details, create_sub_account_details, attempts, retry_on, message, created_by_name, created_by_email, error_details, old_asset_group_subscription_id, new_asset_group_subscription_id, source_system, source_id, created_by, created_by_type, created_date, updated_by, updated_by_type, updated_date, update_history].hash
409
+ end
410
+
411
+ # Builds the object from hash
412
+ # @param [Hash] attributes Model attributes in the form of hash
413
+ # @return [Object] Returns the model itself
414
+ def build_from_hash(attributes)
415
+ return nil unless attributes.is_a?(Hash)
416
+ self.class.swagger_types.each_pair do |key, type|
417
+ if type =~ /\AArray<(.*)>/i
418
+ # check to ensure the input is an array given that the attribute
419
+ # is documented as an array but the input is not
420
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
421
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
422
+ end
423
+ elsif !attributes[self.class.attribute_map[key]].nil?
424
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
425
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
426
+ end
427
+
428
+ self
429
+ end
430
+
431
+ # Deserializes the data based on type
432
+ # @param string type Data type
433
+ # @param string value Value to be deserialized
434
+ # @return [Object] Deserialized data
435
+ def _deserialize(type, value)
436
+ case type.to_sym
437
+ when :DateTime
438
+ DateTime.parse(value)
439
+ when :Date
440
+ Date.parse(value)
441
+ when :String
442
+ value.to_s
443
+ when :Integer
444
+ value.to_i
445
+ when :Float
446
+ value.to_f
447
+ when :BOOLEAN
448
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
449
+ true
450
+ else
451
+ false
452
+ end
453
+ when :Object
454
+ # generic object (usually a Hash), return directly
455
+ value
456
+ when /\AArray<(?<inner_type>.+)>\z/
457
+ inner_type = Regexp.last_match[:inner_type]
458
+ value.map { |v| _deserialize(inner_type, v) }
459
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
460
+ k_type = Regexp.last_match[:k_type]
461
+ v_type = Regexp.last_match[:v_type]
462
+ {}.tap do |hash|
463
+ value.each do |k, v|
464
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
465
+ end
466
+ end
467
+ else # model
468
+ temp_model = DocuSign_Admin.const_get(type).new
469
+ temp_model.build_from_hash(value)
470
+ end
471
+ end
472
+
473
+ # Returns the string representation of the object
474
+ # @return [String] String presentation of the object
475
+ def to_s
476
+ to_hash.to_s
477
+ end
478
+
479
+ # to_body is an alias to to_hash (backward compatibility)
480
+ # @return [Hash] Returns the object in the form of hash
481
+ def to_body
482
+ to_hash
483
+ end
484
+
485
+ # Returns the object in the form of hash
486
+ # @return [Hash] Returns the object in the form of hash
487
+ def to_hash
488
+ hash = {}
489
+ self.class.attribute_map.each_pair do |attr, param|
490
+ value = self.send(attr)
491
+ next if value.nil?
492
+ hash[param] = _to_hash(value)
493
+ end
494
+ hash
495
+ end
496
+
497
+ # Outputs non-array value in the form of hash
498
+ # For object, use to_hash. Otherwise, just return the value
499
+ # @param [Object] value Any valid value
500
+ # @return [Hash] Returns the value in the form of hash
501
+ def _to_hash(value)
502
+ if value.is_a?(Array)
503
+ value.compact.map { |v| _to_hash(v) }
504
+ elsif value.is_a?(Hash)
505
+ {}.tap do |hash|
506
+ value.each { |k, v| hash[k] = _to_hash(v) }
507
+ end
508
+ elsif value.respond_to? :to_hash
509
+ value.to_hash
510
+ else
511
+ value
512
+ end
513
+ end
514
+
515
+ end
516
+ end