docusign_click 1.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile +7 -0
  4. data/Gemfile.lock +69 -0
  5. data/LICENSE +21 -0
  6. data/README.md +80 -0
  7. data/Rakefile +8 -0
  8. data/docusign_click-1.0.0.pre.alpha.gem +0 -0
  9. data/docusign_click-1.0.0.rc1.gem +0 -0
  10. data/docusign_click.gemspec +45 -0
  11. data/git_push.sh +55 -0
  12. data/lib/.DS_Store +0 -0
  13. data/lib/docusign_click.rb +62 -0
  14. data/lib/docusign_click/.DS_Store +0 -0
  15. data/lib/docusign_click/api/.DS_Store +0 -0
  16. data/lib/docusign_click/api/accounts_api.rb +1377 -0
  17. data/lib/docusign_click/client/.DS_Store +0 -0
  18. data/lib/docusign_click/client/api_client.rb +590 -0
  19. data/lib/docusign_click/client/api_error.rb +37 -0
  20. data/lib/docusign_click/client/auth/oauth.rb +1061 -0
  21. data/lib/docusign_click/configuration.rb +202 -0
  22. data/lib/docusign_click/models/clickwrap_agreements_response.rb +226 -0
  23. data/lib/docusign_click/models/clickwrap_delete_response.rb +224 -0
  24. data/lib/docusign_click/models/clickwrap_request.rb +294 -0
  25. data/lib/docusign_click/models/clickwrap_scheduled_reacceptance.rb +204 -0
  26. data/lib/docusign_click/models/clickwrap_transfer_request.rb +194 -0
  27. data/lib/docusign_click/models/clickwrap_version.rb +283 -0
  28. data/lib/docusign_click/models/clickwrap_version_delete_response.rb +303 -0
  29. data/lib/docusign_click/models/clickwrap_version_response.rb +334 -0
  30. data/lib/docusign_click/models/clickwrap_version_summary_response.rb +313 -0
  31. data/lib/docusign_click/models/clickwrap_versions_delete_response.rb +206 -0
  32. data/lib/docusign_click/models/clickwrap_versions_paged_response.rb +246 -0
  33. data/lib/docusign_click/models/clickwrap_versions_response.rb +216 -0
  34. data/lib/docusign_click/models/clickwraps_delete_response.rb +186 -0
  35. data/lib/docusign_click/models/conversion_document.rb +204 -0
  36. data/lib/docusign_click/models/display_settings.rb +356 -0
  37. data/lib/docusign_click/models/document.rb +224 -0
  38. data/lib/docusign_click/models/document_conversion_request.rb +186 -0
  39. data/lib/docusign_click/models/document_conversion_response.rb +186 -0
  40. data/lib/docusign_click/models/error_details.rb +194 -0
  41. data/lib/docusign_click/models/html_result.rb +194 -0
  42. data/lib/docusign_click/models/recipient_copy_request.rb +184 -0
  43. data/lib/docusign_click/models/service_information.rb +238 -0
  44. data/lib/docusign_click/models/service_version.rb +194 -0
  45. data/lib/docusign_click/models/update_agreement_request.rb +194 -0
  46. data/lib/docusign_click/models/user_agreement_request.rb +204 -0
  47. data/lib/docusign_click/models/user_agreement_response.rb +335 -0
  48. data/lib/docusign_click/version.rb +14 -0
  49. data/tests/Gemfile +5 -0
  50. data/tests/Gemfile.lock +42 -0
  51. data/tests/docs/Test.pdf +0 -0
  52. data/tests/docs/private.pem +27 -0
  53. data/tests/spec/unit_tests_using_jwt_spec.rb +126 -0
  54. metadata +297 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5f6335c714fcbe2ee4ecfa9c82b806cd82f9f991d0313241980b89fe8b7107ac
4
+ data.tar.gz: 897a5d21f916e16092657a43c35d91e1f74ca28b861d04865b1b5b81b06b0db2
5
+ SHA512:
6
+ metadata.gz: 539402f4be62a236f98453afa9acd5dac673afa69015bd6fe27e8879467fd8e68191d37307fbc2b6e406e8420457fc26acd42a1e0d98b86be14ecb589e4bacf7
7
+ data.tar.gz: caa0e209da01629b0b0d2f51e62dff3b23eed14c2cd7af69f4ee5e841ad8463ff1804b756c1567efb9f2b90383eaf2519e074d7aca36618574612e8380adb363
@@ -0,0 +1,6 @@
1
+ # DocuSign Click Ruby Client Changelog
2
+ See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
3
+
4
+ ## [v1.0.0.beta] - Click API v1-20.3.02 - 2020-12-17
5
+ ### Changed
6
+ - First BETA version of Click API
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
@@ -0,0 +1,69 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ docusign_click (1.0.0.pre.alpha)
5
+ json (~> 2.1, >= 2.1.0)
6
+ jwt (~> 2.2, >= 2.2.1)
7
+ typhoeus (~> 1.0, >= 1.0.1)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ ZenTest (4.12.0)
13
+ addressable (2.7.0)
14
+ public_suffix (>= 2.0.2, < 5.0)
15
+ autotest (4.4.6)
16
+ ZenTest (>= 4.4.1)
17
+ autotest-fsevent (0.2.17)
18
+ sys-uname
19
+ autotest-growl (0.2.16)
20
+ autotest-rails-pure (4.1.2)
21
+ crack (0.4.4)
22
+ diff-lcs (1.4.4)
23
+ ethon (0.12.0)
24
+ ffi (>= 1.3.0)
25
+ ffi (1.13.1)
26
+ hashdiff (1.0.1)
27
+ json (2.3.1)
28
+ jwt (2.2.2)
29
+ public_suffix (4.0.6)
30
+ rake (12.3.3)
31
+ rspec (3.9.0)
32
+ rspec-core (~> 3.9.0)
33
+ rspec-expectations (~> 3.9.0)
34
+ rspec-mocks (~> 3.9.0)
35
+ rspec-core (3.9.3)
36
+ rspec-support (~> 3.9.3)
37
+ rspec-expectations (3.9.3)
38
+ diff-lcs (>= 1.2.0, < 2.0)
39
+ rspec-support (~> 3.9.0)
40
+ rspec-mocks (3.9.1)
41
+ diff-lcs (>= 1.2.0, < 2.0)
42
+ rspec-support (~> 3.9.0)
43
+ rspec-support (3.9.4)
44
+ sys-uname (1.2.1)
45
+ ffi (>= 1.0.0)
46
+ typhoeus (1.4.0)
47
+ ethon (>= 0.9.0)
48
+ vcr (3.0.3)
49
+ webmock (1.24.6)
50
+ addressable (>= 2.3.6)
51
+ crack (>= 0.3.2)
52
+ hashdiff
53
+
54
+ PLATFORMS
55
+ ruby
56
+
57
+ DEPENDENCIES
58
+ autotest (~> 4.4, >= 4.4.6)
59
+ autotest-fsevent (~> 0.2, >= 0.2.12)
60
+ autotest-growl (~> 0.2, >= 0.2.16)
61
+ autotest-rails-pure (~> 4.1, >= 4.1.2)
62
+ docusign_click!
63
+ rake (~> 12.3.3)
64
+ rspec (~> 3.6, >= 3.6.0)
65
+ vcr (~> 3.0, >= 3.0.1)
66
+ webmock (~> 1.24, >= 1.24.3)
67
+
68
+ BUNDLED WITH
69
+ 1.17.2
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2017- DocuSign, Inc. (https://www.docusign.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,80 @@
1
+ # The Official DocuSign Ruby Client
2
+
3
+ [![RubyGems version][rubygems-image]][rubygems-url]
4
+ [![RubyGems downloads][downloads-image]][downloads-url]
5
+ [![Build status][travis-image]][travis-url]
6
+
7
+ ## Requirements
8
+
9
+ - Ruby 1.9+
10
+ - Free [Developer Sandbox](https://go.docusign.com/sandbox/productshot/?elqCampaignId=16531)
11
+
12
+ ## Compatibility
13
+
14
+ - Ruby 1.9+
15
+
16
+ ## Note
17
+
18
+ This open-source SDK is provided for cases where you would like to make additional changes that the SDK does not provide out-of-the-box. If you simply want to use the SDK with any of the examples shown in the [Developer Center](https://developers.docusign.com/esign-rest-api/code-examples), follow the installation instructions below.
19
+
20
+ ## Installation
21
+
22
+ ### Install via your application's **Gemfile**:
23
+
24
+ 1. In your application's **Gemfile**, add:
25
+ **gem 'docusign_click'**
26
+ 2. Open your preferred console.
27
+ 3. In your project directory, execute the installer by typing:
28
+ **bundle install**
29
+
30
+ ### Manual install:
31
+
32
+ 1. Open your preferred console.
33
+ 2. In the console, type:
34
+ **gem install docusign_click**
35
+
36
+ ### Dependencies
37
+
38
+ This client has the following external dependencies:
39
+
40
+ - Jwt>=1.5.2
41
+ - Json>=2.1.0
42
+ - Typhoeus>=1.0.1
43
+
44
+ ## Code Examples
45
+
46
+ ### Launchers
47
+
48
+ DocuSign provides a sample application code referred to as a [Launcher](https://github.com/docusign/code-examples-ruby). The Launcher contains a set of 31 common use cases and associated source files. These examples use either DocuSign&#39;s [Authorization Code Grant](https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-code-grant) or [JSON Web Tokens (JWT)](https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-jsonwebtoken) flows.
49
+
50
+ ### Proof-of-concept applications
51
+
52
+ If your goal is to create a proof-of-concept application, DocuSign provides a set of [Quick Start](https://github.com/docusign/qs-ruby) examples. The Quick Start examples are meant to be used with DocuSign's [OAuth Token Generator](https://developers.docusign.com/oauth-token-generator), which will allow you to generate tokens for the Demo/Sandbox environment only. These tokens last for eight hours and will enable you to build your proof-of-concept application without the need to fully implement an OAuth solution.
53
+
54
+ ## OAuth Implementations
55
+
56
+ For details regarding which type of OAuth grant will work best for your DocuSign integration, see the [REST API Authentication Overview](https://developers.docusign.com/esign-rest-api/guides/authentication) guide located on the [DocuSign Developer Center](https://developers.docusign.com/esign-rest-api/guides/authentication).
57
+
58
+ For security purposes, DocuSign recommends using the [Authorization Code Grant](https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-code-grant) flow.
59
+
60
+
61
+ ## Support
62
+
63
+ Log issues against this client through GitHub. We also have an [active developer community on Stack Overflow](https://stackoverflow.com/questions/tagged/docusignapi).
64
+
65
+ ## License
66
+
67
+ The DocuSign Ruby Client is licensed under the [MIT License](https://github.com/docusign/docusign-ruby-client/blob/master/LICENSE).
68
+
69
+ [rubygems-image]: https://img.shields.io/gem/v/docusign_click.svg?style=flat
70
+ [rubygems-url]: https://rubygems.org/gems/docusign_click
71
+ [downloads-image]: https://img.shields.io/gem/dt/docusign_click.svg?style=flat
72
+ [downloads-url]: https://rubygems.org/gems/docusign_click
73
+ [travis-image]: https://img.shields.io/travis/docusign/docusign-ruby-client.svg?style=flat
74
+ [travis-url]: https://travis-ci.org/docusign/docusign-ruby-client
75
+
76
+ ### Additional Resources
77
+ * [DocuSign Developer Center](https://developers.docusign.com)
78
+ * [DocuSign API on Twitter](https://twitter.com/docusignapi)
79
+ * [DocuSign For Developers on LinkedIn](https://www.linkedin.com/showcase/docusign-for-developers/)
80
+ * [DocuSign For Developers on YouTube](https://www.youtube.com/channel/UCJSJ2kMs_qeQotmw4-lX2NQ)
@@ -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,45 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #DocuSign Click API
5
+
6
+ #An API for an integrator to access the features of DocuSign Click
7
+
8
+ OpenAPI spec version: v2
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_click/version"
16
+
17
+ Gem::Specification.new do |s|
18
+ s.name = "docusign_click"
19
+ s.version = DocuSign_Click::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-click-ruby-client"
24
+ s.summary = "DocuSign Click API 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-click-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 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
35
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
36
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
37
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
38
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
39
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
40
+
41
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
42
+ s.test_files = `find spec/*`.split("\n")
43
+ s.executables = []
44
+ s.require_paths = ["lib"]
45
+ end
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
Binary file
@@ -0,0 +1,62 @@
1
+ =begin
2
+ #DocuSign Click API
3
+
4
+ #DocuSign Click lets you capture consent to standard agreement terms with a single click: terms and conditions, terms of service, terms of use, privacy policies, and more. The Click API lets you include this customizable clickwrap solution in your DocuSign integrations.
5
+
6
+ OpenAPI spec version: v1
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ # Common files
13
+ require 'docusign_click/client/api_client'
14
+ require 'docusign_click/client/api_error'
15
+ require 'docusign_click/version'
16
+ require 'docusign_click/configuration'
17
+
18
+ # Client Files
19
+ require 'docusign_click/client/auth/oauth'
20
+
21
+ # Models
22
+ require 'docusign_click/models/clickwrap_agreements_response'
23
+ require 'docusign_click/models/clickwrap_delete_response'
24
+ require 'docusign_click/models/clickwrap_request'
25
+ require 'docusign_click/models/clickwrap_scheduled_reacceptance'
26
+ require 'docusign_click/models/clickwrap_transfer_request'
27
+ require 'docusign_click/models/clickwrap_version'
28
+ require 'docusign_click/models/clickwrap_version_delete_response'
29
+ require 'docusign_click/models/clickwrap_version_response'
30
+ require 'docusign_click/models/clickwrap_version_summary_response'
31
+ require 'docusign_click/models/clickwrap_versions_delete_response'
32
+ require 'docusign_click/models/clickwrap_versions_paged_response'
33
+ require 'docusign_click/models/clickwrap_versions_response'
34
+ require 'docusign_click/models/clickwraps_delete_response'
35
+ require 'docusign_click/models/display_settings'
36
+ require 'docusign_click/models/document'
37
+ require 'docusign_click/models/error_details'
38
+ require 'docusign_click/models/service_information'
39
+ require 'docusign_click/models/service_version'
40
+ require 'docusign_click/models/user_agreement_request'
41
+ require 'docusign_click/models/user_agreement_response'
42
+
43
+ # APIs
44
+ require 'docusign_click/api/accounts_api'
45
+
46
+ module DocuSign_Click
47
+ class << self
48
+ # Customize default settings for the SDK using block.
49
+ # DocuSign_Click.configure do |config|
50
+ # config.username = "xxx"
51
+ # config.password = "xxx"
52
+ # end
53
+ # If no block given, return the default Configuration object.
54
+ def configure
55
+ if block_given?
56
+ yield(Configuration.default)
57
+ else
58
+ Configuration.default
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,1377 @@
1
+ =begin
2
+ #DocuSign Click API
3
+
4
+ #DocuSign Click lets you capture consent to standard agreement terms with a single click: terms and conditions, terms of service, terms of use, privacy policies, and more. The Click API lets you include this customizable clickwrap solution in your DocuSign integrations.
5
+
6
+ OpenAPI spec version: v1
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_Click
15
+
16
+ class DeleteClickwrapOptions
17
+ #
18
+ attr_accessor :versions
19
+
20
+ def self.default
21
+ @@default ||= DeleteClickwrapOptions.new
22
+ end
23
+ end
24
+
25
+ class DeleteClickwrapVersionsOptions
26
+ #
27
+ attr_accessor :clickwrap_version_ids
28
+
29
+ def self.default
30
+ @@default ||= DeleteClickwrapVersionsOptions.new
31
+ end
32
+ end
33
+
34
+ class DeleteClickwrapsOptions
35
+ #
36
+ attr_accessor :clickwrap_ids
37
+
38
+ def self.default
39
+ @@default ||= DeleteClickwrapsOptions.new
40
+ end
41
+ end
42
+
43
+ class GetClickwrapAgreementsOptions
44
+ #
45
+ attr_accessor :client_user_id
46
+
47
+ #
48
+ attr_accessor :from_date
49
+
50
+ #
51
+ attr_accessor :page_number
52
+
53
+ #
54
+ attr_accessor :status
55
+
56
+ #
57
+ attr_accessor :to_date
58
+
59
+ def self.default
60
+ @@default ||= GetClickwrapAgreementsOptions.new
61
+ end
62
+ end
63
+
64
+ class GetClickwrapVersionAgreementsOptions
65
+ #
66
+ attr_accessor :client_user_id
67
+
68
+ #
69
+ attr_accessor :from_date
70
+
71
+ #
72
+ attr_accessor :page_number
73
+
74
+ #
75
+ attr_accessor :status
76
+
77
+ #
78
+ attr_accessor :to_date
79
+
80
+ def self.default
81
+ @@default ||= GetClickwrapVersionAgreementsOptions.new
82
+ end
83
+ end
84
+
85
+ class GetClickwrapVersionAgreementsByNumberOptions
86
+ #
87
+ attr_accessor :client_user_id
88
+
89
+ #
90
+ attr_accessor :from_date
91
+
92
+ #
93
+ attr_accessor :page_number
94
+
95
+ #
96
+ attr_accessor :status
97
+
98
+ #
99
+ attr_accessor :to_date
100
+
101
+ def self.default
102
+ @@default ||= GetClickwrapVersionAgreementsByNumberOptions.new
103
+ end
104
+ end
105
+
106
+ class GetClickwrapsOptions
107
+ #
108
+ attr_accessor :from_date
109
+
110
+ #
111
+ attr_accessor :owner_user_id
112
+
113
+ #
114
+ attr_accessor :page_number
115
+
116
+ #
117
+ attr_accessor :status
118
+
119
+ #
120
+ attr_accessor :to_date
121
+
122
+ def self.default
123
+ @@default ||= GetClickwrapsOptions.new
124
+ end
125
+ end
126
+
127
+
128
+ class AccountsApi
129
+ attr_accessor :api_client
130
+
131
+ def initialize(api_client = AccountsApi.default)
132
+ @api_client = api_client
133
+ end
134
+
135
+ # Creates a Clickwrap for the specified accountId
136
+ #
137
+ # @param account_id
138
+ # @param clickwrap_request (optional parameter)
139
+ # @return [ClickwrapVersionSummaryResponse]
140
+ def create_clickwrap(account_id, clickwrap_request)
141
+ data, _status_code, _headers = create_clickwrap_with_http_info(account_id, clickwrap_request)
142
+ return data
143
+ end
144
+
145
+ # Creates a Clickwrap for the specified accountId
146
+ #
147
+ # @param account_id
148
+ # @param clickwrap_request (optional parameter)
149
+ # @return [Array<(ClickwrapVersionSummaryResponse, Fixnum, Hash)>] ClickwrapVersionSummaryResponse data, response status code and response headers
150
+ def create_clickwrap_with_http_info(account_id, clickwrap_request)
151
+ if @api_client.config.debugging
152
+ @api_client.config.logger.debug "Calling API: AccountsApi.create_clickwrap ..."
153
+ end
154
+ # verify the required parameter 'account_id' is set
155
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.create_clickwrap" if account_id.nil?
156
+ # resource path
157
+ local_var_path = "/v1/accounts/{accountId}/clickwraps".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
158
+
159
+ # query parameters
160
+ query_params = {}
161
+
162
+ # header parameters
163
+ header_params = {}
164
+ # HTTP header 'Accept' (if needed)
165
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
166
+
167
+ # form parameters
168
+ form_params = {}
169
+
170
+ # http body (model)
171
+ post_body = @api_client.object_to_http_body(clickwrap_request)
172
+ auth_names = []
173
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
174
+ :header_params => header_params,
175
+ :query_params => query_params,
176
+ :form_params => form_params,
177
+ :body => post_body,
178
+ :auth_names => auth_names,
179
+ :return_type => 'ClickwrapVersionSummaryResponse')
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug "API called: AccountsApi#create_clickwrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
182
+ end
183
+ return data, status_code, headers
184
+ end
185
+
186
+ # Creates the clickwrap version
187
+ #
188
+ # @param account_id
189
+ # @param clickwrap_id
190
+ # @param clickwrap_request (optional parameter)
191
+ # @return [ClickwrapVersionSummaryResponse]
192
+ def create_clickwrap_version(account_id, clickwrap_id, clickwrap_request)
193
+ data, _status_code, _headers = create_clickwrap_version_with_http_info(account_id, clickwrap_id, clickwrap_request)
194
+ return data
195
+ end
196
+
197
+ # Creates the clickwrap version
198
+ #
199
+ # @param account_id
200
+ # @param clickwrap_id
201
+ # @param clickwrap_request (optional parameter)
202
+ # @return [Array<(ClickwrapVersionSummaryResponse, Fixnum, Hash)>] ClickwrapVersionSummaryResponse data, response status code and response headers
203
+ def create_clickwrap_version_with_http_info(account_id, clickwrap_id, clickwrap_request)
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "Calling API: AccountsApi.create_clickwrap_version ..."
206
+ end
207
+ # verify the required parameter 'account_id' is set
208
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.create_clickwrap_version" if account_id.nil?
209
+ # verify the required parameter 'clickwrap_id' is set
210
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.create_clickwrap_version" if clickwrap_id.nil?
211
+ # resource path
212
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s)
213
+
214
+ # query parameters
215
+ query_params = {}
216
+
217
+ # header parameters
218
+ header_params = {}
219
+ # HTTP header 'Accept' (if needed)
220
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
221
+
222
+ # form parameters
223
+ form_params = {}
224
+
225
+ # http body (model)
226
+ post_body = @api_client.object_to_http_body(clickwrap_request)
227
+ auth_names = []
228
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
229
+ :header_params => header_params,
230
+ :query_params => query_params,
231
+ :form_params => form_params,
232
+ :body => post_body,
233
+ :auth_names => auth_names,
234
+ :return_type => 'ClickwrapVersionSummaryResponse')
235
+ if @api_client.config.debugging
236
+ @api_client.config.logger.debug "API called: AccountsApi#create_clickwrap_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
237
+ end
238
+ return data, status_code, headers
239
+ end
240
+
241
+ # Checks if a user has agreed to a clickwrap and returns a response with the agreement url. Returns HttpStatusCode.OK if user has no pending agreement.
242
+ #
243
+ # @param account_id
244
+ # @param clickwrap_id
245
+ # @param user_agreement_request (optional parameter)
246
+ # @return [UserAgreementResponse]
247
+ def create_has_agreed(account_id, clickwrap_id, user_agreement_request)
248
+ data, _status_code, _headers = create_has_agreed_with_http_info(account_id, clickwrap_id, user_agreement_request)
249
+ return data
250
+ end
251
+
252
+ # Checks if a user has agreed to a clickwrap and returns a response with the agreement url. Returns HttpStatusCode.OK if user has no pending agreement.
253
+ #
254
+ # @param account_id
255
+ # @param clickwrap_id
256
+ # @param user_agreement_request (optional parameter)
257
+ # @return [Array<(UserAgreementResponse, Fixnum, Hash)>] UserAgreementResponse data, response status code and response headers
258
+ def create_has_agreed_with_http_info(account_id, clickwrap_id, user_agreement_request)
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug "Calling API: AccountsApi.create_has_agreed ..."
261
+ end
262
+ # verify the required parameter 'account_id' is set
263
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.create_has_agreed" if account_id.nil?
264
+ # verify the required parameter 'clickwrap_id' is set
265
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.create_has_agreed" if clickwrap_id.nil?
266
+ # resource path
267
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/agreements".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s)
268
+
269
+ # query parameters
270
+ query_params = {}
271
+
272
+ # header parameters
273
+ header_params = {}
274
+ # HTTP header 'Accept' (if needed)
275
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
276
+
277
+ # form parameters
278
+ form_params = {}
279
+
280
+ # http body (model)
281
+ post_body = @api_client.object_to_http_body(user_agreement_request)
282
+ auth_names = []
283
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
284
+ :header_params => header_params,
285
+ :query_params => query_params,
286
+ :form_params => form_params,
287
+ :body => post_body,
288
+ :auth_names => auth_names,
289
+ :return_type => 'UserAgreementResponse')
290
+ if @api_client.config.debugging
291
+ @api_client.config.logger.debug "API called: AccountsApi#create_has_agreed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
292
+ end
293
+ return data, status_code, headers
294
+ end
295
+
296
+ # Deletes the clickwrap and all its version specified by clickwrapId. Active clickwrap will not get deleted
297
+ #
298
+ # @param account_id
299
+ # @param clickwrap_id
300
+ # @param DocuSign_Click::DeleteClickwrapOptions Options for modifying the behavior of the function.
301
+ # @return [ClickwrapVersionsDeleteResponse]
302
+ def delete_clickwrap(account_id, clickwrap_id, options = DocuSign_Click::DeleteClickwrapOptions.default)
303
+ data, _status_code, _headers = delete_clickwrap_with_http_info(account_id, clickwrap_id, options)
304
+ return data
305
+ end
306
+
307
+ # Deletes the clickwrap and all its version specified by clickwrapId. Active clickwrap will not get deleted
308
+ #
309
+ # @param account_id
310
+ # @param clickwrap_id
311
+ # @param DocuSign_Click::DeleteClickwrapOptions Options for modifying the behavior of the function.
312
+ # @return [Array<(ClickwrapVersionsDeleteResponse, Fixnum, Hash)>] ClickwrapVersionsDeleteResponse data, response status code and response headers
313
+ def delete_clickwrap_with_http_info(account_id, clickwrap_id, options = DocuSign_Click::DeleteClickwrapOptions.default)
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug "Calling API: AccountsApi.delete_clickwrap ..."
316
+ end
317
+ # verify the required parameter 'account_id' is set
318
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_clickwrap" if account_id.nil?
319
+ # verify the required parameter 'clickwrap_id' is set
320
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.delete_clickwrap" if clickwrap_id.nil?
321
+ # resource path
322
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s)
323
+
324
+ # query parameters
325
+ query_params = {}
326
+ query_params[:'versions'] = options.versions if !options.versions.nil?
327
+
328
+ # header parameters
329
+ header_params = {}
330
+ # HTTP header 'Accept' (if needed)
331
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
332
+
333
+ # form parameters
334
+ form_params = {}
335
+
336
+ # http body (model)
337
+ post_body = nil
338
+ auth_names = []
339
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
340
+ :header_params => header_params,
341
+ :query_params => query_params,
342
+ :form_params => form_params,
343
+ :body => post_body,
344
+ :auth_names => auth_names,
345
+ :return_type => 'ClickwrapVersionsDeleteResponse')
346
+ if @api_client.config.debugging
347
+ @api_client.config.logger.debug "API called: AccountsApi#delete_clickwrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
348
+ end
349
+ return data, status_code, headers
350
+ end
351
+
352
+ # Delete a Clickwrap version specified by versionId
353
+ #
354
+ # @param account_id
355
+ # @param clickwrap_id
356
+ # @param version_id
357
+ # @return [ClickwrapVersionDeleteResponse]
358
+ def delete_clickwrap_version(account_id, clickwrap_id, version_id)
359
+ data, _status_code, _headers = delete_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id)
360
+ return data
361
+ end
362
+
363
+ # Delete a Clickwrap version specified by versionId
364
+ #
365
+ # @param account_id
366
+ # @param clickwrap_id
367
+ # @param version_id
368
+ # @return [Array<(ClickwrapVersionDeleteResponse, Fixnum, Hash)>] ClickwrapVersionDeleteResponse data, response status code and response headers
369
+ def delete_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id)
370
+ if @api_client.config.debugging
371
+ @api_client.config.logger.debug "Calling API: AccountsApi.delete_clickwrap_version ..."
372
+ end
373
+ # verify the required parameter 'account_id' is set
374
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_clickwrap_version" if account_id.nil?
375
+ # verify the required parameter 'clickwrap_id' is set
376
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.delete_clickwrap_version" if clickwrap_id.nil?
377
+ # verify the required parameter 'version_id' is set
378
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling AccountsApi.delete_clickwrap_version" if version_id.nil?
379
+ # resource path
380
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)
381
+
382
+ # query parameters
383
+ query_params = {}
384
+
385
+ # header parameters
386
+ header_params = {}
387
+ # HTTP header 'Accept' (if needed)
388
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
389
+
390
+ # form parameters
391
+ form_params = {}
392
+
393
+ # http body (model)
394
+ post_body = nil
395
+ auth_names = []
396
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
397
+ :header_params => header_params,
398
+ :query_params => query_params,
399
+ :form_params => form_params,
400
+ :body => post_body,
401
+ :auth_names => auth_names,
402
+ :return_type => 'ClickwrapVersionDeleteResponse')
403
+ if @api_client.config.debugging
404
+ @api_client.config.logger.debug "API called: AccountsApi#delete_clickwrap_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
405
+ end
406
+ return data, status_code, headers
407
+ end
408
+
409
+ # Delete a Clickwrap version specified by versionNumber. Use versionId instead of versionNumber
410
+ #
411
+ # @param account_id
412
+ # @param clickwrap_id
413
+ # @param version_number
414
+ # @return [ClickwrapVersionSummaryResponse]
415
+ def delete_clickwrap_version_by_number(account_id, clickwrap_id, version_number)
416
+ data, _status_code, _headers = delete_clickwrap_version_by_number_with_http_info(account_id, clickwrap_id, version_number)
417
+ return data
418
+ end
419
+
420
+ # Delete a Clickwrap version specified by versionNumber. Use versionId instead of versionNumber
421
+ #
422
+ # @param account_id
423
+ # @param clickwrap_id
424
+ # @param version_number
425
+ # @return [Array<(ClickwrapVersionSummaryResponse, Fixnum, Hash)>] ClickwrapVersionSummaryResponse data, response status code and response headers
426
+ def delete_clickwrap_version_by_number_with_http_info(account_id, clickwrap_id, version_number)
427
+ if @api_client.config.debugging
428
+ @api_client.config.logger.debug "Calling API: AccountsApi.delete_clickwrap_version_by_number ..."
429
+ end
430
+ # verify the required parameter 'account_id' is set
431
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_clickwrap_version_by_number" if account_id.nil?
432
+ # verify the required parameter 'clickwrap_id' is set
433
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.delete_clickwrap_version_by_number" if clickwrap_id.nil?
434
+ # verify the required parameter 'version_number' is set
435
+ fail ArgumentError, "Missing the required parameter 'version_number' when calling AccountsApi.delete_clickwrap_version_by_number" if version_number.nil?
436
+ # resource path
437
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionNumber}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionNumber' + '}', version_number.to_s)
438
+
439
+ # query parameters
440
+ query_params = {}
441
+
442
+ # header parameters
443
+ header_params = {}
444
+ # HTTP header 'Accept' (if needed)
445
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
446
+
447
+ # form parameters
448
+ form_params = {}
449
+
450
+ # http body (model)
451
+ post_body = nil
452
+ auth_names = []
453
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
454
+ :header_params => header_params,
455
+ :query_params => query_params,
456
+ :form_params => form_params,
457
+ :body => post_body,
458
+ :auth_names => auth_names,
459
+ :return_type => 'ClickwrapVersionSummaryResponse')
460
+ if @api_client.config.debugging
461
+ @api_client.config.logger.debug "API called: AccountsApi#delete_clickwrap_version_by_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
462
+ end
463
+ return data, status_code, headers
464
+ end
465
+
466
+ # Deletes the versions specified by query parameter clickwrapVersionIds for a clickwrap, or all versions if no query parameter is specified. It will not delete if a version is active.
467
+ #
468
+ # @param account_id
469
+ # @param clickwrap_id
470
+ # @param DocuSign_Click::DeleteClickwrapVersionsOptions Options for modifying the behavior of the function.
471
+ # @return [ClickwrapVersionsDeleteResponse]
472
+ def delete_clickwrap_versions(account_id, clickwrap_id, options = DocuSign_Click::DeleteClickwrapVersionsOptions.default)
473
+ data, _status_code, _headers = delete_clickwrap_versions_with_http_info(account_id, clickwrap_id, options)
474
+ return data
475
+ end
476
+
477
+ # Deletes the versions specified by query parameter clickwrapVersionIds for a clickwrap, or all versions if no query parameter is specified. It will not delete if a version is active.
478
+ #
479
+ # @param account_id
480
+ # @param clickwrap_id
481
+ # @param DocuSign_Click::DeleteClickwrapVersionsOptions Options for modifying the behavior of the function.
482
+ # @return [Array<(ClickwrapVersionsDeleteResponse, Fixnum, Hash)>] ClickwrapVersionsDeleteResponse data, response status code and response headers
483
+ def delete_clickwrap_versions_with_http_info(account_id, clickwrap_id, options = DocuSign_Click::DeleteClickwrapVersionsOptions.default)
484
+ if @api_client.config.debugging
485
+ @api_client.config.logger.debug "Calling API: AccountsApi.delete_clickwrap_versions ..."
486
+ end
487
+ # verify the required parameter 'account_id' is set
488
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_clickwrap_versions" if account_id.nil?
489
+ # verify the required parameter 'clickwrap_id' is set
490
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.delete_clickwrap_versions" if clickwrap_id.nil?
491
+ # resource path
492
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s)
493
+
494
+ # query parameters
495
+ query_params = {}
496
+ query_params[:'clickwrapVersionIds'] = options.clickwrap_version_ids if !options.clickwrap_version_ids.nil?
497
+
498
+ # header parameters
499
+ header_params = {}
500
+ # HTTP header 'Accept' (if needed)
501
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
502
+
503
+ # form parameters
504
+ form_params = {}
505
+
506
+ # http body (model)
507
+ post_body = nil
508
+ auth_names = []
509
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
510
+ :header_params => header_params,
511
+ :query_params => query_params,
512
+ :form_params => form_params,
513
+ :body => post_body,
514
+ :auth_names => auth_names,
515
+ :return_type => 'ClickwrapVersionsDeleteResponse')
516
+ if @api_client.config.debugging
517
+ @api_client.config.logger.debug "API called: AccountsApi#delete_clickwrap_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
518
+ end
519
+ return data, status_code, headers
520
+ end
521
+
522
+ # Deletes all the clickwraps for an account or the ones passed in query parameter clickwrapIds. It will not delete active clickwraps.
523
+ #
524
+ # @param account_id
525
+ # @param DocuSign_Click::DeleteClickwrapsOptions Options for modifying the behavior of the function.
526
+ # @return [ClickwrapsDeleteResponse]
527
+ def delete_clickwraps(account_id, options = DocuSign_Click::DeleteClickwrapsOptions.default)
528
+ data, _status_code, _headers = delete_clickwraps_with_http_info(account_id, options)
529
+ return data
530
+ end
531
+
532
+ # Deletes all the clickwraps for an account or the ones passed in query parameter clickwrapIds. It will not delete active clickwraps.
533
+ #
534
+ # @param account_id
535
+ # @param DocuSign_Click::DeleteClickwrapsOptions Options for modifying the behavior of the function.
536
+ # @return [Array<(ClickwrapsDeleteResponse, Fixnum, Hash)>] ClickwrapsDeleteResponse data, response status code and response headers
537
+ def delete_clickwraps_with_http_info(account_id, options = DocuSign_Click::DeleteClickwrapsOptions.default)
538
+ if @api_client.config.debugging
539
+ @api_client.config.logger.debug "Calling API: AccountsApi.delete_clickwraps ..."
540
+ end
541
+ # verify the required parameter 'account_id' is set
542
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_clickwraps" if account_id.nil?
543
+ # resource path
544
+ local_var_path = "/v1/accounts/{accountId}/clickwraps".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
545
+
546
+ # query parameters
547
+ query_params = {}
548
+ query_params[:'clickwrapIds'] = options.clickwrap_ids if !options.clickwrap_ids.nil?
549
+
550
+ # header parameters
551
+ header_params = {}
552
+ # HTTP header 'Accept' (if needed)
553
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
554
+
555
+ # form parameters
556
+ form_params = {}
557
+
558
+ # http body (model)
559
+ post_body = nil
560
+ auth_names = []
561
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
562
+ :header_params => header_params,
563
+ :query_params => query_params,
564
+ :form_params => form_params,
565
+ :body => post_body,
566
+ :auth_names => auth_names,
567
+ :return_type => 'ClickwrapsDeleteResponse')
568
+ if @api_client.config.debugging
569
+ @api_client.config.logger.debug "API called: AccountsApi#delete_clickwraps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
570
+ end
571
+ return data, status_code, headers
572
+ end
573
+
574
+ #
575
+ #
576
+ # @param account_id
577
+ # @param agreement_id
578
+ # @param clickwrap_id
579
+ # @return [UserAgreementResponse]
580
+ def get_agreement(account_id, agreement_id, clickwrap_id)
581
+ data, _status_code, _headers = get_agreement_with_http_info(account_id, agreement_id, clickwrap_id)
582
+ return data
583
+ end
584
+
585
+ #
586
+ #
587
+ # @param account_id
588
+ # @param agreement_id
589
+ # @param clickwrap_id
590
+ # @return [Array<(UserAgreementResponse, Fixnum, Hash)>] UserAgreementResponse data, response status code and response headers
591
+ def get_agreement_with_http_info(account_id, agreement_id, clickwrap_id)
592
+ if @api_client.config.debugging
593
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_agreement ..."
594
+ end
595
+ # verify the required parameter 'account_id' is set
596
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_agreement" if account_id.nil?
597
+ # verify the required parameter 'agreement_id' is set
598
+ fail ArgumentError, "Missing the required parameter 'agreement_id' when calling AccountsApi.get_agreement" if agreement_id.nil?
599
+ # verify the required parameter 'clickwrap_id' is set
600
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_agreement" if clickwrap_id.nil?
601
+ # resource path
602
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/agreements/{agreementId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'agreementId' + '}', agreement_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s)
603
+
604
+ # query parameters
605
+ query_params = {}
606
+
607
+ # header parameters
608
+ header_params = {}
609
+ # HTTP header 'Accept' (if needed)
610
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
611
+
612
+ # form parameters
613
+ form_params = {}
614
+
615
+ # http body (model)
616
+ post_body = nil
617
+ auth_names = []
618
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
619
+ :header_params => header_params,
620
+ :query_params => query_params,
621
+ :form_params => form_params,
622
+ :body => post_body,
623
+ :auth_names => auth_names,
624
+ :return_type => 'UserAgreementResponse')
625
+ if @api_client.config.debugging
626
+ @api_client.config.logger.debug "API called: AccountsApi#get_agreement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
627
+ end
628
+ return data, status_code, headers
629
+ end
630
+
631
+ #
632
+ #
633
+ # @param account_id
634
+ # @param agreement_id
635
+ # @param clickwrap_id
636
+ # @return [nil]
637
+ def get_agreement_pdf(account_id, agreement_id, clickwrap_id)
638
+ get_agreement_pdf_with_http_info(account_id, agreement_id, clickwrap_id)
639
+ return nil
640
+ end
641
+
642
+ #
643
+ #
644
+ # @param account_id
645
+ # @param agreement_id
646
+ # @param clickwrap_id
647
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
648
+ def get_agreement_pdf_with_http_info(account_id, agreement_id, clickwrap_id)
649
+ if @api_client.config.debugging
650
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_agreement_pdf ..."
651
+ end
652
+ # verify the required parameter 'account_id' is set
653
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_agreement_pdf" if account_id.nil?
654
+ # verify the required parameter 'agreement_id' is set
655
+ fail ArgumentError, "Missing the required parameter 'agreement_id' when calling AccountsApi.get_agreement_pdf" if agreement_id.nil?
656
+ # verify the required parameter 'clickwrap_id' is set
657
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_agreement_pdf" if clickwrap_id.nil?
658
+ # resource path
659
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/agreements/{agreementId}/download".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'agreementId' + '}', agreement_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s)
660
+
661
+ # query parameters
662
+ query_params = {}
663
+
664
+ # header parameters
665
+ header_params = {}
666
+ # HTTP header 'Accept' (if needed)
667
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
668
+
669
+ # form parameters
670
+ form_params = {}
671
+
672
+ # http body (model)
673
+ post_body = nil
674
+ auth_names = []
675
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
676
+ :header_params => header_params,
677
+ :query_params => query_params,
678
+ :form_params => form_params,
679
+ :body => post_body,
680
+ :auth_names => auth_names)
681
+ if @api_client.config.debugging
682
+ @api_client.config.logger.debug "API called: AccountsApi#get_agreement_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
683
+ end
684
+ return data, status_code, headers
685
+ end
686
+
687
+ # Gets the clickwrap for an account specified by clickwrapId
688
+ #
689
+ # @param account_id
690
+ # @param clickwrap_id
691
+ # @return [ClickwrapVersionResponse]
692
+ def get_clickwrap(account_id, clickwrap_id)
693
+ data, _status_code, _headers = get_clickwrap_with_http_info(account_id, clickwrap_id)
694
+ return data
695
+ end
696
+
697
+ # Gets the clickwrap for an account specified by clickwrapId
698
+ #
699
+ # @param account_id
700
+ # @param clickwrap_id
701
+ # @return [Array<(ClickwrapVersionResponse, Fixnum, Hash)>] ClickwrapVersionResponse data, response status code and response headers
702
+ def get_clickwrap_with_http_info(account_id, clickwrap_id)
703
+ if @api_client.config.debugging
704
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap ..."
705
+ end
706
+ # verify the required parameter 'account_id' is set
707
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap" if account_id.nil?
708
+ # verify the required parameter 'clickwrap_id' is set
709
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap" if clickwrap_id.nil?
710
+ # resource path
711
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s)
712
+
713
+ # query parameters
714
+ query_params = {}
715
+
716
+ # header parameters
717
+ header_params = {}
718
+ # HTTP header 'Accept' (if needed)
719
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
720
+
721
+ # form parameters
722
+ form_params = {}
723
+
724
+ # http body (model)
725
+ post_body = nil
726
+ auth_names = []
727
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
728
+ :header_params => header_params,
729
+ :query_params => query_params,
730
+ :form_params => form_params,
731
+ :body => post_body,
732
+ :auth_names => auth_names,
733
+ :return_type => 'ClickwrapVersionResponse')
734
+ if @api_client.config.debugging
735
+ @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
736
+ end
737
+ return data, status_code, headers
738
+ end
739
+
740
+ # Gets the Clickwraps for an account
741
+ #
742
+ # @param account_id
743
+ # @param clickwrap_id
744
+ # @param DocuSign_Click::GetClickwrapAgreementsOptions Options for modifying the behavior of the function.
745
+ # @return [ClickwrapAgreementsResponse]
746
+ def get_clickwrap_agreements(account_id, clickwrap_id, options = DocuSign_Click::GetClickwrapAgreementsOptions.default)
747
+ data, _status_code, _headers = get_clickwrap_agreements_with_http_info(account_id, clickwrap_id, options)
748
+ return data
749
+ end
750
+
751
+ # Gets the Clickwraps for an account
752
+ #
753
+ # @param account_id
754
+ # @param clickwrap_id
755
+ # @param DocuSign_Click::GetClickwrapAgreementsOptions Options for modifying the behavior of the function.
756
+ # @return [Array<(ClickwrapAgreementsResponse, Fixnum, Hash)>] ClickwrapAgreementsResponse data, response status code and response headers
757
+ def get_clickwrap_agreements_with_http_info(account_id, clickwrap_id, options = DocuSign_Click::GetClickwrapAgreementsOptions.default)
758
+ if @api_client.config.debugging
759
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap_agreements ..."
760
+ end
761
+ # verify the required parameter 'account_id' is set
762
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap_agreements" if account_id.nil?
763
+ # verify the required parameter 'clickwrap_id' is set
764
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap_agreements" if clickwrap_id.nil?
765
+ # verify the required parameter 'client_user_id' is set
766
+ fail ArgumentError, "Missing the required parameter 'client_user_id' when calling AccountsApi.get_clickwrap_agreements" if client_user_id.nil?
767
+ # verify the required parameter 'status' is set
768
+ fail ArgumentError, "Missing the required parameter 'status' when calling AccountsApi.get_clickwrap_agreements" if status.nil?
769
+ # resource path
770
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/users".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s)
771
+
772
+ # query parameters
773
+ query_params = {}
774
+ query_params[:'client_user_id'] = client_user_id
775
+ query_params[:'status'] = status
776
+ query_params[:'from_date'] = options.from_date if !options.from_date.nil?
777
+ query_params[:'page_number'] = options.page_number if !options.page_number.nil?
778
+ query_params[:'to_date'] = options.to_date if !options.to_date.nil?
779
+
780
+ # header parameters
781
+ header_params = {}
782
+ # HTTP header 'Accept' (if needed)
783
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
784
+
785
+ # form parameters
786
+ form_params = {}
787
+
788
+ # http body (model)
789
+ post_body = nil
790
+ auth_names = []
791
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
792
+ :header_params => header_params,
793
+ :query_params => query_params,
794
+ :form_params => form_params,
795
+ :body => post_body,
796
+ :auth_names => auth_names,
797
+ :return_type => 'ClickwrapAgreementsResponse')
798
+ if @api_client.config.debugging
799
+ @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap_agreements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
800
+ end
801
+ return data, status_code, headers
802
+ end
803
+
804
+ # Gets the Clickwrap version by clickwrapId and versionId for an account
805
+ #
806
+ # @param account_id
807
+ # @param clickwrap_id
808
+ # @param version_id
809
+ # @return [ClickwrapVersionResponse]
810
+ def get_clickwrap_version(account_id, clickwrap_id, version_id)
811
+ data, _status_code, _headers = get_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id)
812
+ return data
813
+ end
814
+
815
+ # Gets the Clickwrap version by clickwrapId and versionId for an account
816
+ #
817
+ # @param account_id
818
+ # @param clickwrap_id
819
+ # @param version_id
820
+ # @return [Array<(ClickwrapVersionResponse, Fixnum, Hash)>] ClickwrapVersionResponse data, response status code and response headers
821
+ def get_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id)
822
+ if @api_client.config.debugging
823
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap_version ..."
824
+ end
825
+ # verify the required parameter 'account_id' is set
826
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap_version" if account_id.nil?
827
+ # verify the required parameter 'clickwrap_id' is set
828
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap_version" if clickwrap_id.nil?
829
+ # verify the required parameter 'version_id' is set
830
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling AccountsApi.get_clickwrap_version" if version_id.nil?
831
+ # resource path
832
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)
833
+
834
+ # query parameters
835
+ query_params = {}
836
+
837
+ # header parameters
838
+ header_params = {}
839
+ # HTTP header 'Accept' (if needed)
840
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
841
+
842
+ # form parameters
843
+ form_params = {}
844
+
845
+ # http body (model)
846
+ post_body = nil
847
+ auth_names = []
848
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
849
+ :header_params => header_params,
850
+ :query_params => query_params,
851
+ :form_params => form_params,
852
+ :body => post_body,
853
+ :auth_names => auth_names,
854
+ :return_type => 'ClickwrapVersionResponse')
855
+ if @api_client.config.debugging
856
+ @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
857
+ end
858
+ return data, status_code, headers
859
+ end
860
+
861
+ # Gets the agreement responses for a clickwrap version
862
+ #
863
+ # @param account_id
864
+ # @param clickwrap_id
865
+ # @param version_id
866
+ # @param DocuSign_Click::GetClickwrapVersionAgreementsOptions Options for modifying the behavior of the function.
867
+ # @return [ClickwrapAgreementsResponse]
868
+ def get_clickwrap_version_agreements(account_id, clickwrap_id, version_id, options = DocuSign_Click::GetClickwrapVersionAgreementsOptions.default)
869
+ data, _status_code, _headers = get_clickwrap_version_agreements_with_http_info(account_id, clickwrap_id, version_id, options)
870
+ return data
871
+ end
872
+
873
+ # Gets the agreement responses for a clickwrap version
874
+ #
875
+ # @param account_id
876
+ # @param clickwrap_id
877
+ # @param version_id
878
+ # @param DocuSign_Click::GetClickwrapVersionAgreementsOptions Options for modifying the behavior of the function.
879
+ # @return [Array<(ClickwrapAgreementsResponse, Fixnum, Hash)>] ClickwrapAgreementsResponse data, response status code and response headers
880
+ def get_clickwrap_version_agreements_with_http_info(account_id, clickwrap_id, version_id, options = DocuSign_Click::GetClickwrapVersionAgreementsOptions.default)
881
+ if @api_client.config.debugging
882
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap_version_agreements ..."
883
+ end
884
+ # verify the required parameter 'account_id' is set
885
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap_version_agreements" if account_id.nil?
886
+ # verify the required parameter 'clickwrap_id' is set
887
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap_version_agreements" if clickwrap_id.nil?
888
+ # verify the required parameter 'version_id' is set
889
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling AccountsApi.get_clickwrap_version_agreements" if version_id.nil?
890
+ # verify the required parameter 'client_user_id' is set
891
+ fail ArgumentError, "Missing the required parameter 'client_user_id' when calling AccountsApi.get_clickwrap_version_agreements" if client_user_id.nil?
892
+ # resource path
893
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionId}/users".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)
894
+
895
+ # query parameters
896
+ query_params = {}
897
+ query_params[:'client_user_id'] = client_user_id
898
+ query_params[:'from_date'] = options.from_date if !options.from_date.nil?
899
+ query_params[:'page_number'] = options.page_number if !options.page_number.nil?
900
+ query_params[:'status'] = options.status if !options.status.nil?
901
+ query_params[:'to_date'] = options.to_date if !options.to_date.nil?
902
+
903
+ # header parameters
904
+ header_params = {}
905
+ # HTTP header 'Accept' (if needed)
906
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
907
+
908
+ # form parameters
909
+ form_params = {}
910
+
911
+ # http body (model)
912
+ post_body = nil
913
+ auth_names = []
914
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
915
+ :header_params => header_params,
916
+ :query_params => query_params,
917
+ :form_params => form_params,
918
+ :body => post_body,
919
+ :auth_names => auth_names,
920
+ :return_type => 'ClickwrapAgreementsResponse')
921
+ if @api_client.config.debugging
922
+ @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap_version_agreements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
923
+ end
924
+ return data, status_code, headers
925
+ end
926
+
927
+ # Gets the agreement responses for a clickwrap version
928
+ #
929
+ # @param account_id
930
+ # @param clickwrap_id
931
+ # @param version_number
932
+ # @param DocuSign_Click::GetClickwrapVersionAgreementsByNumberOptions Options for modifying the behavior of the function.
933
+ # @return [ClickwrapAgreementsResponse]
934
+ def get_clickwrap_version_agreements_by_number(account_id, clickwrap_id, version_number, options = DocuSign_Click::GetClickwrapVersionAgreementsByNumberOptions.default)
935
+ data, _status_code, _headers = get_clickwrap_version_agreements_by_number_with_http_info(account_id, clickwrap_id, version_number, options)
936
+ return data
937
+ end
938
+
939
+ # Gets the agreement responses for a clickwrap version
940
+ #
941
+ # @param account_id
942
+ # @param clickwrap_id
943
+ # @param version_number
944
+ # @param DocuSign_Click::GetClickwrapVersionAgreementsByNumberOptions Options for modifying the behavior of the function.
945
+ # @return [Array<(ClickwrapAgreementsResponse, Fixnum, Hash)>] ClickwrapAgreementsResponse data, response status code and response headers
946
+ def get_clickwrap_version_agreements_by_number_with_http_info(account_id, clickwrap_id, version_number, options = DocuSign_Click::GetClickwrapVersionAgreementsByNumberOptions.default)
947
+ if @api_client.config.debugging
948
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap_version_agreements_by_number ..."
949
+ end
950
+ # verify the required parameter 'account_id' is set
951
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap_version_agreements_by_number" if account_id.nil?
952
+ # verify the required parameter 'clickwrap_id' is set
953
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap_version_agreements_by_number" if clickwrap_id.nil?
954
+ # verify the required parameter 'version_number' is set
955
+ fail ArgumentError, "Missing the required parameter 'version_number' when calling AccountsApi.get_clickwrap_version_agreements_by_number" if version_number.nil?
956
+ # verify the required parameter 'client_user_id' is set
957
+ fail ArgumentError, "Missing the required parameter 'client_user_id' when calling AccountsApi.get_clickwrap_version_agreements_by_number" if client_user_id.nil?
958
+ # resource path
959
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionNumber}/users".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionNumber' + '}', version_number.to_s)
960
+
961
+ # query parameters
962
+ query_params = {}
963
+ query_params[:'client_user_id'] = client_user_id
964
+ query_params[:'from_date'] = options.from_date if !options.from_date.nil?
965
+ query_params[:'page_number'] = options.page_number if !options.page_number.nil?
966
+ query_params[:'status'] = options.status if !options.status.nil?
967
+ query_params[:'to_date'] = options.to_date if !options.to_date.nil?
968
+
969
+ # header parameters
970
+ header_params = {}
971
+ # HTTP header 'Accept' (if needed)
972
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
973
+
974
+ # form parameters
975
+ form_params = {}
976
+
977
+ # http body (model)
978
+ post_body = nil
979
+ auth_names = []
980
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
981
+ :header_params => header_params,
982
+ :query_params => query_params,
983
+ :form_params => form_params,
984
+ :body => post_body,
985
+ :auth_names => auth_names,
986
+ :return_type => 'ClickwrapAgreementsResponse')
987
+ if @api_client.config.debugging
988
+ @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap_version_agreements_by_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
989
+ end
990
+ return data, status_code, headers
991
+ end
992
+
993
+ # Gets the Clickwrap version by clickwrapId and versionNumber for an account
994
+ #
995
+ # @param account_id
996
+ # @param clickwrap_id
997
+ # @param version_number
998
+ # @return [ClickwrapVersionResponse]
999
+ def get_clickwrap_version_by_number(account_id, clickwrap_id, version_number)
1000
+ data, _status_code, _headers = get_clickwrap_version_by_number_with_http_info(account_id, clickwrap_id, version_number)
1001
+ return data
1002
+ end
1003
+
1004
+ # Gets the Clickwrap version by clickwrapId and versionNumber for an account
1005
+ #
1006
+ # @param account_id
1007
+ # @param clickwrap_id
1008
+ # @param version_number
1009
+ # @return [Array<(ClickwrapVersionResponse, Fixnum, Hash)>] ClickwrapVersionResponse data, response status code and response headers
1010
+ def get_clickwrap_version_by_number_with_http_info(account_id, clickwrap_id, version_number)
1011
+ if @api_client.config.debugging
1012
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap_version_by_number ..."
1013
+ end
1014
+ # verify the required parameter 'account_id' is set
1015
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap_version_by_number" if account_id.nil?
1016
+ # verify the required parameter 'clickwrap_id' is set
1017
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap_version_by_number" if clickwrap_id.nil?
1018
+ # verify the required parameter 'version_number' is set
1019
+ fail ArgumentError, "Missing the required parameter 'version_number' when calling AccountsApi.get_clickwrap_version_by_number" if version_number.nil?
1020
+ # resource path
1021
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionNumber}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionNumber' + '}', version_number.to_s)
1022
+
1023
+ # query parameters
1024
+ query_params = {}
1025
+
1026
+ # header parameters
1027
+ header_params = {}
1028
+ # HTTP header 'Accept' (if needed)
1029
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1030
+
1031
+ # form parameters
1032
+ form_params = {}
1033
+
1034
+ # http body (model)
1035
+ post_body = nil
1036
+ auth_names = []
1037
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1038
+ :header_params => header_params,
1039
+ :query_params => query_params,
1040
+ :form_params => form_params,
1041
+ :body => post_body,
1042
+ :auth_names => auth_names,
1043
+ :return_type => 'ClickwrapVersionResponse')
1044
+ if @api_client.config.debugging
1045
+ @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap_version_by_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1046
+ end
1047
+ return data, status_code, headers
1048
+ end
1049
+
1050
+ # Gets all the versions of a clickwrap for an account
1051
+ #
1052
+ # @param account_id
1053
+ # @param clickwrap_id
1054
+ # @return [ClickwrapVersionsPagedResponse]
1055
+ def get_clickwrap_versions(account_id, clickwrap_id)
1056
+ data, _status_code, _headers = get_clickwrap_versions_with_http_info(account_id, clickwrap_id)
1057
+ return data
1058
+ end
1059
+
1060
+ # Gets all the versions of a clickwrap for an account
1061
+ #
1062
+ # @param account_id
1063
+ # @param clickwrap_id
1064
+ # @return [Array<(ClickwrapVersionsPagedResponse, Fixnum, Hash)>] ClickwrapVersionsPagedResponse data, response status code and response headers
1065
+ def get_clickwrap_versions_with_http_info(account_id, clickwrap_id)
1066
+ if @api_client.config.debugging
1067
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap_versions ..."
1068
+ end
1069
+ # verify the required parameter 'account_id' is set
1070
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap_versions" if account_id.nil?
1071
+ # verify the required parameter 'clickwrap_id' is set
1072
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap_versions" if clickwrap_id.nil?
1073
+ # resource path
1074
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s)
1075
+
1076
+ # query parameters
1077
+ query_params = {}
1078
+
1079
+ # header parameters
1080
+ header_params = {}
1081
+ # HTTP header 'Accept' (if needed)
1082
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1083
+
1084
+ # form parameters
1085
+ form_params = {}
1086
+
1087
+ # http body (model)
1088
+ post_body = nil
1089
+ auth_names = []
1090
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1091
+ :header_params => header_params,
1092
+ :query_params => query_params,
1093
+ :form_params => form_params,
1094
+ :body => post_body,
1095
+ :auth_names => auth_names,
1096
+ :return_type => 'ClickwrapVersionsPagedResponse')
1097
+ if @api_client.config.debugging
1098
+ @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1099
+ end
1100
+ return data, status_code, headers
1101
+ end
1102
+
1103
+ # Gets the Clickwraps for an account
1104
+ #
1105
+ # @param account_id
1106
+ # @param DocuSign_Click::GetClickwrapsOptions Options for modifying the behavior of the function.
1107
+ # @return [ClickwrapVersionsResponse]
1108
+ def get_clickwraps(account_id, options = DocuSign_Click::GetClickwrapsOptions.default)
1109
+ data, _status_code, _headers = get_clickwraps_with_http_info(account_id, options)
1110
+ return data
1111
+ end
1112
+
1113
+ # Gets the Clickwraps for an account
1114
+ #
1115
+ # @param account_id
1116
+ # @param DocuSign_Click::GetClickwrapsOptions Options for modifying the behavior of the function.
1117
+ # @return [Array<(ClickwrapVersionsResponse, Fixnum, Hash)>] ClickwrapVersionsResponse data, response status code and response headers
1118
+ def get_clickwraps_with_http_info(account_id, options = DocuSign_Click::GetClickwrapsOptions.default)
1119
+ if @api_client.config.debugging
1120
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwraps ..."
1121
+ end
1122
+ # verify the required parameter 'account_id' is set
1123
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwraps" if account_id.nil?
1124
+ # resource path
1125
+ local_var_path = "/v1/accounts/{accountId}/clickwraps".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
1126
+
1127
+ # query parameters
1128
+ query_params = {}
1129
+ query_params[:'from_date'] = options.from_date if !options.from_date.nil?
1130
+ query_params[:'ownerUserId'] = options.owner_user_id if !options.owner_user_id.nil?
1131
+ query_params[:'page_number'] = options.page_number if !options.page_number.nil?
1132
+ query_params[:'status'] = options.status if !options.status.nil?
1133
+ query_params[:'to_date'] = options.to_date if !options.to_date.nil?
1134
+
1135
+ # header parameters
1136
+ header_params = {}
1137
+ # HTTP header 'Accept' (if needed)
1138
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1139
+
1140
+ # form parameters
1141
+ form_params = {}
1142
+
1143
+ # http body (model)
1144
+ post_body = nil
1145
+ auth_names = []
1146
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1147
+ :header_params => header_params,
1148
+ :query_params => query_params,
1149
+ :form_params => form_params,
1150
+ :body => post_body,
1151
+ :auth_names => auth_names,
1152
+ :return_type => 'ClickwrapVersionsResponse')
1153
+ if @api_client.config.debugging
1154
+ @api_client.config.logger.debug "API called: AccountsApi#get_clickwraps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1155
+ end
1156
+ return data, status_code, headers
1157
+ end
1158
+
1159
+ # Provides base service and version access information.
1160
+ #
1161
+ # @return [ServiceInformation]
1162
+ def get_service_information()
1163
+ data, _status_code, _headers = get_service_information_with_http_info()
1164
+ return data
1165
+ end
1166
+
1167
+ # Provides base service and version access information.
1168
+ #
1169
+ # @return [Array<(ServiceInformation, Fixnum, Hash)>] ServiceInformation data, response status code and response headers
1170
+ def get_service_information_with_http_info()
1171
+ if @api_client.config.debugging
1172
+ @api_client.config.logger.debug "Calling API: AccountsApi.get_service_information ..."
1173
+ end
1174
+ # resource path
1175
+ local_var_path = "/service_information".sub('{format}','json')
1176
+
1177
+ # query parameters
1178
+ query_params = {}
1179
+
1180
+ # header parameters
1181
+ header_params = {}
1182
+ # HTTP header 'Accept' (if needed)
1183
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1184
+
1185
+ # form parameters
1186
+ form_params = {}
1187
+
1188
+ # http body (model)
1189
+ post_body = nil
1190
+ auth_names = []
1191
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1192
+ :header_params => header_params,
1193
+ :query_params => query_params,
1194
+ :form_params => form_params,
1195
+ :body => post_body,
1196
+ :auth_names => auth_names,
1197
+ :return_type => 'ServiceInformation')
1198
+ if @api_client.config.debugging
1199
+ @api_client.config.logger.debug "API called: AccountsApi#get_service_information\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1200
+ end
1201
+ return data, status_code, headers
1202
+ end
1203
+
1204
+ # Updates the clickwrap specified by clickwrapId
1205
+ #
1206
+ # @param account_id
1207
+ # @param clickwrap_id
1208
+ # @param clickwrap_transfer_request (optional parameter)
1209
+ # @return [ClickwrapVersionSummaryResponse]
1210
+ def update_clickwrap(account_id, clickwrap_id, clickwrap_transfer_request)
1211
+ data, _status_code, _headers = update_clickwrap_with_http_info(account_id, clickwrap_id, clickwrap_transfer_request)
1212
+ return data
1213
+ end
1214
+
1215
+ # Updates the clickwrap specified by clickwrapId
1216
+ #
1217
+ # @param account_id
1218
+ # @param clickwrap_id
1219
+ # @param clickwrap_transfer_request (optional parameter)
1220
+ # @return [Array<(ClickwrapVersionSummaryResponse, Fixnum, Hash)>] ClickwrapVersionSummaryResponse data, response status code and response headers
1221
+ def update_clickwrap_with_http_info(account_id, clickwrap_id, clickwrap_transfer_request)
1222
+ if @api_client.config.debugging
1223
+ @api_client.config.logger.debug "Calling API: AccountsApi.update_clickwrap ..."
1224
+ end
1225
+ # verify the required parameter 'account_id' is set
1226
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.update_clickwrap" if account_id.nil?
1227
+ # verify the required parameter 'clickwrap_id' is set
1228
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.update_clickwrap" if clickwrap_id.nil?
1229
+ # resource path
1230
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s)
1231
+
1232
+ # query parameters
1233
+ query_params = {}
1234
+
1235
+ # header parameters
1236
+ header_params = {}
1237
+ # HTTP header 'Accept' (if needed)
1238
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1239
+
1240
+ # form parameters
1241
+ form_params = {}
1242
+
1243
+ # http body (model)
1244
+ post_body = @api_client.object_to_http_body(clickwrap_transfer_request)
1245
+ auth_names = []
1246
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1247
+ :header_params => header_params,
1248
+ :query_params => query_params,
1249
+ :form_params => form_params,
1250
+ :body => post_body,
1251
+ :auth_names => auth_names,
1252
+ :return_type => 'ClickwrapVersionSummaryResponse')
1253
+ if @api_client.config.debugging
1254
+ @api_client.config.logger.debug "API called: AccountsApi#update_clickwrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1255
+ end
1256
+ return data, status_code, headers
1257
+ end
1258
+
1259
+ # Updates the clickwrap version specified by versionId
1260
+ #
1261
+ # @param account_id
1262
+ # @param clickwrap_id
1263
+ # @param version_id
1264
+ # @param clickwrap_request (optional parameter)
1265
+ # @return [ClickwrapVersionSummaryResponse]
1266
+ def update_clickwrap_version(account_id, clickwrap_id, version_id, clickwrap_request)
1267
+ data, _status_code, _headers = update_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id, clickwrap_request)
1268
+ return data
1269
+ end
1270
+
1271
+ # Updates the clickwrap version specified by versionId
1272
+ #
1273
+ # @param account_id
1274
+ # @param clickwrap_id
1275
+ # @param version_id
1276
+ # @param clickwrap_request (optional parameter)
1277
+ # @return [Array<(ClickwrapVersionSummaryResponse, Fixnum, Hash)>] ClickwrapVersionSummaryResponse data, response status code and response headers
1278
+ def update_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id, clickwrap_request)
1279
+ if @api_client.config.debugging
1280
+ @api_client.config.logger.debug "Calling API: AccountsApi.update_clickwrap_version ..."
1281
+ end
1282
+ # verify the required parameter 'account_id' is set
1283
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.update_clickwrap_version" if account_id.nil?
1284
+ # verify the required parameter 'clickwrap_id' is set
1285
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.update_clickwrap_version" if clickwrap_id.nil?
1286
+ # verify the required parameter 'version_id' is set
1287
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling AccountsApi.update_clickwrap_version" if version_id.nil?
1288
+ # resource path
1289
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)
1290
+
1291
+ # query parameters
1292
+ query_params = {}
1293
+
1294
+ # header parameters
1295
+ header_params = {}
1296
+ # HTTP header 'Accept' (if needed)
1297
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1298
+
1299
+ # form parameters
1300
+ form_params = {}
1301
+
1302
+ # http body (model)
1303
+ post_body = @api_client.object_to_http_body(clickwrap_request)
1304
+ auth_names = []
1305
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1306
+ :header_params => header_params,
1307
+ :query_params => query_params,
1308
+ :form_params => form_params,
1309
+ :body => post_body,
1310
+ :auth_names => auth_names,
1311
+ :return_type => 'ClickwrapVersionSummaryResponse')
1312
+ if @api_client.config.debugging
1313
+ @api_client.config.logger.debug "API called: AccountsApi#update_clickwrap_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1314
+ end
1315
+ return data, status_code, headers
1316
+ end
1317
+
1318
+ # Updates the clickwrap version specified by versionNumber. Use versionId instead of versionNumber
1319
+ #
1320
+ # @param account_id
1321
+ # @param clickwrap_id
1322
+ # @param version_number
1323
+ # @param clickwrap_request (optional parameter)
1324
+ # @return [ClickwrapVersionSummaryResponse]
1325
+ def update_clickwrap_version_by_number(account_id, clickwrap_id, version_number, clickwrap_request)
1326
+ data, _status_code, _headers = update_clickwrap_version_by_number_with_http_info(account_id, clickwrap_id, version_number, clickwrap_request)
1327
+ return data
1328
+ end
1329
+
1330
+ # Updates the clickwrap version specified by versionNumber. Use versionId instead of versionNumber
1331
+ #
1332
+ # @param account_id
1333
+ # @param clickwrap_id
1334
+ # @param version_number
1335
+ # @param clickwrap_request (optional parameter)
1336
+ # @return [Array<(ClickwrapVersionSummaryResponse, Fixnum, Hash)>] ClickwrapVersionSummaryResponse data, response status code and response headers
1337
+ def update_clickwrap_version_by_number_with_http_info(account_id, clickwrap_id, version_number, clickwrap_request)
1338
+ if @api_client.config.debugging
1339
+ @api_client.config.logger.debug "Calling API: AccountsApi.update_clickwrap_version_by_number ..."
1340
+ end
1341
+ # verify the required parameter 'account_id' is set
1342
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.update_clickwrap_version_by_number" if account_id.nil?
1343
+ # verify the required parameter 'clickwrap_id' is set
1344
+ fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.update_clickwrap_version_by_number" if clickwrap_id.nil?
1345
+ # verify the required parameter 'version_number' is set
1346
+ fail ArgumentError, "Missing the required parameter 'version_number' when calling AccountsApi.update_clickwrap_version_by_number" if version_number.nil?
1347
+ # resource path
1348
+ local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionNumber}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionNumber' + '}', version_number.to_s)
1349
+
1350
+ # query parameters
1351
+ query_params = {}
1352
+
1353
+ # header parameters
1354
+ header_params = {}
1355
+ # HTTP header 'Accept' (if needed)
1356
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1357
+
1358
+ # form parameters
1359
+ form_params = {}
1360
+
1361
+ # http body (model)
1362
+ post_body = @api_client.object_to_http_body(clickwrap_request)
1363
+ auth_names = []
1364
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1365
+ :header_params => header_params,
1366
+ :query_params => query_params,
1367
+ :form_params => form_params,
1368
+ :body => post_body,
1369
+ :auth_names => auth_names,
1370
+ :return_type => 'ClickwrapVersionSummaryResponse')
1371
+ if @api_client.config.debugging
1372
+ @api_client.config.logger.debug "API called: AccountsApi#update_clickwrap_version_by_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1373
+ end
1374
+ return data, status_code, headers
1375
+ end
1376
+ end
1377
+ end