docusign_admin 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/docusign_admin/api/provision_asset_group_api.rb +280 -0
- data/lib/docusign_admin/client/api_client.rb +1 -1
- data/lib/docusign_admin/models/asset_group_account_clone.rb +370 -0
- data/lib/docusign_admin/models/asset_group_account_clone_source_account.rb +219 -0
- data/lib/docusign_admin/models/asset_group_account_clone_target_account.rb +234 -0
- data/lib/docusign_admin/models/asset_group_account_clone_target_account_admin.rb +248 -0
- data/lib/docusign_admin/models/asset_group_account_clones.rb +186 -0
- data/lib/docusign_admin/models/asset_group_account_response.rb +254 -0
- data/lib/docusign_admin/models/asset_group_accounts_response.rb +186 -0
- data/lib/docusign_admin/models/clone_error_details.rb +204 -0
- data/lib/docusign_admin/version.rb +1 -1
- data/lib/docusign_admin.rb +9 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a75b7925d145c75c275a2b3996530236c463f19f9bbf8777cc3e78578fc20fb4
|
4
|
+
data.tar.gz: 3b647d6894f3a76be14b224f66beb561ae446ea25f2edbf49aaac7aa9c0cc73c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e96da7b3ab0a4b5fa41e146e103f2a59a87265daa7c15de8af455d1c0624c1609125908a283603a69dd78895e749743ef24d146118e6d4aeef2822deaa42ed0
|
7
|
+
data.tar.gz: 03cf3a396e120a0195c16f369e205dfc3342067b5b4288d706ccbd38b7c6097cbd6fab98f2047049ceb30e20e3442f1e401ba6801a7e44377cfe102350099ef8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## [v1.3.0] - Admin API v2.1-1.3.0 - 2023-08-02
|
2
|
+
### Changed
|
3
|
+
- Added support for version v2.1-1.3.0 of the DocuSign Admin API.
|
4
|
+
- Updated the SDK release version.
|
5
|
+
|
6
|
+
New endpoints:
|
7
|
+
* `GET /v1/organizations/{organizationId}/assetGroups/accounts` Get asset group accounts for an organization.
|
8
|
+
* `POST /v1/organizations/{organizationId}/assetGroups/accountClone` Clone an existing DocuSign account.
|
9
|
+
* `GET /v1/organizations/{organizationId}/assetGroups/accountClones` Gets all asset group account clones for an organization.
|
10
|
+
* `GET /v1/organizations/{organizationId}/assetGroups/{assetGroupId}/accountClones/{assetGroupWorkId}` Gets information about a single cloned account.
|
1
11
|
## [v1.2.0] - Admin API v2.1-1.2.0 - 2023-05-21
|
2
12
|
### Changed
|
3
13
|
- Added support for version v2.1-1.2.0 of the DocuSign Admin API.
|
@@ -0,0 +1,280 @@
|
|
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 "uri"
|
13
|
+
|
14
|
+
module DocuSign_Admin
|
15
|
+
|
16
|
+
class GetAssetGroupAccountCloneOptions
|
17
|
+
# When true, include details for the asset group account clone.
|
18
|
+
attr_accessor :include_details
|
19
|
+
|
20
|
+
def self.default
|
21
|
+
@@default ||= GetAssetGroupAccountCloneOptions.new
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
class GetAssetGroupAccountClonesByOrgIdOptions
|
26
|
+
# When provided and is in the past, only return asset group account clone(s) that is updated after the date.
|
27
|
+
attr_accessor :since_updated_date
|
28
|
+
|
29
|
+
# When true, include details for the asset group account clone(s).
|
30
|
+
attr_accessor :include_details
|
31
|
+
|
32
|
+
def self.default
|
33
|
+
@@default ||= GetAssetGroupAccountClonesByOrgIdOptions.new
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
class GetAssetGroupAccountsOptions
|
38
|
+
# Whether to return accounts that are compliant. When provided, account responses will not include compliant field.
|
39
|
+
attr_accessor :compliant
|
40
|
+
|
41
|
+
def self.default
|
42
|
+
@@default ||= GetAssetGroupAccountsOptions.new
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
class ProvisionAssetGroupApi
|
48
|
+
attr_accessor :api_client
|
49
|
+
|
50
|
+
def initialize(api_client = ProvisionAssetGroupApi.default)
|
51
|
+
@api_client = api_client
|
52
|
+
end
|
53
|
+
|
54
|
+
# Clones an existing DocuSign account to a new DocuSign account.
|
55
|
+
# Currently this only clones eSign settings and asset group information. Required scopes: asset_group_account_clone_write
|
56
|
+
# @param organization_id The Guid representing the organization id.
|
57
|
+
# @param request The request defails for the new asset group account clone.
|
58
|
+
# @return [AssetGroupAccountClone]
|
59
|
+
def clone_asset_group_account(organization_id, request)
|
60
|
+
data, _status_code, _headers = clone_asset_group_account_with_http_info(organization_id, request)
|
61
|
+
return data
|
62
|
+
end
|
63
|
+
|
64
|
+
# Clones an existing DocuSign account to a new DocuSign account.
|
65
|
+
# Currently this only clones eSign settings and asset group information. Required scopes: asset_group_account_clone_write
|
66
|
+
# @param organization_id The Guid representing the organization id.
|
67
|
+
# @param request The request defails for the new asset group account clone.
|
68
|
+
# @return [Array<(AssetGroupAccountClone, Fixnum, Hash)>] AssetGroupAccountClone data, response status code and response headers
|
69
|
+
def clone_asset_group_account_with_http_info(organization_id, request)
|
70
|
+
if @api_client.config.debugging
|
71
|
+
@api_client.config.logger.debug "Calling API: ProvisionAssetGroupApi.clone_asset_group_account ..."
|
72
|
+
end
|
73
|
+
# verify the required parameter 'organization_id' is set
|
74
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProvisionAssetGroupApi.clone_asset_group_account" if organization_id.nil?
|
75
|
+
# verify the required parameter 'request' is set
|
76
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProvisionAssetGroupApi.clone_asset_group_account" if request.nil?
|
77
|
+
# resource path
|
78
|
+
local_var_path = "/v1/organizations/{organizationId}/assetGroups/accountClone".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)
|
79
|
+
|
80
|
+
# query parameters
|
81
|
+
query_params = {}
|
82
|
+
|
83
|
+
# header parameters
|
84
|
+
header_params = {}
|
85
|
+
# HTTP header 'Accept' (if needed)
|
86
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
87
|
+
# HTTP header 'Content-Type'
|
88
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
89
|
+
|
90
|
+
# form parameters
|
91
|
+
form_params = {}
|
92
|
+
|
93
|
+
# http body (model)
|
94
|
+
post_body = @api_client.object_to_http_body(request)
|
95
|
+
auth_names = []
|
96
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
97
|
+
:header_params => header_params,
|
98
|
+
:query_params => query_params,
|
99
|
+
:form_params => form_params,
|
100
|
+
:body => post_body,
|
101
|
+
:auth_names => auth_names,
|
102
|
+
:return_type => 'AssetGroupAccountClone')
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug "API called: ProvisionAssetGroupApi#clone_asset_group_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
105
|
+
end
|
106
|
+
return data, status_code, headers
|
107
|
+
end
|
108
|
+
|
109
|
+
# Gets an asset group account clone by the asset group work id.
|
110
|
+
# Required scopes: asset_group_account_clone_read
|
111
|
+
# @param organization_id The Guid representing the organization id.
|
112
|
+
# @param asset_group_id The Guid representing the asset group id.
|
113
|
+
# @param asset_group_work_id The Guid representing the asset group account clone id
|
114
|
+
# @param DocuSign_Admin::GetAssetGroupAccountCloneOptions Options for modifying the behavior of the function.
|
115
|
+
# @return [AssetGroupAccountClone]
|
116
|
+
def get_asset_group_account_clone(organization_id, asset_group_id, asset_group_work_id, options = DocuSign_Admin::GetAssetGroupAccountCloneOptions.default)
|
117
|
+
data, _status_code, _headers = get_asset_group_account_clone_with_http_info(organization_id, asset_group_id, asset_group_work_id, options)
|
118
|
+
return data
|
119
|
+
end
|
120
|
+
|
121
|
+
# Gets an asset group account clone by the asset group work id.
|
122
|
+
# Required scopes: asset_group_account_clone_read
|
123
|
+
# @param organization_id The Guid representing the organization id.
|
124
|
+
# @param asset_group_id The Guid representing the asset group id.
|
125
|
+
# @param asset_group_work_id The Guid representing the asset group account clone id
|
126
|
+
# @param DocuSign_Admin::GetAssetGroupAccountCloneOptions Options for modifying the behavior of the function.
|
127
|
+
# @return [Array<(AssetGroupAccountClone, Fixnum, Hash)>] AssetGroupAccountClone data, response status code and response headers
|
128
|
+
def get_asset_group_account_clone_with_http_info(organization_id, asset_group_id, asset_group_work_id, options = DocuSign_Admin::GetAssetGroupAccountCloneOptions.default)
|
129
|
+
if @api_client.config.debugging
|
130
|
+
@api_client.config.logger.debug "Calling API: ProvisionAssetGroupApi.get_asset_group_account_clone ..."
|
131
|
+
end
|
132
|
+
# verify the required parameter 'organization_id' is set
|
133
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProvisionAssetGroupApi.get_asset_group_account_clone" if organization_id.nil?
|
134
|
+
# verify the required parameter 'asset_group_id' is set
|
135
|
+
fail ArgumentError, "Missing the required parameter 'asset_group_id' when calling ProvisionAssetGroupApi.get_asset_group_account_clone" if asset_group_id.nil?
|
136
|
+
# verify the required parameter 'asset_group_work_id' is set
|
137
|
+
fail ArgumentError, "Missing the required parameter 'asset_group_work_id' when calling ProvisionAssetGroupApi.get_asset_group_account_clone" if asset_group_work_id.nil?
|
138
|
+
# resource path
|
139
|
+
local_var_path = "/v1/organizations/{organizationId}/assetGroups/{assetGroupId}/accountClones/{assetGroupWorkId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'assetGroupId' + '}', asset_group_id.to_s).sub('{' + 'assetGroupWorkId' + '}', asset_group_work_id.to_s)
|
140
|
+
|
141
|
+
# query parameters
|
142
|
+
query_params = {}
|
143
|
+
query_params[:'include_details'] = options.include_details if !options.include_details.nil?
|
144
|
+
|
145
|
+
# header parameters
|
146
|
+
header_params = {}
|
147
|
+
# HTTP header 'Accept' (if needed)
|
148
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
149
|
+
# HTTP header 'Content-Type'
|
150
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
151
|
+
|
152
|
+
# form parameters
|
153
|
+
form_params = {}
|
154
|
+
|
155
|
+
# http body (model)
|
156
|
+
post_body = nil
|
157
|
+
auth_names = []
|
158
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
159
|
+
:header_params => header_params,
|
160
|
+
:query_params => query_params,
|
161
|
+
:form_params => form_params,
|
162
|
+
:body => post_body,
|
163
|
+
:auth_names => auth_names,
|
164
|
+
:return_type => 'AssetGroupAccountClone')
|
165
|
+
if @api_client.config.debugging
|
166
|
+
@api_client.config.logger.debug "API called: ProvisionAssetGroupApi#get_asset_group_account_clone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
167
|
+
end
|
168
|
+
return data, status_code, headers
|
169
|
+
end
|
170
|
+
|
171
|
+
# Gets all asset group account clone(s) for an organization id.
|
172
|
+
# Required scopes: asset_group_account_clone_read
|
173
|
+
# @param organization_id The Guid representing the organization id.
|
174
|
+
# @param DocuSign_Admin::GetAssetGroupAccountClonesByOrgIdOptions Options for modifying the behavior of the function.
|
175
|
+
# @return [AssetGroupAccountClones]
|
176
|
+
def get_asset_group_account_clones_by_org_id(organization_id, options = DocuSign_Admin::GetAssetGroupAccountClonesByOrgIdOptions.default)
|
177
|
+
data, _status_code, _headers = get_asset_group_account_clones_by_org_id_with_http_info(organization_id, options)
|
178
|
+
return data
|
179
|
+
end
|
180
|
+
|
181
|
+
# Gets all asset group account clone(s) for an organization id.
|
182
|
+
# Required scopes: asset_group_account_clone_read
|
183
|
+
# @param organization_id The Guid representing the organization id.
|
184
|
+
# @param DocuSign_Admin::GetAssetGroupAccountClonesByOrgIdOptions Options for modifying the behavior of the function.
|
185
|
+
# @return [Array<(AssetGroupAccountClones, Fixnum, Hash)>] AssetGroupAccountClones data, response status code and response headers
|
186
|
+
def get_asset_group_account_clones_by_org_id_with_http_info(organization_id, options = DocuSign_Admin::GetAssetGroupAccountClonesByOrgIdOptions.default)
|
187
|
+
if @api_client.config.debugging
|
188
|
+
@api_client.config.logger.debug "Calling API: ProvisionAssetGroupApi.get_asset_group_account_clones_by_org_id ..."
|
189
|
+
end
|
190
|
+
# verify the required parameter 'organization_id' is set
|
191
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProvisionAssetGroupApi.get_asset_group_account_clones_by_org_id" if organization_id.nil?
|
192
|
+
# resource path
|
193
|
+
local_var_path = "/v1/organizations/{organizationId}/assetGroups/accountClones".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)
|
194
|
+
|
195
|
+
# query parameters
|
196
|
+
query_params = {}
|
197
|
+
query_params[:'since_updated_date'] = options.since_updated_date if !options.since_updated_date.nil?
|
198
|
+
query_params[:'include_details'] = options.include_details if !options.include_details.nil?
|
199
|
+
|
200
|
+
# header parameters
|
201
|
+
header_params = {}
|
202
|
+
# HTTP header 'Accept' (if needed)
|
203
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
204
|
+
# HTTP header 'Content-Type'
|
205
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
206
|
+
|
207
|
+
# form parameters
|
208
|
+
form_params = {}
|
209
|
+
|
210
|
+
# http body (model)
|
211
|
+
post_body = nil
|
212
|
+
auth_names = []
|
213
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
214
|
+
:header_params => header_params,
|
215
|
+
:query_params => query_params,
|
216
|
+
:form_params => form_params,
|
217
|
+
:body => post_body,
|
218
|
+
:auth_names => auth_names,
|
219
|
+
:return_type => 'AssetGroupAccountClones')
|
220
|
+
if @api_client.config.debugging
|
221
|
+
@api_client.config.logger.debug "API called: ProvisionAssetGroupApi#get_asset_group_account_clones_by_org_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
222
|
+
end
|
223
|
+
return data, status_code, headers
|
224
|
+
end
|
225
|
+
|
226
|
+
# Get all accounts in asset groups for the organization.
|
227
|
+
# Required scopes: asset_group_account_read
|
228
|
+
# @param organization_id The Guid representing the organization id.
|
229
|
+
# @param DocuSign_Admin::GetAssetGroupAccountsOptions Options for modifying the behavior of the function.
|
230
|
+
# @return [AssetGroupAccountsResponse]
|
231
|
+
def get_asset_group_accounts(organization_id, options = DocuSign_Admin::GetAssetGroupAccountsOptions.default)
|
232
|
+
data, _status_code, _headers = get_asset_group_accounts_with_http_info(organization_id, options)
|
233
|
+
return data
|
234
|
+
end
|
235
|
+
|
236
|
+
# Get all accounts in asset groups for the organization.
|
237
|
+
# Required scopes: asset_group_account_read
|
238
|
+
# @param organization_id The Guid representing the organization id.
|
239
|
+
# @param DocuSign_Admin::GetAssetGroupAccountsOptions Options for modifying the behavior of the function.
|
240
|
+
# @return [Array<(AssetGroupAccountsResponse, Fixnum, Hash)>] AssetGroupAccountsResponse data, response status code and response headers
|
241
|
+
def get_asset_group_accounts_with_http_info(organization_id, options = DocuSign_Admin::GetAssetGroupAccountsOptions.default)
|
242
|
+
if @api_client.config.debugging
|
243
|
+
@api_client.config.logger.debug "Calling API: ProvisionAssetGroupApi.get_asset_group_accounts ..."
|
244
|
+
end
|
245
|
+
# verify the required parameter 'organization_id' is set
|
246
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProvisionAssetGroupApi.get_asset_group_accounts" if organization_id.nil?
|
247
|
+
# resource path
|
248
|
+
local_var_path = "/v1/organizations/{organizationId}/assetGroups/accounts".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)
|
249
|
+
|
250
|
+
# query parameters
|
251
|
+
query_params = {}
|
252
|
+
query_params[:'compliant'] = options.compliant if !options.compliant.nil?
|
253
|
+
|
254
|
+
# header parameters
|
255
|
+
header_params = {}
|
256
|
+
# HTTP header 'Accept' (if needed)
|
257
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
258
|
+
# HTTP header 'Content-Type'
|
259
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
260
|
+
|
261
|
+
# form parameters
|
262
|
+
form_params = {}
|
263
|
+
|
264
|
+
# http body (model)
|
265
|
+
post_body = nil
|
266
|
+
auth_names = []
|
267
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
268
|
+
:header_params => header_params,
|
269
|
+
:query_params => query_params,
|
270
|
+
:form_params => form_params,
|
271
|
+
:body => post_body,
|
272
|
+
:auth_names => auth_names,
|
273
|
+
:return_type => 'AssetGroupAccountsResponse')
|
274
|
+
if @api_client.config.debugging
|
275
|
+
@api_client.config.logger.debug "API called: ProvisionAssetGroupApi#get_asset_group_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
276
|
+
end
|
277
|
+
return data, status_code, headers
|
278
|
+
end
|
279
|
+
end
|
280
|
+
end
|
@@ -35,7 +35,7 @@ module DocuSign_Admin
|
|
35
35
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
36
36
|
def initialize(config = Configuration.default)
|
37
37
|
@config = config
|
38
|
-
@user_agent = "Swagger-Codegen/1.
|
38
|
+
@user_agent = "Swagger-Codegen/1.3.0/ruby"
|
39
39
|
@default_headers = {
|
40
40
|
'Content-Type' => "application/json",
|
41
41
|
'User-Agent' => @user_agent
|
@@ -0,0 +1,370 @@
|
|
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 AssetGroupAccountClone
|
16
|
+
# The source account to be cloned from.
|
17
|
+
attr_accessor :source_account
|
18
|
+
|
19
|
+
# The target account to clone to.
|
20
|
+
attr_accessor :target_account
|
21
|
+
|
22
|
+
# The account clone 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 clone status.
|
32
|
+
attr_accessor :status
|
33
|
+
|
34
|
+
# The account entitlement/setting mirror request id created by the clone work.
|
35
|
+
attr_accessor :clone_request_id
|
36
|
+
|
37
|
+
# The order id created by the clone work.
|
38
|
+
attr_accessor :order_id
|
39
|
+
|
40
|
+
# The number of times the work has been worked on.
|
41
|
+
attr_accessor :attempts
|
42
|
+
|
43
|
+
# The date the account clone work is created.
|
44
|
+
attr_accessor :created_date
|
45
|
+
|
46
|
+
# The name of the creator of the account clone work.
|
47
|
+
attr_accessor :created_by_name
|
48
|
+
|
49
|
+
# The email of the creator of the account clone work.
|
50
|
+
attr_accessor :created_by_email
|
51
|
+
|
52
|
+
# The message associated with the account clone work.
|
53
|
+
attr_accessor :message
|
54
|
+
|
55
|
+
# The processing failures if the work is in PendingError/ProcessingError status.
|
56
|
+
attr_accessor :clone_processing_failure_details
|
57
|
+
|
58
|
+
class EnumAttributeValidator
|
59
|
+
attr_reader :datatype
|
60
|
+
attr_reader :allowable_values
|
61
|
+
|
62
|
+
def initialize(datatype, allowable_values)
|
63
|
+
@allowable_values = allowable_values.map do |value|
|
64
|
+
case datatype.to_s
|
65
|
+
when /Integer/i
|
66
|
+
value.to_i
|
67
|
+
when /Float/i
|
68
|
+
value.to_f
|
69
|
+
else
|
70
|
+
value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def valid?(value)
|
76
|
+
!value || allowable_values.include?(value)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
81
|
+
def self.attribute_map
|
82
|
+
{
|
83
|
+
:'source_account' => :'sourceAccount',
|
84
|
+
:'target_account' => :'targetAccount',
|
85
|
+
:'asset_group_work_id' => :'assetGroupWorkId',
|
86
|
+
:'asset_group_id' => :'assetGroupId',
|
87
|
+
:'asset_group_work_type' => :'assetGroupWorkType',
|
88
|
+
:'status' => :'status',
|
89
|
+
:'clone_request_id' => :'cloneRequestId',
|
90
|
+
:'order_id' => :'orderId',
|
91
|
+
:'attempts' => :'attempts',
|
92
|
+
:'created_date' => :'createdDate',
|
93
|
+
:'created_by_name' => :'createdByName',
|
94
|
+
:'created_by_email' => :'createdByEmail',
|
95
|
+
:'message' => :'message',
|
96
|
+
:'clone_processing_failure_details' => :'cloneProcessingFailureDetails'
|
97
|
+
}
|
98
|
+
end
|
99
|
+
|
100
|
+
# Attribute type mapping.
|
101
|
+
def self.swagger_types
|
102
|
+
{
|
103
|
+
:'source_account' => :'AssetGroupAccountCloneSourceAccount',
|
104
|
+
:'target_account' => :'AssetGroupAccountCloneTargetAccount',
|
105
|
+
:'asset_group_work_id' => :'String',
|
106
|
+
:'asset_group_id' => :'String',
|
107
|
+
:'asset_group_work_type' => :'String',
|
108
|
+
:'status' => :'String',
|
109
|
+
:'clone_request_id' => :'String',
|
110
|
+
:'order_id' => :'String',
|
111
|
+
:'attempts' => :'Integer',
|
112
|
+
:'created_date' => :'DateTime',
|
113
|
+
:'created_by_name' => :'String',
|
114
|
+
:'created_by_email' => :'String',
|
115
|
+
:'message' => :'String',
|
116
|
+
:'clone_processing_failure_details' => :'CloneErrorDetails'
|
117
|
+
}
|
118
|
+
end
|
119
|
+
|
120
|
+
# Initializes the object
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
def initialize(attributes = {})
|
123
|
+
return unless attributes.is_a?(Hash)
|
124
|
+
|
125
|
+
# convert string to symbol for hash key
|
126
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
127
|
+
|
128
|
+
if attributes.has_key?(:'sourceAccount')
|
129
|
+
self.source_account = attributes[:'sourceAccount']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.has_key?(:'targetAccount')
|
133
|
+
self.target_account = attributes[:'targetAccount']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.has_key?(:'assetGroupWorkId')
|
137
|
+
self.asset_group_work_id = attributes[:'assetGroupWorkId']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.has_key?(:'assetGroupId')
|
141
|
+
self.asset_group_id = attributes[:'assetGroupId']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.has_key?(:'assetGroupWorkType')
|
145
|
+
self.asset_group_work_type = attributes[:'assetGroupWorkType']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.has_key?(:'status')
|
149
|
+
self.status = attributes[:'status']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.has_key?(:'cloneRequestId')
|
153
|
+
self.clone_request_id = attributes[:'cloneRequestId']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.has_key?(:'orderId')
|
157
|
+
self.order_id = attributes[:'orderId']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.has_key?(:'attempts')
|
161
|
+
self.attempts = attributes[:'attempts']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.has_key?(:'createdDate')
|
165
|
+
self.created_date = attributes[:'createdDate']
|
166
|
+
end
|
167
|
+
|
168
|
+
if attributes.has_key?(:'createdByName')
|
169
|
+
self.created_by_name = attributes[:'createdByName']
|
170
|
+
end
|
171
|
+
|
172
|
+
if attributes.has_key?(:'createdByEmail')
|
173
|
+
self.created_by_email = attributes[:'createdByEmail']
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.has_key?(:'message')
|
177
|
+
self.message = attributes[:'message']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.has_key?(:'cloneProcessingFailureDetails')
|
181
|
+
self.clone_processing_failure_details = attributes[:'cloneProcessingFailureDetails']
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
186
|
+
# @return Array for valid properties with the reasons
|
187
|
+
def list_invalid_properties
|
188
|
+
invalid_properties = Array.new
|
189
|
+
if @source_account.nil?
|
190
|
+
invalid_properties.push('invalid value for "source_account", source_account cannot be nil.')
|
191
|
+
end
|
192
|
+
|
193
|
+
if @target_account.nil?
|
194
|
+
invalid_properties.push('invalid value for "target_account", target_account cannot be nil.')
|
195
|
+
end
|
196
|
+
|
197
|
+
invalid_properties
|
198
|
+
end
|
199
|
+
|
200
|
+
# Check to see if the all the properties in the model are valid
|
201
|
+
# @return true if the model is valid
|
202
|
+
def valid?
|
203
|
+
return false if @source_account.nil?
|
204
|
+
return false if @target_account.nil?
|
205
|
+
asset_group_work_type_validator = EnumAttributeValidator.new('String', ['Undefined', 'GroupAssetFulfillment', 'AccountAssetFulfillment', 'AccountAssetClone', 'AccountAssetCreate'])
|
206
|
+
return false unless asset_group_work_type_validator.valid?(@asset_group_work_type)
|
207
|
+
status_validator = EnumAttributeValidator.new('String', ['Undefined', 'Pending', 'Processing', 'PendingError', 'ProcessingError', 'Completed', 'Canceled', 'PermanentFailure'])
|
208
|
+
return false unless status_validator.valid?(@status)
|
209
|
+
true
|
210
|
+
end
|
211
|
+
|
212
|
+
# Custom attribute writer method checking allowed values (enum).
|
213
|
+
# @param [Object] asset_group_work_type Object to be assigned
|
214
|
+
def asset_group_work_type=(asset_group_work_type)
|
215
|
+
validator = EnumAttributeValidator.new('String', ['Undefined', 'GroupAssetFulfillment', 'AccountAssetFulfillment', 'AccountAssetClone', 'AccountAssetCreate'])
|
216
|
+
unless validator.valid?(asset_group_work_type)
|
217
|
+
fail ArgumentError, 'invalid value for "asset_group_work_type", must be one of #{validator.allowable_values}.'
|
218
|
+
end
|
219
|
+
@asset_group_work_type = asset_group_work_type
|
220
|
+
end
|
221
|
+
|
222
|
+
# Custom attribute writer method checking allowed values (enum).
|
223
|
+
# @param [Object] status Object to be assigned
|
224
|
+
def status=(status)
|
225
|
+
validator = EnumAttributeValidator.new('String', ['Undefined', 'Pending', 'Processing', 'PendingError', 'ProcessingError', 'Completed', 'Canceled', 'PermanentFailure'])
|
226
|
+
unless validator.valid?(status)
|
227
|
+
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
|
228
|
+
end
|
229
|
+
@status = status
|
230
|
+
end
|
231
|
+
|
232
|
+
# Checks equality by comparing each attribute.
|
233
|
+
# @param [Object] Object to be compared
|
234
|
+
def ==(o)
|
235
|
+
return true if self.equal?(o)
|
236
|
+
self.class == o.class &&
|
237
|
+
source_account == o.source_account &&
|
238
|
+
target_account == o.target_account &&
|
239
|
+
asset_group_work_id == o.asset_group_work_id &&
|
240
|
+
asset_group_id == o.asset_group_id &&
|
241
|
+
asset_group_work_type == o.asset_group_work_type &&
|
242
|
+
status == o.status &&
|
243
|
+
clone_request_id == o.clone_request_id &&
|
244
|
+
order_id == o.order_id &&
|
245
|
+
attempts == o.attempts &&
|
246
|
+
created_date == o.created_date &&
|
247
|
+
created_by_name == o.created_by_name &&
|
248
|
+
created_by_email == o.created_by_email &&
|
249
|
+
message == o.message &&
|
250
|
+
clone_processing_failure_details == o.clone_processing_failure_details
|
251
|
+
end
|
252
|
+
|
253
|
+
# @see the `==` method
|
254
|
+
# @param [Object] Object to be compared
|
255
|
+
def eql?(o)
|
256
|
+
self == o
|
257
|
+
end
|
258
|
+
|
259
|
+
# Calculates hash code according to all attributes.
|
260
|
+
# @return [Fixnum] Hash code
|
261
|
+
def hash
|
262
|
+
[source_account, target_account, asset_group_work_id, asset_group_id, asset_group_work_type, status, clone_request_id, order_id, attempts, created_date, created_by_name, created_by_email, message, clone_processing_failure_details].hash
|
263
|
+
end
|
264
|
+
|
265
|
+
# Builds the object from hash
|
266
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
267
|
+
# @return [Object] Returns the model itself
|
268
|
+
def build_from_hash(attributes)
|
269
|
+
return nil unless attributes.is_a?(Hash)
|
270
|
+
self.class.swagger_types.each_pair do |key, type|
|
271
|
+
if type =~ /\AArray<(.*)>/i
|
272
|
+
# check to ensure the input is an array given that the attribute
|
273
|
+
# is documented as an array but the input is not
|
274
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
275
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
276
|
+
end
|
277
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
278
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
279
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
280
|
+
end
|
281
|
+
|
282
|
+
self
|
283
|
+
end
|
284
|
+
|
285
|
+
# Deserializes the data based on type
|
286
|
+
# @param string type Data type
|
287
|
+
# @param string value Value to be deserialized
|
288
|
+
# @return [Object] Deserialized data
|
289
|
+
def _deserialize(type, value)
|
290
|
+
case type.to_sym
|
291
|
+
when :DateTime
|
292
|
+
DateTime.parse(value)
|
293
|
+
when :Date
|
294
|
+
Date.parse(value)
|
295
|
+
when :String
|
296
|
+
value.to_s
|
297
|
+
when :Integer
|
298
|
+
value.to_i
|
299
|
+
when :Float
|
300
|
+
value.to_f
|
301
|
+
when :BOOLEAN
|
302
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
303
|
+
true
|
304
|
+
else
|
305
|
+
false
|
306
|
+
end
|
307
|
+
when :Object
|
308
|
+
# generic object (usually a Hash), return directly
|
309
|
+
value
|
310
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
311
|
+
inner_type = Regexp.last_match[:inner_type]
|
312
|
+
value.map { |v| _deserialize(inner_type, v) }
|
313
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
314
|
+
k_type = Regexp.last_match[:k_type]
|
315
|
+
v_type = Regexp.last_match[:v_type]
|
316
|
+
{}.tap do |hash|
|
317
|
+
value.each do |k, v|
|
318
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
319
|
+
end
|
320
|
+
end
|
321
|
+
else # model
|
322
|
+
temp_model = DocuSign_Admin.const_get(type).new
|
323
|
+
temp_model.build_from_hash(value)
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
# Returns the string representation of the object
|
328
|
+
# @return [String] String presentation of the object
|
329
|
+
def to_s
|
330
|
+
to_hash.to_s
|
331
|
+
end
|
332
|
+
|
333
|
+
# to_body is an alias to to_hash (backward compatibility)
|
334
|
+
# @return [Hash] Returns the object in the form of hash
|
335
|
+
def to_body
|
336
|
+
to_hash
|
337
|
+
end
|
338
|
+
|
339
|
+
# Returns the object in the form of hash
|
340
|
+
# @return [Hash] Returns the object in the form of hash
|
341
|
+
def to_hash
|
342
|
+
hash = {}
|
343
|
+
self.class.attribute_map.each_pair do |attr, param|
|
344
|
+
value = self.send(attr)
|
345
|
+
next if value.nil?
|
346
|
+
hash[param] = _to_hash(value)
|
347
|
+
end
|
348
|
+
hash
|
349
|
+
end
|
350
|
+
|
351
|
+
# Outputs non-array value in the form of hash
|
352
|
+
# For object, use to_hash. Otherwise, just return the value
|
353
|
+
# @param [Object] value Any valid value
|
354
|
+
# @return [Hash] Returns the value in the form of hash
|
355
|
+
def _to_hash(value)
|
356
|
+
if value.is_a?(Array)
|
357
|
+
value.compact.map { |v| _to_hash(v) }
|
358
|
+
elsif value.is_a?(Hash)
|
359
|
+
{}.tap do |hash|
|
360
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
361
|
+
end
|
362
|
+
elsif value.respond_to? :to_hash
|
363
|
+
value.to_hash
|
364
|
+
else
|
365
|
+
value
|
366
|
+
end
|
367
|
+
end
|
368
|
+
|
369
|
+
end
|
370
|
+
end
|