docusign_webforms 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +38 -0
  3. data/Gemfile +7 -0
  4. data/README.md +132 -0
  5. data/Rakefile +8 -0
  6. data/docusign_webforms.gemspec +48 -0
  7. data/lib/docusign_webforms/api/form_instance_management_api.rb +272 -0
  8. data/lib/docusign_webforms/api/form_management_api.rb +192 -0
  9. data/lib/docusign_webforms/client/api_client.rb +600 -0
  10. data/lib/docusign_webforms/client/api_error.rb +37 -0
  11. data/lib/docusign_webforms/client/auth/oauth.rb +1061 -0
  12. data/lib/docusign_webforms/configuration.rb +203 -0
  13. data/lib/docusign_webforms/models/account_id.rb +175 -0
  14. data/lib/docusign_webforms/models/assertion_id.rb +175 -0
  15. data/lib/docusign_webforms/models/authentication_instant.rb +175 -0
  16. data/lib/docusign_webforms/models/authentication_method.rb +45 -0
  17. data/lib/docusign_webforms/models/brand_id.rb +175 -0
  18. data/lib/docusign_webforms/models/client_user_id.rb +175 -0
  19. data/lib/docusign_webforms/models/component_key.rb +174 -0
  20. data/lib/docusign_webforms/models/count.rb +175 -0
  21. data/lib/docusign_webforms/models/create_instance_request_body.rb +264 -0
  22. data/lib/docusign_webforms/models/created_date_time.rb +175 -0
  23. data/lib/docusign_webforms/models/date_time.rb +174 -0
  24. data/lib/docusign_webforms/models/envelope_id.rb +175 -0
  25. data/lib/docusign_webforms/models/expiration_date_time.rb +175 -0
  26. data/lib/docusign_webforms/models/expiration_offset.rb +175 -0
  27. data/lib/docusign_webforms/models/form_sort_by.rb +175 -0
  28. data/lib/docusign_webforms/models/form_url.rb +175 -0
  29. data/lib/docusign_webforms/models/guid.rb +174 -0
  30. data/lib/docusign_webforms/models/http_error.rb +195 -0
  31. data/lib/docusign_webforms/models/http_success.rb +184 -0
  32. data/lib/docusign_webforms/models/instance_id.rb +175 -0
  33. data/lib/docusign_webforms/models/instance_source.rb +31 -0
  34. data/lib/docusign_webforms/models/instance_status.rb +31 -0
  35. data/lib/docusign_webforms/models/instance_token.rb +175 -0
  36. data/lib/docusign_webforms/models/is_private_access.rb +175 -0
  37. data/lib/docusign_webforms/models/is_published.rb +175 -0
  38. data/lib/docusign_webforms/models/is_standalone.rb +175 -0
  39. data/lib/docusign_webforms/models/last_modified_date_time.rb +175 -0
  40. data/lib/docusign_webforms/models/return_url.rb +175 -0
  41. data/lib/docusign_webforms/models/search_text.rb +175 -0
  42. data/lib/docusign_webforms/models/security_domain.rb +175 -0
  43. data/lib/docusign_webforms/models/source.rb +31 -0
  44. data/lib/docusign_webforms/models/start_position.rb +175 -0
  45. data/lib/docusign_webforms/models/tags.rb +175 -0
  46. data/lib/docusign_webforms/models/template_properties.rb +217 -0
  47. data/lib/docusign_webforms/models/token_expiration_date_time.rb +175 -0
  48. data/lib/docusign_webforms/models/update_instance_request_body.rb +184 -0
  49. data/lib/docusign_webforms/models/user_filter.rb +30 -0
  50. data/lib/docusign_webforms/models/user_id.rb +175 -0
  51. data/lib/docusign_webforms/models/web_form.rb +268 -0
  52. data/lib/docusign_webforms/models/web_form_adm_type.rb +39 -0
  53. data/lib/docusign_webforms/models/web_form_component.rb +248 -0
  54. data/lib/docusign_webforms/models/web_form_component_type.rb +34 -0
  55. data/lib/docusign_webforms/models/web_form_components_map.rb +175 -0
  56. data/lib/docusign_webforms/models/web_form_content.rb +217 -0
  57. data/lib/docusign_webforms/models/web_form_id.rb +175 -0
  58. data/lib/docusign_webforms/models/web_form_instance.rb +295 -0
  59. data/lib/docusign_webforms/models/web_form_instance_envelopes.rb +183 -0
  60. data/lib/docusign_webforms/models/web_form_instance_list.rb +187 -0
  61. data/lib/docusign_webforms/models/web_form_instance_metadata.rb +237 -0
  62. data/lib/docusign_webforms/models/web_form_metadata.rb +377 -0
  63. data/lib/docusign_webforms/models/web_form_name.rb +175 -0
  64. data/lib/docusign_webforms/models/web_form_properties.rb +193 -0
  65. data/lib/docusign_webforms/models/web_form_published_names.rb +175 -0
  66. data/lib/docusign_webforms/models/web_form_source.rb +29 -0
  67. data/lib/docusign_webforms/models/web_form_state.rb +29 -0
  68. data/lib/docusign_webforms/models/web_form_summary.rb +250 -0
  69. data/lib/docusign_webforms/models/web_form_summary_list.rb +247 -0
  70. data/lib/docusign_webforms/models/web_form_user_info.rb +209 -0
  71. data/lib/docusign_webforms/models/web_form_values.rb +175 -0
  72. data/lib/docusign_webforms/models/web_form_version_id.rb +175 -0
  73. data/lib/docusign_webforms/version.rb +14 -0
  74. data/lib/docusign_webforms.rb +65 -0
  75. data/runLinter.sh +1 -0
  76. data/tests/Gemfile +5 -0
  77. data/tests/spec/unit_tests_using_jwt_spec.rb +38 -0
  78. metadata +382 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 44ad6eb9bab79860fb32cc306964fee0b2cb4e69996b1f9701a8d2d8a0017ea6
4
+ data.tar.gz: c2145c157fff24b3c379cb98cd75c30df54e43a55b14a032d0d9b6e91f81e784
5
+ SHA512:
6
+ metadata.gz: cf3d12c87e3efb97d6e519df41dcfde4abf39050eb9a98499722ea4083ffcebfa39bd7633d73d9c143e5b790a0d30928a7e6ef0699b3476093e6c8ff442e9f15
7
+ data.tar.gz: 93a91c89e7f742b581d592904dc4f1f32020a0f1aa7af34530c4bcbf765231a3c16f101a644911dac3003b81a982da81b9f0185522011da38cedc6af31b9b692
data/CHANGELOG.md ADDED
@@ -0,0 +1,38 @@
1
+ ## [v1.0.0] - WebForms API v1.1.0-1.0.2 - 2024-02-14
2
+ ## Version 1.0.0 (Initial Release)
3
+ - Introducing the SDK based on the OpenAPI specification of DocuSign WebForms APIs.
4
+ - This release marks the initial availability of the SDK, providing developers with the necessary tools to interact with DocuSign WebForms APIs seamlessly.
5
+ ## [v1.0.2.rc12] - WebForms API v1.1.0-1.0.2 - 2024-02-09
6
+ ### Breaking Changes
7
+
8
+ - **`baseUrl` Defaulting to DEMO URL:**
9
+ - The `baseUrl` now defaults to the DEMO URL if not provided. Please update your configurations accordingly.
10
+
11
+ ### Other Changes
12
+
13
+ - Updated the SDK release version
14
+ ## [v1.0.2.rc11] - WebForms API v1.1.0-1.0.2 - 2024-02-08
15
+ ### Changed
16
+ - Added support for version v1.1.0-1.0.2 of the DocuSign WebForms API.
17
+ - Updated the SDK release version.
18
+
19
+ ## [v1.0.1.rc9] - WebForms API v1.1.0-1.0.1 - 2024-02-05
20
+ ### Changed
21
+ - Added support for version v1.1.0-1.0.1 of the DocuSign WebForms API.
22
+ - Updated the SDK release version.
23
+
24
+ ## [v1.0.0.rc05] - WebForms API v1.1.0-1.0.0 - 2023-12-26
25
+ ### Changed
26
+ - Added support for version v1.1.0-1.0.0 of the DocuSign WebForms API.
27
+ - Updated the SDK release version.
28
+
29
+ ## [v1.0.0.rc04] - WebForms API v1.1.0-1.0.0 - 2023-12-18
30
+ ### Changed
31
+ - Added support for version v1.1.0-1.0.0 of the DocuSign WebForms API.
32
+ - Updated the SDK release version.
33
+
34
+ ## [v1.0.0.rc02] - WebForms API 1.1.0-1.0.0 - 2023-12-14
35
+ ### Changed
36
+ - Added support for version 1.1.0-1.0.0 of the DocuSign WebForms API.
37
+ - Updated the SDK release version.
38
+
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.3.3'
7
+ end
data/README.md ADDED
@@ -0,0 +1,132 @@
1
+ # docusign_webforms
2
+
3
+ DocuSign_WebForms - the Ruby gem for the Web Forms API version 1.1
4
+
5
+ The Web Forms API facilitates generating semantic HTML forms around everyday contracts.
6
+
7
+ This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
+
9
+ - API version: 1.1.0
10
+ - Package version: 1.0.0
11
+ - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
+ For more information, please visit [https://developers.docusign.com/](https://developers.docusign.com/)
13
+
14
+ ## Installation
15
+
16
+ ### Build a gem
17
+
18
+ To build the Ruby code into a gem:
19
+
20
+ ```shell
21
+ gem build docusign_webforms.gemspec
22
+ ```
23
+
24
+ Then either install the gem locally:
25
+
26
+ ```shell
27
+ gem install ./docusign_webforms-1.0.0.gem
28
+ ```
29
+ (for development, run `gem install --dev ./docusign_webforms-1.0.0.gem` to install the development dependencies)
30
+
31
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
+
33
+ Finally add this to the Gemfile:
34
+
35
+ gem 'docusign_webforms', '~> 1.0.0'
36
+
37
+ ### Install from Git
38
+
39
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
40
+
41
+ gem 'docusign_webforms', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
42
+
43
+ ### Include the Ruby code directly
44
+
45
+ Include the Ruby code directly using `-I` as follows:
46
+
47
+ ```shell
48
+ ruby -Ilib script.rb
49
+ ```
50
+
51
+ ## Getting Started
52
+
53
+ Please follow the [installation](#installation) procedure and then run the following code:
54
+ ```ruby
55
+ # Load the gem
56
+ require 'docusign_webforms'
57
+
58
+ # Setup authorization
59
+ DocuSign_WebForms.configure do |config|
60
+ # Configure OAuth2 access token for authorization: docusignAccessCode
61
+ config.access_token = 'YOUR ACCESS TOKEN'
62
+ end
63
+
64
+ api_instance = DocuSign_WebForms::FormInstanceManagementApi.new
65
+
66
+ account_id = 'account_id_example' # String | Account identifier in which the web form resides
67
+
68
+ form_id = 'form_id_example' # String | Unique identifier for a web form entity that is consistent for it's lifetime
69
+
70
+ create_instance_body = DocuSign_WebForms::CreateInstanceRequestBody.new # CreateInstanceRequestBody | Request body containing properties that will be used to create instance.
71
+
72
+
73
+ begin
74
+ #Creates an instance of the web form
75
+ result = api_instance.create_instance(account_id, form_id, create_instance_body)
76
+ p result
77
+ rescue DocuSign_WebForms::ApiError => e
78
+ puts "Exception when calling FormInstanceManagementApi->create_instance: #{e}"
79
+ end
80
+
81
+ ```
82
+
83
+ ## Documentation for API Endpoints
84
+
85
+ All URIs are relative to *https://www.docusign.net/webforms/v1.1*
86
+
87
+ Class | Method | HTTP request | Description
88
+ ------------ | ------------- | ------------- | -------------
89
+ *DocuSign_WebForms::FormInstanceManagementApi* | [**create_instance**](docs/FormInstanceManagementApi.md#create_instance) | **POST** /accounts/{account_id}/forms/{form_id}/instances | Creates an instance of the web form
90
+ *DocuSign_WebForms::FormInstanceManagementApi* | [**get_instance**](docs/FormInstanceManagementApi.md#get_instance) | **GET** /accounts/{account_id}/forms/{form_id}/instances/{instance_id} | Get form instance
91
+ *DocuSign_WebForms::FormInstanceManagementApi* | [**list_instances**](docs/FormInstanceManagementApi.md#list_instances) | **GET** /accounts/{account_id}/forms/{form_id}/instances | List instances
92
+ *DocuSign_WebForms::FormInstanceManagementApi* | [**refresh_token**](docs/FormInstanceManagementApi.md#refresh_token) | **POST** /accounts/{account_id}/forms/{form_id}/instances/{instance_id}/refresh | Refreshes the instance token
93
+ *DocuSign_WebForms::FormManagementApi* | [**get_form**](docs/FormManagementApi.md#get_form) | **GET** /accounts/{account_id}/forms/{form_id} | Get Form
94
+ *DocuSign_WebForms::FormManagementApi* | [**list_forms**](docs/FormManagementApi.md#list_forms) | **GET** /accounts/{account_id}/forms | List Forms
95
+
96
+
97
+ ## Documentation for Models
98
+
99
+ - [DocuSign_WebForms::AuthenticationMethod](docs/AuthenticationMethod.md)
100
+ - [DocuSign_WebForms::CreateInstanceRequestBody](docs/CreateInstanceRequestBody.md)
101
+ - [DocuSign_WebForms::HttpError](docs/HttpError.md)
102
+ - [DocuSign_WebForms::HttpSuccess](docs/HttpSuccess.md)
103
+ - [DocuSign_WebForms::InstanceSource](docs/InstanceSource.md)
104
+ - [DocuSign_WebForms::InstanceStatus](docs/InstanceStatus.md)
105
+ - [DocuSign_WebForms::TemplateProperties](docs/TemplateProperties.md)
106
+ - [DocuSign_WebForms::WebForm](docs/WebForm.md)
107
+ - [DocuSign_WebForms::WebFormComponentType](docs/WebFormComponentType.md)
108
+ - [DocuSign_WebForms::WebFormContent](docs/WebFormContent.md)
109
+ - [DocuSign_WebForms::WebFormInstance](docs/WebFormInstance.md)
110
+ - [DocuSign_WebForms::WebFormInstanceEnvelopes](docs/WebFormInstanceEnvelopes.md)
111
+ - [DocuSign_WebForms::WebFormInstanceList](docs/WebFormInstanceList.md)
112
+ - [DocuSign_WebForms::WebFormInstanceMetadata](docs/WebFormInstanceMetadata.md)
113
+ - [DocuSign_WebForms::WebFormMetadata](docs/WebFormMetadata.md)
114
+ - [DocuSign_WebForms::WebFormProperties](docs/WebFormProperties.md)
115
+ - [DocuSign_WebForms::WebFormSource](docs/WebFormSource.md)
116
+ - [DocuSign_WebForms::WebFormState](docs/WebFormState.md)
117
+ - [DocuSign_WebForms::WebFormSummary](docs/WebFormSummary.md)
118
+ - [DocuSign_WebForms::WebFormSummaryList](docs/WebFormSummaryList.md)
119
+ - [DocuSign_WebForms::WebFormUserInfo](docs/WebFormUserInfo.md)
120
+ - [DocuSign_WebForms::WebFormValues](docs/WebFormValues.md)
121
+
122
+
123
+ ## Documentation for Authorization
124
+
125
+
126
+ ### docusignAccessCode
127
+
128
+ - **Type**: OAuth
129
+ - **Flow**: accessCode
130
+ - **Authorization URL**: https://account.docusign.com/oauth/auth
131
+ - **Scopes**: N/A
132
+
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,48 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Web Forms API version 1.1
5
+
6
+ #The Web Forms API facilitates generating semantic HTML forms around everyday contracts.
7
+
8
+ OpenAPI spec version: 1.1.0
9
+ Contact: devcenter@docusign.com
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+
12
+ =end
13
+
14
+ $:.push File.expand_path("../lib", __FILE__)
15
+ require "docusign_webforms/version"
16
+
17
+ Gem::Specification.new do |s|
18
+ s.name = "docusign_webforms"
19
+ s.version = DocuSign_WebForms::VERSION
20
+ s.platform = Gem::Platform::RUBY
21
+ s.authors = ["DocuSign"]
22
+ s.email = ["devcenter@docusign.com"]
23
+ s.homepage = "https://github.com/docusign/docusign-webforms-ruby-client"
24
+ s.summary = "Web Forms API version 1.1 Ruby Gem"
25
+ s.description = "The DocuSign package makes integrating DocuSign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-webforms-ruby-client repository."
26
+ s.license = "MIT"
27
+ s.required_ruby_version = ">= 1.9"
28
+
29
+ s.add_runtime_dependency 'jwt', '~> 2.2', '>= 2.2.1'
30
+ s.add_runtime_dependency 'addressable', '~> 2.7', '>= 2.7.0'
31
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
32
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
33
+
34
+ s.add_development_dependency 'rspec-mocks', '~> 3.8', '>= 3.8.0'
35
+ s.add_development_dependency 'rspec-expectations', '~> 3.8', '>= 3.8.0'
36
+ s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
37
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
38
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
39
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
40
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
41
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
42
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.11'
43
+
44
+ s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
45
+ s.test_files = `find spec/*`.split("\n")
46
+ s.executables = []
47
+ s.require_paths = ["lib"]
48
+ end
@@ -0,0 +1,272 @@
1
+ =begin
2
+ #Web Forms API version 1.1
3
+
4
+ #The Web Forms API facilitates generating semantic HTML forms around everyday contracts.
5
+
6
+ OpenAPI spec version: 1.1.0
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_WebForms
15
+
16
+ class ListInstancesOptions
17
+ # A unique identifier for a user that should originate from client's system. This value can be anything your backend system would use to track individual form instances. Examples include employee IDs, email addresses, surrogate key values, etc.
18
+ attr_accessor :client_user_id
19
+
20
+ def self.default
21
+ @@default ||= ListInstancesOptions.new
22
+ end
23
+ end
24
+
25
+
26
+ class FormInstanceManagementApi
27
+ attr_accessor :api_client
28
+
29
+ def initialize(api_client = FormInstanceManagementApi.default)
30
+ @api_client = api_client
31
+ end
32
+
33
+ # Creates an instance of the web form
34
+ # Creates an instance of the web form.
35
+ # @param account_id Account identifier in which the web form resides
36
+ # @param form_id Unique identifier for a web form entity that is consistent for it's lifetime
37
+ # @param create_instance_body Request body containing properties that will be used to create instance.
38
+ # @return [WebFormInstance]
39
+ def create_instance(account_id, form_id, create_instance_body)
40
+ data, _status_code, _headers = create_instance_with_http_info(account_id, form_id, create_instance_body)
41
+ return data
42
+ end
43
+
44
+ # Creates an instance of the web form
45
+ # Creates an instance of the web form.
46
+ # @param account_id Account identifier in which the web form resides
47
+ # @param form_id Unique identifier for a web form entity that is consistent for it's lifetime
48
+ # @param create_instance_body Request body containing properties that will be used to create instance.
49
+ # @return [Array<(WebFormInstance, Fixnum, Hash)>] WebFormInstance data, response status code and response headers
50
+ def create_instance_with_http_info(account_id, form_id, create_instance_body)
51
+ if @api_client.config.debugging
52
+ @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.create_instance ..."
53
+ end
54
+ # verify the required parameter 'account_id' is set
55
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.create_instance" if account_id.nil?
56
+ # verify the required parameter 'form_id' is set
57
+ fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.create_instance" if form_id.nil?
58
+ # verify the required parameter 'create_instance_body' is set
59
+ fail ArgumentError, "Missing the required parameter 'create_instance_body' when calling FormInstanceManagementApi.create_instance" if create_instance_body.nil?
60
+ # resource path
61
+ 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)
62
+
63
+ # query parameters
64
+ query_params = {}
65
+
66
+ # header parameters
67
+ header_params = {}
68
+ # HTTP header 'Accept' (if needed)
69
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
70
+ # HTTP header 'Content-Type'
71
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
72
+
73
+ # form parameters
74
+ form_params = {}
75
+
76
+ # http body (model)
77
+ post_body = @api_client.object_to_http_body(create_instance_body)
78
+ auth_names = []
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => 'WebFormInstance')
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: FormInstanceManagementApi#create_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # Get form instance
93
+ # Retrieves instance information filter by instance id
94
+ # @param account_id Account identifier in which the web form resides
95
+ # @param form_id Unique identifier for a web form entity that is consistent for it's lifetime
96
+ # @param instance_id Unique identifier for a Web Form Instance that is consistent until its expiration
97
+ # @return [WebFormInstance]
98
+ def get_instance(account_id, form_id, instance_id)
99
+ data, _status_code, _headers = get_instance_with_http_info(account_id, form_id, instance_id)
100
+ return data
101
+ end
102
+
103
+ # Get form instance
104
+ # Retrieves instance information filter by instance id
105
+ # @param account_id Account identifier in which the web form resides
106
+ # @param form_id Unique identifier for a web form entity that is consistent for it's lifetime
107
+ # @param instance_id Unique identifier for a Web Form Instance that is consistent until its expiration
108
+ # @return [Array<(WebFormInstance, Fixnum, Hash)>] WebFormInstance data, response status code and response headers
109
+ def get_instance_with_http_info(account_id, form_id, instance_id)
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.get_instance ..."
112
+ end
113
+ # verify the required parameter 'account_id' is set
114
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.get_instance" if account_id.nil?
115
+ # verify the required parameter 'form_id' is set
116
+ fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.get_instance" if form_id.nil?
117
+ # verify the required parameter 'instance_id' is set
118
+ fail ArgumentError, "Missing the required parameter 'instance_id' when calling FormInstanceManagementApi.get_instance" if instance_id.nil?
119
+ # resource path
120
+ 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)
121
+
122
+ # query parameters
123
+ query_params = {}
124
+
125
+ # header parameters
126
+ header_params = {}
127
+ # HTTP header 'Accept' (if needed)
128
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
129
+ # HTTP header 'Content-Type'
130
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
131
+
132
+ # form parameters
133
+ form_params = {}
134
+
135
+ # http body (model)
136
+ post_body = nil
137
+ auth_names = []
138
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names,
144
+ :return_type => 'WebFormInstance')
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: FormInstanceManagementApi#get_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
147
+ end
148
+ return data, status_code, headers
149
+ end
150
+
151
+ # List instances
152
+ # List all the instances of a web form in an account. When filtered by clientUserId, it will return instances having same clientUserId
153
+ # @param account_id Account identifier in which the web form resides
154
+ # @param form_id Unique identifier for a web form that is consistent for it's lifetime
155
+ # @param DocuSign_WebForms::ListInstancesOptions Options for modifying the behavior of the function.
156
+ # @return [WebFormInstanceList]
157
+ def list_instances(account_id, form_id, options = DocuSign_WebForms::ListInstancesOptions.default)
158
+ data, _status_code, _headers = list_instances_with_http_info(account_id, form_id, options)
159
+ return data
160
+ end
161
+
162
+ # List instances
163
+ # List all the instances of a web form in an account. When filtered by clientUserId, it will return instances having same clientUserId
164
+ # @param account_id Account identifier in which the web form resides
165
+ # @param form_id Unique identifier for a web form that is consistent for it's lifetime
166
+ # @param DocuSign_WebForms::ListInstancesOptions Options for modifying the behavior of the function.
167
+ # @return [Array<(WebFormInstanceList, Fixnum, Hash)>] WebFormInstanceList data, response status code and response headers
168
+ def list_instances_with_http_info(account_id, form_id, options = DocuSign_WebForms::ListInstancesOptions.default)
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.list_instances ..."
171
+ end
172
+ # verify the required parameter 'account_id' is set
173
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.list_instances" if account_id.nil?
174
+ # verify the required parameter 'form_id' is set
175
+ fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.list_instances" if form_id.nil?
176
+ if !options.client_user_id.nil? && options.client_user_id.to_s.length > 100
177
+ 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.'
178
+ end
179
+
180
+ # resource path
181
+ 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)
182
+
183
+ # query parameters
184
+ query_params = {}
185
+ query_params[:'client_user_id'] = options.client_user_id if !options.client_user_id.nil?
186
+
187
+ # header parameters
188
+ header_params = {}
189
+ # HTTP header 'Accept' (if needed)
190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
191
+ # HTTP header 'Content-Type'
192
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
193
+
194
+ # form parameters
195
+ form_params = {}
196
+
197
+ # http body (model)
198
+ post_body = nil
199
+ auth_names = []
200
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
201
+ :header_params => header_params,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body,
205
+ :auth_names => auth_names,
206
+ :return_type => 'WebFormInstanceList')
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: FormInstanceManagementApi#list_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+
213
+ # Refreshes the instance token
214
+ # Generates new instance token for the existing Web Form Instance.
215
+ # @param account_id Account identifier in which the web form resides
216
+ # @param form_id Unique identifier for a web form entity that is consistent for it's lifetime
217
+ # @param instance_id Unique identifier for a Web Form Instance that is consistent until its expiration
218
+ # @return [WebFormInstance]
219
+ def refresh_token(account_id, form_id, instance_id)
220
+ data, _status_code, _headers = refresh_token_with_http_info(account_id, form_id, instance_id)
221
+ return data
222
+ end
223
+
224
+ # Refreshes the instance token
225
+ # Generates new instance token for the existing Web Form Instance.
226
+ # @param account_id Account identifier in which the web form resides
227
+ # @param form_id Unique identifier for a web form entity that is consistent for it's lifetime
228
+ # @param instance_id Unique identifier for a Web Form Instance that is consistent until its expiration
229
+ # @return [Array<(WebFormInstance, Fixnum, Hash)>] WebFormInstance data, response status code and response headers
230
+ def refresh_token_with_http_info(account_id, form_id, instance_id)
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.refresh_token ..."
233
+ end
234
+ # verify the required parameter 'account_id' is set
235
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.refresh_token" if account_id.nil?
236
+ # verify the required parameter 'form_id' is set
237
+ fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.refresh_token" if form_id.nil?
238
+ # verify the required parameter 'instance_id' is set
239
+ fail ArgumentError, "Missing the required parameter 'instance_id' when calling FormInstanceManagementApi.refresh_token" if instance_id.nil?
240
+ # resource path
241
+ 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)
242
+
243
+ # query parameters
244
+ query_params = {}
245
+
246
+ # header parameters
247
+ header_params = {}
248
+ # HTTP header 'Accept' (if needed)
249
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
250
+ # HTTP header 'Content-Type'
251
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
252
+
253
+ # form parameters
254
+ form_params = {}
255
+
256
+ # http body (model)
257
+ post_body = nil
258
+ auth_names = []
259
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
260
+ :header_params => header_params,
261
+ :query_params => query_params,
262
+ :form_params => form_params,
263
+ :body => post_body,
264
+ :auth_names => auth_names,
265
+ :return_type => 'WebFormInstance')
266
+ if @api_client.config.debugging
267
+ @api_client.config.logger.debug "API called: FormInstanceManagementApi#refresh_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
268
+ end
269
+ return data, status_code, headers
270
+ end
271
+ end
272
+ end