echosign 1.0.2 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.rubocop.yml +14 -0
  4. data/.rubocop_todo.yml +241 -0
  5. data/.simplecov +2 -0
  6. data/.travis.yml +9 -0
  7. data/Gemfile +3 -3
  8. data/Gemfile.lock +74 -48
  9. data/README.md +43 -8
  10. data/Rakefile +2 -2
  11. data/doc/Echosign.html +135 -0
  12. data/doc/Echosign/Agreement.html +545 -0
  13. data/doc/Echosign/Client.html +5365 -0
  14. data/doc/Echosign/CounterSignerInfo.html +267 -0
  15. data/doc/Echosign/Credentials.html +1053 -0
  16. data/doc/Echosign/Fileinfo.html +305 -0
  17. data/doc/Echosign/FormFieldLocation.html +264 -0
  18. data/doc/Echosign/MegaSign.html +533 -0
  19. data/doc/Echosign/ParameterError.html +124 -0
  20. data/doc/Echosign/PhoneInfo.html +281 -0
  21. data/doc/Echosign/Recipient.html +311 -0
  22. data/doc/Echosign/RecipientSecurityOption.html +296 -0
  23. data/doc/Echosign/Refresh.html +288 -0
  24. data/doc/Echosign/Reminder.html +279 -0
  25. data/doc/Echosign/Request.html +5289 -0
  26. data/doc/Echosign/Request/EndpointHash.html +328 -0
  27. data/doc/Echosign/Request/Failure.html +290 -0
  28. data/doc/Echosign/RequestFormField.html +244 -0
  29. data/doc/Echosign/RequiredParameterError.html +124 -0
  30. data/doc/Echosign/UrlFileInfo.html +297 -0
  31. data/doc/Echosign/User.html +422 -0
  32. data/doc/Echosign/Validatable.html +355 -0
  33. data/doc/Echosign/Widget.html +924 -0
  34. data/doc/Echosign/WidgetCompletionInfo.html +323 -0
  35. data/doc/Echosign/WidgetPersonalization.html +330 -0
  36. data/doc/Echosign/WidgetSecurityOption.html +361 -0
  37. data/doc/Echosign/WidgetSignerSecurityOption.html +298 -0
  38. data/doc/Echosign/WidgetStatus.html +316 -0
  39. data/doc/Echosign/WidgetVaultingInfo.html +267 -0
  40. data/doc/_index.html +378 -0
  41. data/doc/class_list.html +51 -0
  42. data/doc/css/common.css +1 -0
  43. data/doc/css/full_list.css +58 -0
  44. data/doc/css/style.css +496 -0
  45. data/doc/file.README.html +191 -0
  46. data/doc/file_list.html +56 -0
  47. data/doc/frames.html +17 -0
  48. data/doc/index.html +191 -0
  49. data/doc/js/app.js +292 -0
  50. data/doc/js/full_list.js +216 -0
  51. data/doc/js/jquery.js +4 -0
  52. data/doc/method_list.html +1035 -0
  53. data/doc/top-level-namespace.html +110 -0
  54. data/echosign.gemspec +18 -20
  55. data/features/support/env.rb +8 -8
  56. data/fixtures/vcr_cassettes/agreement_combined_pdf.yml +2 -2
  57. data/fixtures/vcr_cassettes/agreement_document_file.yml +1 -1
  58. data/fixtures/vcr_cassettes/agreement_documents.yml +2 -2
  59. data/fixtures/vcr_cassettes/agreement_form_data.yml +1 -1
  60. data/fixtures/vcr_cassettes/agreement_info.yml +1 -1
  61. data/fixtures/vcr_cassettes/agreement_signing_urls.yml +1 -1
  62. data/fixtures/vcr_cassettes/audit_trail_pdf.yml +1 -1
  63. data/fixtures/vcr_cassettes/cancel_agreement.yml +1 -1
  64. data/fixtures/vcr_cassettes/create_agreement.yml +1 -1
  65. data/fixtures/vcr_cassettes/create_reminder.yml +1 -1
  66. data/fixtures/vcr_cassettes/create_transient_document.yml +1 -1
  67. data/fixtures/vcr_cassettes/create_user.yml +1 -1
  68. data/fixtures/vcr_cassettes/create_widget.yml +1 -1
  69. data/fixtures/vcr_cassettes/get_agreements.yml +1 -1
  70. data/fixtures/vcr_cassettes/get_library_document.yml +1 -1
  71. data/fixtures/vcr_cassettes/get_library_document_data.yml +1 -1
  72. data/fixtures/vcr_cassettes/get_library_document_file.yml +1 -1
  73. data/fixtures/vcr_cassettes/get_library_documents.yml +1 -1
  74. data/fixtures/vcr_cassettes/get_token.yml +22 -20
  75. data/fixtures/vcr_cassettes/get_user.yml +1 -1
  76. data/fixtures/vcr_cassettes/get_users.yml +2 -2
  77. data/fixtures/vcr_cassettes/get_widget.yml +1 -1
  78. data/fixtures/vcr_cassettes/get_widget_document_file.yml +1 -1
  79. data/fixtures/vcr_cassettes/get_widget_documents.yml +1 -1
  80. data/fixtures/vcr_cassettes/get_widgets.yml +1 -1
  81. data/fixtures/vcr_cassettes/library_combined_document.yml +2 -2
  82. data/fixtures/vcr_cassettes/library_document_audit_trail.yml +1 -1
  83. data/fixtures/vcr_cassettes/personalize_widget.yml +1 -1
  84. data/fixtures/vcr_cassettes/refresh_token.yml +46 -0
  85. data/fixtures/vcr_cassettes/revoke_token.yml +44 -0
  86. data/fixtures/vcr_cassettes/update_widget_status.yml +1 -1
  87. data/lib/echosign.rb +11 -11
  88. data/lib/echosign/agreement.rb +26 -10
  89. data/lib/echosign/agreement/client.rb +111 -104
  90. data/lib/echosign/agreement/fileinfo.rb +1 -3
  91. data/lib/echosign/agreement/form_field_location.rb +2 -3
  92. data/lib/echosign/agreement/phone_info.rb +5 -5
  93. data/lib/echosign/agreement/recipient.rb +9 -8
  94. data/lib/echosign/agreement/recipient_security_option.rb +5 -4
  95. data/lib/echosign/agreement/request.rb +33 -43
  96. data/lib/echosign/agreement/request_form_field.rb +2 -3
  97. data/lib/echosign/agreement/url_file_info.rb +8 -6
  98. data/lib/echosign/client.rb +33 -24
  99. data/lib/echosign/credentials.rb +95 -24
  100. data/lib/echosign/library_documents/client.rb +18 -23
  101. data/lib/echosign/library_documents/request.rb +19 -20
  102. data/lib/echosign/mega_sign.rb +20 -10
  103. data/lib/echosign/mega_sign/client.rb +109 -104
  104. data/lib/echosign/mega_sign/request.rb +32 -43
  105. data/lib/echosign/refresh.rb +6 -10
  106. data/lib/echosign/reminder.rb +2 -2
  107. data/lib/echosign/request.rb +85 -75
  108. data/lib/echosign/user.rb +13 -7
  109. data/lib/echosign/validatable.rb +6 -10
  110. data/lib/echosign/version.rb +1 -1
  111. data/lib/echosign/widget.rb +53 -27
  112. data/lib/echosign/widget/client.rb +33 -36
  113. data/lib/echosign/widget/counter_signer_info.rb +4 -5
  114. data/lib/echosign/widget/request.rb +28 -52
  115. data/lib/echosign/widget/widget_completion_info.rb +22 -12
  116. data/lib/echosign/widget/widget_personalization.rb +9 -7
  117. data/lib/echosign/widget/widget_security_option.rb +21 -11
  118. data/lib/echosign/widget/widget_signer_security_option.rb +8 -6
  119. data/lib/echosign/widget/widget_status.rb +10 -8
  120. data/lib/echosign/widget/widget_vaulting_info.rb +4 -5
  121. data/spec/lib/agreement/client_spec.rb +25 -31
  122. data/spec/lib/client_spec.rb +15 -18
  123. data/spec/lib/credentials_spec.rb +48 -0
  124. data/spec/lib/library_documents/client_spec.rb +11 -15
  125. data/spec/lib/shared_client.rb +9 -16
  126. data/spec/lib/user_spec.rb +0 -2
  127. data/spec/lib/validatable_spec.rb +12 -18
  128. data/spec/lib/version_spec.rb +1 -1
  129. data/spec/lib/widget/client_spec.rb +46 -49
  130. data/spec/spec_helper.rb +12 -5
  131. metadata +125 -60
  132. data/spec/lib/request_spec.rb +0 -18
data/README.md CHANGED
@@ -1,9 +1,10 @@
1
+ [![Build Status](https://travis-ci.org/chamberflag/echosign.svg?branch=master)](https://travis-ci.org/chamberflag/echosign)
2
+
1
3
  echosign
2
4
  ===========
3
5
 
4
6
  Ruby Gem to consume Adobe's EchoSign e-signature service - REST service v5
5
7
 
6
-
7
8
  ## Installation
8
9
 
9
10
  ```
@@ -12,22 +13,56 @@ gem install echosign
12
13
 
13
14
  ## Documentation
14
15
 
15
- The bulk of the API is on the [Echosign::Client class](http://rdoc.info/github/bernardworthy/echosign/frames/Echosign/Client)
16
+ The bulk of the API is on the [Echosign::Client class](http://rdoc.info/github/chamberflag/echosign/frames/Echosign/Client)
16
17
 
17
- You can read Echosign's full [API Documentation](http://rdoc.info/github/bernardworthy/echosign/frames)
18
+ You can read Echosign's full [API Documentation](http://rdoc.info/github/chamberflag/echosign/frames)
18
19
 
19
20
  It wouldn't hurt to read Adobe's [Echosign API documentation](https://secure.echosign.com/public/docs/restapi/v5)
20
21
 
21
22
  ## Usage
22
23
 
23
- #### Initializing a client
24
+ #### Initializing a client with an existing refresh token
25
+
26
+ ```
27
+ require 'echosign'
28
+
29
+ credentials = Echosign::Credentials.new(app_id, app_secret)
30
+ access_token = credentials.refresh_access_token(refresh_token)
31
+
32
+ client = Echosign::Client.new(access_token)
33
+ ```
34
+
35
+ #### Initializing a client with an authorization code
36
+
37
+ Workflow before authorizing:
38
+ - `redirect_uri` must be set in the EchoSign API configuration
39
+ - `scope` will typically be something like `'agreement_write:account agreement_send:account'`
40
+
41
+ ```
42
+ require 'echosign'
43
+
44
+ credentials = Echosign::Credentials.new(app_id, app_secret)
45
+ redirect_to credentials.authorize_url(redirect_uri, scope)
46
+ ```
24
47
 
48
+ Workflow after authorizing:
25
49
  ```
26
50
  require 'echosign'
27
51
 
28
- credentials = Echosign::Refresh.new(app_id, app_secret, refresh_token)
52
+ credentials = Echosign::Credentials.new(app_id, app_secret)
53
+ token = credentials.get_token(params[:code], redirect_uri)
54
+
55
+ # you should persist credentials.refresh_token somewhere to use in future
56
+
57
+ client = Echosign::Client.new(token)
58
+ ```
59
+
60
+ #### Initializing a client with a legacy integration key
61
+
62
+ ```
63
+ require 'echosign'
29
64
 
30
- client = Echosign::Client.new(credentials)
65
+ client = Echosign::Client.new(integration_key)
31
66
  ```
32
67
 
33
68
  #### Setting up a new agreement from a URL
@@ -47,9 +82,9 @@ recipient_params = {
47
82
  role: 'SIGNER', email: 'superguy@whatsit.com'
48
83
  }
49
84
 
50
- agreement_info_params = {
85
+ agreement_info = {
51
86
  fileInfos: [ Echosign::Fileinfo.new(file_info_params) ],
52
- recipients: [ Echosign::Recipient.new(recipient_params)],
87
+ recipientSetInfos: [ Echosign::Recipient.new(recipient_params)],
53
88
  signatureFlow: "SENDER_SIGNS_LAST",
54
89
  signatureType: "ESIGN",
55
90
  name: "Rumplestiltskin Contract"
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'bundler/gem_tasks'
6
6
  # Default directory to look in is `/specs`
7
7
  # Run with `rake spec`
8
8
  RSpec::Core::RakeTask.new(:spec) do |task|
9
- task.rspec_opts = ['--color', '--format', 'documentation', '--fail-fast']
9
+ task.rspec_opts = ['--color', '--format', 'documentation', '--fail-fast']
10
10
  end
11
11
 
12
- task :default => :spec
12
+ task default: :spec
@@ -0,0 +1,135 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Echosign
8
+
9
+ &mdash; Documentation by YARD 0.9.16
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Echosign";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (E)</a> &raquo;
40
+
41
+
42
+ <span class="title">Echosign</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Echosign
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/echosign/user.rb<span class="defines">,<br />
82
+ lib/echosign/client.rb,<br /> lib/echosign/widget.rb,<br /> lib/echosign/refresh.rb,<br /> lib/echosign/version.rb,<br /> lib/echosign/reminder.rb,<br /> lib/echosign/agreement.rb,<br /> lib/echosign/mega_sign.rb,<br /> lib/echosign/credentials.rb,<br /> lib/echosign/validatable.rb,<br /> lib/echosign/widget/client.rb,<br /> lib/echosign/agreement/client.rb,<br /> lib/echosign/mega_sign/client.rb,<br /> lib/echosign/agreement/fileinfo.rb,<br /> lib/echosign/agreement/recipient.rb,<br /> lib/echosign/agreement/phone_info.rb,<br /> lib/echosign/widget/widget_status.rb,<br /> lib/echosign/agreement/url_file_info.rb,<br /> lib/echosign/library_documents/client.rb,<br /> lib/echosign/widget/counter_signer_info.rb,<br /> lib/echosign/widget/widget_vaulting_info.rb,<br /> lib/echosign/agreement/request_form_field.rb,<br /> lib/echosign/agreement/form_field_location.rb,<br /> lib/echosign/widget/widget_completion_info.rb,<br /> lib/echosign/widget/widget_personalization.rb,<br /> lib/echosign/widget/widget_security_option.rb,<br /> lib/echosign/agreement/recipient_security_option.rb,<br /> lib/echosign/widget/widget_signer_security_option.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Defined Under Namespace</h2>
89
+ <p class="children">
90
+
91
+
92
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Echosign/Request.html" title="Echosign::Request (module)">Request</a></span>, <span class='object_link'><a href="Echosign/Validatable.html" title="Echosign::Validatable (module)">Validatable</a></span>
93
+
94
+
95
+
96
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Echosign/Agreement.html" title="Echosign::Agreement (class)">Agreement</a></span>, <span class='object_link'><a href="Echosign/Client.html" title="Echosign::Client (class)">Client</a></span>, <span class='object_link'><a href="Echosign/CounterSignerInfo.html" title="Echosign::CounterSignerInfo (class)">CounterSignerInfo</a></span>, <span class='object_link'><a href="Echosign/Credentials.html" title="Echosign::Credentials (class)">Credentials</a></span>, <span class='object_link'><a href="Echosign/Fileinfo.html" title="Echosign::Fileinfo (class)">Fileinfo</a></span>, <span class='object_link'><a href="Echosign/FormFieldLocation.html" title="Echosign::FormFieldLocation (class)">FormFieldLocation</a></span>, <span class='object_link'><a href="Echosign/MegaSign.html" title="Echosign::MegaSign (class)">MegaSign</a></span>, <span class='object_link'><a href="Echosign/ParameterError.html" title="Echosign::ParameterError (class)">ParameterError</a></span>, <span class='object_link'><a href="Echosign/PhoneInfo.html" title="Echosign::PhoneInfo (class)">PhoneInfo</a></span>, <span class='object_link'><a href="Echosign/Recipient.html" title="Echosign::Recipient (class)">Recipient</a></span>, <span class='object_link'><a href="Echosign/RecipientSecurityOption.html" title="Echosign::RecipientSecurityOption (class)">RecipientSecurityOption</a></span>, <span class='object_link'><a href="Echosign/Refresh.html" title="Echosign::Refresh (class)">Refresh</a></span>, <span class='object_link'><a href="Echosign/Reminder.html" title="Echosign::Reminder (class)">Reminder</a></span>, <span class='object_link'><a href="Echosign/RequestFormField.html" title="Echosign::RequestFormField (class)">RequestFormField</a></span>, <span class='object_link'><a href="Echosign/RequiredParameterError.html" title="Echosign::RequiredParameterError (class)">RequiredParameterError</a></span>, <span class='object_link'><a href="Echosign/UrlFileInfo.html" title="Echosign::UrlFileInfo (class)">UrlFileInfo</a></span>, <span class='object_link'><a href="Echosign/User.html" title="Echosign::User (class)">User</a></span>, <span class='object_link'><a href="Echosign/Widget.html" title="Echosign::Widget (class)">Widget</a></span>, <span class='object_link'><a href="Echosign/WidgetCompletionInfo.html" title="Echosign::WidgetCompletionInfo (class)">WidgetCompletionInfo</a></span>, <span class='object_link'><a href="Echosign/WidgetPersonalization.html" title="Echosign::WidgetPersonalization (class)">WidgetPersonalization</a></span>, <span class='object_link'><a href="Echosign/WidgetSecurityOption.html" title="Echosign::WidgetSecurityOption (class)">WidgetSecurityOption</a></span>, <span class='object_link'><a href="Echosign/WidgetSignerSecurityOption.html" title="Echosign::WidgetSignerSecurityOption (class)">WidgetSignerSecurityOption</a></span>, <span class='object_link'><a href="Echosign/WidgetStatus.html" title="Echosign::WidgetStatus (class)">WidgetStatus</a></span>, <span class='object_link'><a href="Echosign/WidgetVaultingInfo.html" title="Echosign::WidgetVaultingInfo (class)">WidgetVaultingInfo</a></span>
97
+
98
+
99
+ </p>
100
+
101
+
102
+ <h2>
103
+ Constant Summary
104
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
105
+ </h2>
106
+
107
+ <dl class="constants">
108
+
109
+ <dt id="VERSION-constant" class="">VERSION =
110
+
111
+ </dt>
112
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1.5.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
113
+
114
+ </dl>
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ </div>
126
+
127
+ <div id="footer">
128
+ Generated on Thu Oct 18 12:44:43 2018 by
129
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
+ 0.9.16 (ruby-2.6.0).
131
+ </div>
132
+
133
+ </div>
134
+ </body>
135
+ </html>
@@ -0,0 +1,545 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Echosign::Agreement
8
+
9
+ &mdash; Documentation by YARD 0.9.16
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Echosign::Agreement";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Echosign.html" title="Echosign (module)">Echosign</a></span></span>
41
+ &raquo;
42
+ <span class="title">Agreement</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Echosign::Agreement
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Hash</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Hash</li>
78
+
79
+ <li class="next">Echosign::Agreement</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+ <dl>
93
+ <dt>Includes:</dt>
94
+ <dd><span class='object_link'><a href="Validatable.html" title="Echosign::Validatable (module)">Validatable</a></span></dd>
95
+ </dl>
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <dl>
103
+ <dt>Defined in:</dt>
104
+ <dd>lib/echosign/agreement.rb</dd>
105
+ </dl>
106
+
107
+ </div>
108
+
109
+
110
+
111
+
112
+
113
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
114
+ <ul class="summary">
115
+
116
+ <li class="public ">
117
+ <span class="summary_signature">
118
+
119
+ <a href="#user_email-instance_method" title="#user_email (instance method)">#<strong>user_email</strong> &#x21d2; Object </a>
120
+
121
+
122
+
123
+ </span>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <span class="summary_desc"><div class='inline'>
137
+ <p>Returns the value of attribute user_email.</p>
138
+ </div></span>
139
+
140
+ </li>
141
+
142
+
143
+ <li class="public ">
144
+ <span class="summary_signature">
145
+
146
+ <a href="#user_id-instance_method" title="#user_id (instance method)">#<strong>user_id</strong> &#x21d2; Object </a>
147
+
148
+
149
+
150
+ </span>
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <span class="summary_desc"><div class='inline'>
164
+ <p>Returns the value of attribute user_id.</p>
165
+ </div></span>
166
+
167
+ </li>
168
+
169
+
170
+ </ul>
171
+
172
+
173
+
174
+
175
+
176
+ <h2>
177
+ Instance Method Summary
178
+ <small><a href="#" class="summary_toggle">collapse</a></small>
179
+ </h2>
180
+
181
+ <ul class="summary">
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(user_id = nil, user_email = nil, params) &#x21d2; Echosign::Agreement </a>
187
+
188
+
189
+
190
+ </span>
191
+
192
+
193
+ <span class="note title constructor">constructor</span>
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <span class="summary_desc"><div class='inline'>
203
+ <p>Creates an agreement object for submission.</p>
204
+ </div></span>
205
+
206
+ </li>
207
+
208
+
209
+ </ul>
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Validatable.html" title="Echosign::Validatable (module)">Validatable</a></span></h3>
222
+ <p class="inherited"><span class='object_link'><a href="Validatable.html#require_exactly_one-instance_method" title="Echosign::Validatable#require_exactly_one (method)">#require_exactly_one</a></span>, <span class='object_link'><a href="Validatable.html#require_keys-instance_method" title="Echosign::Validatable#require_keys (method)">#require_keys</a></span>, <span class='object_link'><a href="Validatable.html#validate_field-instance_method" title="Echosign::Validatable#validate_field (method)">#validate_field</a></span></p>
223
+
224
+ <div id="constructor_details" class="method_details_list">
225
+ <h2>Constructor Details</h2>
226
+
227
+ <div class="method_details first">
228
+ <h3 class="signature first" id="initialize-instance_method">
229
+
230
+ #<strong>initialize</strong>(user_id = nil, user_email = nil, params) &#x21d2; <tt><span class='object_link'><a href="" title="Echosign::Agreement (class)">Echosign::Agreement</a></span></tt>
231
+
232
+
233
+
234
+
235
+
236
+ </h3><div class="docstring">
237
+ <div class="discussion">
238
+
239
+ <p>Creates an agreement object for submission</p>
240
+
241
+
242
+ </div>
243
+ </div>
244
+ <div class="tags">
245
+ <p class="tag_title">Parameters:</p>
246
+ <ul class="param">
247
+
248
+ <li>
249
+
250
+ <span class='name'>user_id</span>
251
+
252
+
253
+ <span class='type'>(<tt>String</tt>)</span>
254
+
255
+
256
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
257
+
258
+
259
+ &mdash;
260
+ <div class='inline'>
261
+ <p>ID of the user whom this agreement is made for</p>
262
+ </div>
263
+
264
+ </li>
265
+
266
+ <li>
267
+
268
+ <span class='name'>user_email</span>
269
+
270
+
271
+ <span class='type'>(<tt>String</tt>)</span>
272
+
273
+
274
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
275
+
276
+
277
+ &mdash;
278
+ <div class='inline'>
279
+ <p>Email of the user whom this agreement is made for</p>
280
+ </div>
281
+
282
+ </li>
283
+
284
+ <li>
285
+
286
+ <span class='name'>params</span>
287
+
288
+
289
+ <span class='type'>(<tt>Hash</tt>)</span>
290
+
291
+
292
+
293
+ &mdash;
294
+ <div class='inline'>
295
+ <p>SYMBOL-referenced Hash containing:</p>
296
+ </div>
297
+
298
+ </li>
299
+
300
+ </ul>
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+ <p class="tag_title">Options Hash (<tt>params</tt>):</p>
310
+ <ul class="option">
311
+
312
+ <li>
313
+ <span class="name">:fileInfos</span>
314
+ <span class="type">(<tt>Array</tt>)</span>
315
+ <span class="default">
316
+
317
+ </span>
318
+
319
+ &mdash; <div class='inline'>
320
+ <p>A list of one or more files (or references to files) that will be sent out
321
+ for signature. If more than one file is provided, they will be combined
322
+ into one PDF before being sent out. Note: Only one of the four parameters
323
+ in every FileInfo object must be specified. Populate the array with
324
+ instances of <span class='object_link'><a href="Fileinfo.html" title="Echosign::Fileinfo (class)">Echosign::Fileinfo</a></span> (REQUIRED)</p>
325
+ </div>
326
+
327
+ </li>
328
+
329
+ <li>
330
+ <span class="name">:recipientSetInfos</span>
331
+ <span class="type">(<tt>Array</tt>)</span>
332
+ <span class="default">
333
+
334
+ </span>
335
+
336
+ &mdash; <div class='inline'>
337
+ <p>A list of one or more recipients. For regular (non-MegaSign) documents,
338
+ there is no limit on the number of electronic signatures in a single
339
+ document. Written signatures are limited to four per document. This limit
340
+ includes the sender if the sender&#39;s signature is also required.</p>
341
+
342
+ <pre class="code ruby"><code class="ruby">Populate the array with instances of {Echosign::Recipient Echosign::Recipient} (REQUIRED)
343
+ </code></pre>
344
+ </div>
345
+
346
+ </li>
347
+
348
+ <li>
349
+ <span class="name">:signatureFlow</span>
350
+ <span class="type">(<tt>String</tt>)</span>
351
+ <span class="default">
352
+
353
+ </span>
354
+
355
+ &mdash; <div class='inline'>
356
+ <p>[&#39;SENDER_SIGNATURE_NOT_REQUIRED&#39; or &#39;SENDER_SIGNS_LAST&#39; or
357
+ &#39;SENDER_SIGNS_FIRST&#39; or &#39;SEQUENTIAL&#39; or
358
+ &#39;PARALLEL&#39;]: Selects the workflow you would like to use - whether
359
+ the sender needs to sign before the recipient, after the recipient, or not
360
+ at all. The possible values for this variable are
361
+ SENDER_SIGNATURE_NOT_REQUIRED, SENDER_SIGNS_LAST, SENDER_SIGNS_FIRST,
362
+ SEQUENTIAL or PARALLEL. (REQUIRED)</p>
363
+ </div>
364
+
365
+ </li>
366
+
367
+ <li>
368
+ <span class="name">:signatureType</span>
369
+ <span class="type">(<tt>String</tt>)</span>
370
+ <span class="default">
371
+
372
+ </span>
373
+
374
+ &mdash; <div class='inline'>
375
+ <p>[&#39;ESIGN&#39; or &#39;WRITTEN&#39;]: Specifies the type of signature you
376
+ would like to request - written or eSignature. The possible values are
377
+ ESIGN or WRITTEN (REQUIRED)</p>
378
+ </div>
379
+
380
+ </li>
381
+
382
+ <li>
383
+ <span class="name">:name</span>
384
+ <span class="type">(<tt>String</tt>)</span>
385
+ <span class="default">
386
+
387
+ </span>
388
+
389
+ &mdash; <div class='inline'>
390
+ <p>The name of the agreement that will be used to identify it, in emails and
391
+ on the website. (REQUIRED)</p>
392
+ </div>
393
+
394
+ </li>
395
+
396
+ </ul>
397
+
398
+
399
+
400
+ </div><table class="source_code">
401
+ <tr>
402
+ <td>
403
+ <pre class="lines">
404
+
405
+
406
+ 36
407
+ 37
408
+ 38
409
+ 39
410
+ 40
411
+ 41
412
+ 42
413
+ 43
414
+ 44
415
+ 45
416
+ 46
417
+ 47
418
+ 48</pre>
419
+ </td>
420
+ <td>
421
+ <pre class="code"><span class="info file"># File 'lib/echosign/agreement.rb', line 36</span>
422
+
423
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_user_id'>user_id</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_user_email'>user_email</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
424
+ <span class='ivar'>@user_id</span> <span class='op'>=</span> <span class='id identifier rubyid_user_id'>user_id</span>
425
+ <span class='ivar'>@user_email</span> <span class='op'>=</span> <span class='id identifier rubyid_user_email'>user_email</span>
426
+ <span class='comment'># TODO (cthomas) barf if user_id or user_email are blank
427
+ </span> <span class='kw'>if</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:recipients</span><span class='rparen'>)</span>
428
+ <span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>NOTE: :recipients param in </span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'>.new is deprecated; use :recipientSetInfos instead.\n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
429
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'>.new called from </span><span class='embexpr_beg'>#{</span><span class='const'>Gem</span><span class='period'>.</span><span class='id identifier rubyid_location_of_caller'>location_of_caller</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>:</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
430
+ <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
431
+ <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:recipientSetInfos</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='symbol'>:recipients</span>
432
+ <span class='kw'>end</span>
433
+ <span class='id identifier rubyid_require_keys'>require_keys</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='symbol'>:signatureType</span><span class='comma'>,</span> <span class='symbol'>:recipientSetInfos</span><span class='comma'>,</span> <span class='symbol'>:signatureFlow</span><span class='comma'>,</span> <span class='symbol'>:fileInfos</span><span class='comma'>,</span> <span class='symbol'>:name</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
434
+ <span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='lbrace'>{</span> <span class='label'>documentCreationInfo:</span> <span class='id identifier rubyid_params'>params</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
435
+ <span class='kw'>end</span></pre>
436
+ </td>
437
+ </tr>
438
+ </table>
439
+ </div>
440
+
441
+ </div>
442
+
443
+ <div id="instance_attr_details" class="attr_details">
444
+ <h2>Instance Attribute Details</h2>
445
+
446
+
447
+ <span id="user_email=-instance_method"></span>
448
+ <div class="method_details first">
449
+ <h3 class="signature first" id="user_email-instance_method">
450
+
451
+ #<strong>user_email</strong> &#x21d2; <tt>Object</tt>
452
+
453
+
454
+
455
+
456
+
457
+ </h3><div class="docstring">
458
+ <div class="discussion">
459
+
460
+ <p>Returns the value of attribute user_email</p>
461
+
462
+
463
+ </div>
464
+ </div>
465
+ <div class="tags">
466
+
467
+
468
+ </div><table class="source_code">
469
+ <tr>
470
+ <td>
471
+ <pre class="lines">
472
+
473
+
474
+ 11
475
+ 12
476
+ 13</pre>
477
+ </td>
478
+ <td>
479
+ <pre class="code"><span class="info file"># File 'lib/echosign/agreement.rb', line 11</span>
480
+
481
+ <span class='kw'>def</span> <span class='id identifier rubyid_user_email'>user_email</span>
482
+ <span class='ivar'>@user_email</span>
483
+ <span class='kw'>end</span></pre>
484
+ </td>
485
+ </tr>
486
+ </table>
487
+ </div>
488
+
489
+
490
+ <span id="user_id=-instance_method"></span>
491
+ <div class="method_details ">
492
+ <h3 class="signature " id="user_id-instance_method">
493
+
494
+ #<strong>user_id</strong> &#x21d2; <tt>Object</tt>
495
+
496
+
497
+
498
+
499
+
500
+ </h3><div class="docstring">
501
+ <div class="discussion">
502
+
503
+ <p>Returns the value of attribute user_id</p>
504
+
505
+
506
+ </div>
507
+ </div>
508
+ <div class="tags">
509
+
510
+
511
+ </div><table class="source_code">
512
+ <tr>
513
+ <td>
514
+ <pre class="lines">
515
+
516
+
517
+ 11
518
+ 12
519
+ 13</pre>
520
+ </td>
521
+ <td>
522
+ <pre class="code"><span class="info file"># File 'lib/echosign/agreement.rb', line 11</span>
523
+
524
+ <span class='kw'>def</span> <span class='id identifier rubyid_user_id'>user_id</span>
525
+ <span class='ivar'>@user_id</span>
526
+ <span class='kw'>end</span></pre>
527
+ </td>
528
+ </tr>
529
+ </table>
530
+ </div>
531
+
532
+ </div>
533
+
534
+
535
+ </div>
536
+
537
+ <div id="footer">
538
+ Generated on Thu Oct 18 12:44:49 2018 by
539
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
540
+ 0.9.16 (ruby-2.6.0).
541
+ </div>
542
+
543
+ </div>
544
+ </body>
545
+ </html>