Class: DocuSign_WebForms::FormInstanceManagementApi
- Inherits:
-
Object
- Object
- DocuSign_WebForms::FormInstanceManagementApi
- Defined in:
- lib/docusign_webforms/api/form_instance_management_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_instance(account_id, form_id, create_instance_body) ⇒ WebFormInstance
Creates an instance of the web form Creates an instance of the web form.
-
#create_instance_with_http_info(account_id, form_id, create_instance_body) ⇒ Array<(WebFormInstance, Fixnum, Hash)>
Creates an instance of the web form Creates an instance of the web form.
-
#get_instance(account_id, form_id, instance_id) ⇒ WebFormInstance
Get form instance Retrieves instance information filter by instance id.
-
#get_instance_with_http_info(account_id, form_id, instance_id) ⇒ Array<(WebFormInstance, Fixnum, Hash)>
Get form instance Retrieves instance information filter by instance id.
-
#initialize(api_client = FormInstanceManagementApi.default) ⇒ FormInstanceManagementApi
constructor
A new instance of FormInstanceManagementApi.
-
#list_instances(account_id, form_id, options = DocuSign_WebForms::ListInstancesOptions.default) ⇒ WebFormInstanceList
List instances List all the instances of a web form in an account.
-
#list_instances_with_http_info(account_id, form_id, options = DocuSign_WebForms::ListInstancesOptions.default) ⇒ Array<(WebFormInstanceList, Fixnum, Hash)>
List instances List all the instances of a web form in an account.
-
#refresh_token(account_id, form_id, instance_id) ⇒ WebFormInstance
Refreshes the instance token Generates new instance token for the existing Web Form Instance.
-
#refresh_token_with_http_info(account_id, form_id, instance_id) ⇒ Array<(WebFormInstance, Fixnum, Hash)>
Refreshes the instance token Generates new instance token for the existing Web Form Instance.
Constructor Details
#initialize(api_client = FormInstanceManagementApi.default) ⇒ FormInstanceManagementApi
Returns a new instance of FormInstanceManagementApi.
29 30 31 |
# File 'lib/docusign_webforms/api/form_instance_management_api.rb', line 29 def initialize(api_client = FormInstanceManagementApi.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
27 28 29 |
# File 'lib/docusign_webforms/api/form_instance_management_api.rb', line 27 def api_client @api_client end |
Instance Method Details
#create_instance(account_id, form_id, create_instance_body) ⇒ WebFormInstance
Creates an instance of the web form Creates an instance of the web form.
39 40 41 42 |
# File 'lib/docusign_webforms/api/form_instance_management_api.rb', line 39 def create_instance(account_id, form_id, create_instance_body) data, _status_code, _headers = create_instance_with_http_info(account_id, form_id, create_instance_body) return data end |
#create_instance_with_http_info(account_id, form_id, create_instance_body) ⇒ Array<(WebFormInstance, Fixnum, Hash)>
Creates an instance of the web form Creates an instance of the web form.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/docusign_webforms/api/form_instance_management_api.rb', line 50 def create_instance_with_http_info(account_id, form_id, create_instance_body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.create_instance ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.create_instance" if account_id.nil? # verify the required parameter 'form_id' is set fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.create_instance" if form_id.nil? # verify the required parameter 'create_instance_body' is set fail ArgumentError, "Missing the required parameter 'create_instance_body' when calling FormInstanceManagementApi.create_instance" if create_instance_body.nil? # resource path local_var_path = "/accounts/{account_id}/forms/{form_id}/instances".sub('{format}','json').sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'form_id' + '}', form_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(create_instance_body) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'WebFormInstance') if @api_client.config.debugging @api_client.config.logger.debug "API called: FormInstanceManagementApi#create_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_instance(account_id, form_id, instance_id) ⇒ WebFormInstance
Get form instance Retrieves instance information filter by instance id
98 99 100 101 |
# File 'lib/docusign_webforms/api/form_instance_management_api.rb', line 98 def get_instance(account_id, form_id, instance_id) data, _status_code, _headers = get_instance_with_http_info(account_id, form_id, instance_id) return data end |
#get_instance_with_http_info(account_id, form_id, instance_id) ⇒ Array<(WebFormInstance, Fixnum, Hash)>
Get form instance Retrieves instance information filter by instance id
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/docusign_webforms/api/form_instance_management_api.rb', line 109 def get_instance_with_http_info(account_id, form_id, instance_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.get_instance ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.get_instance" if account_id.nil? # verify the required parameter 'form_id' is set fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.get_instance" if form_id.nil? # verify the required parameter 'instance_id' is set fail ArgumentError, "Missing the required parameter 'instance_id' when calling FormInstanceManagementApi.get_instance" if instance_id.nil? # resource path local_var_path = "/accounts/{account_id}/forms/{form_id}/instances/{instance_id}".sub('{format}','json').sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'form_id' + '}', form_id.to_s).sub('{' + 'instance_id' + '}', instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'WebFormInstance') if @api_client.config.debugging @api_client.config.logger.debug "API called: FormInstanceManagementApi#get_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_instances(account_id, form_id, options = DocuSign_WebForms::ListInstancesOptions.default) ⇒ WebFormInstanceList
List instances List all the instances of a web form in an account. When filtered by clientUserId, it will return instances having same clientUserId
157 158 159 160 |
# File 'lib/docusign_webforms/api/form_instance_management_api.rb', line 157 def list_instances(account_id, form_id, = DocuSign_WebForms::ListInstancesOptions.default) data, _status_code, _headers = list_instances_with_http_info(account_id, form_id, ) return data end |
#list_instances_with_http_info(account_id, form_id, options = DocuSign_WebForms::ListInstancesOptions.default) ⇒ Array<(WebFormInstanceList, Fixnum, Hash)>
List instances List all the instances of a web form in an account. When filtered by clientUserId, it will return instances having same clientUserId
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/docusign_webforms/api/form_instance_management_api.rb', line 168 def list_instances_with_http_info(account_id, form_id, = DocuSign_WebForms::ListInstancesOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.list_instances ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.list_instances" if account_id.nil? # verify the required parameter 'form_id' is set fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.list_instances" if form_id.nil? if !.client_user_id.nil? && .client_user_id.to_s.length > 100 fail ArgumentError, 'invalid value for "options[:"client_user_id"]" when calling FormInstanceManagementApi.list_instances, the character length must be smaller than or equal to 100.' end # resource path local_var_path = "/accounts/{account_id}/forms/{form_id}/instances".sub('{format}','json').sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'form_id' + '}', form_id.to_s) # query parameters query_params = {} query_params[:'client_user_id'] = .client_user_id if !.client_user_id.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'WebFormInstanceList') if @api_client.config.debugging @api_client.config.logger.debug "API called: FormInstanceManagementApi#list_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#refresh_token(account_id, form_id, instance_id) ⇒ WebFormInstance
Refreshes the instance token Generates new instance token for the existing Web Form Instance.
219 220 221 222 |
# File 'lib/docusign_webforms/api/form_instance_management_api.rb', line 219 def refresh_token(account_id, form_id, instance_id) data, _status_code, _headers = refresh_token_with_http_info(account_id, form_id, instance_id) return data end |
#refresh_token_with_http_info(account_id, form_id, instance_id) ⇒ Array<(WebFormInstance, Fixnum, Hash)>
Refreshes the instance token Generates new instance token for the existing Web Form Instance.
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/docusign_webforms/api/form_instance_management_api.rb', line 230 def refresh_token_with_http_info(account_id, form_id, instance_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.refresh_token ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.refresh_token" if account_id.nil? # verify the required parameter 'form_id' is set fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.refresh_token" if form_id.nil? # verify the required parameter 'instance_id' is set fail ArgumentError, "Missing the required parameter 'instance_id' when calling FormInstanceManagementApi.refresh_token" if instance_id.nil? # resource path local_var_path = "/accounts/{account_id}/forms/{form_id}/instances/{instance_id}/refresh".sub('{format}','json').sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'form_id' + '}', form_id.to_s).sub('{' + 'instance_id' + '}', instance_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'WebFormInstance') if @api_client.config.debugging @api_client.config.logger.debug "API called: FormInstanceManagementApi#refresh_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |