dropbox-sign 1.1.2 → 1.4.1
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -3
- data/README.md +9 -4
- data/VERSION +1 -1
- data/docs/BulkSendJobGetResponseSignatureRequests.md +1 -0
- data/docs/EmbeddedEditUrlRequest.md +1 -1
- data/docs/EventCallbackRequestEvent.md +1 -1
- data/docs/OAuthApi.md +0 -16
- data/docs/SignatureRequestApi.md +11 -10
- data/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +1 -1
- data/docs/SignatureRequestBulkSendWithTemplateRequest.md +1 -1
- data/docs/SignatureRequestCreateEmbeddedRequest.md +4 -4
- data/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md +1 -1
- data/docs/SignatureRequestResponse.md +2 -0
- data/docs/SignatureRequestSendRequest.md +5 -4
- data/docs/SignatureRequestSendWithTemplateRequest.md +2 -1
- data/docs/SignatureRequestUpdateRequest.md +2 -2
- data/docs/SubAttachment.md +1 -1
- data/docs/SubCustomField.md +1 -1
- data/docs/SubFieldOptions.md +1 -1
- data/docs/SubFormFieldsPerDocumentBase.md +2 -2
- data/docs/SubFormFieldsPerDocumentDateSigned.md +2 -0
- data/docs/SubFormFieldsPerDocumentDropdown.md +2 -0
- data/docs/SubFormFieldsPerDocumentFontEnum.md +9 -0
- data/docs/SubFormFieldsPerDocumentHyperlink.md +2 -0
- data/docs/SubFormFieldsPerDocumentText.md +4 -1
- data/docs/SubFormFieldsPerDocumentTextMerge.md +2 -0
- data/docs/SubSignatureRequestGroupedSigners.md +1 -1
- data/docs/SubSignatureRequestSigner.md +1 -1
- data/docs/SubSignatureRequestTemplateSigner.md +1 -1
- data/docs/SubSigningOptions.md +1 -1
- data/docs/SubWhiteLabelingOptions.md +1 -1
- data/docs/TeamAddMemberRequest.md +1 -1
- data/docs/TeamRemoveMemberRequest.md +2 -2
- data/docs/TemplateAddUserRequest.md +2 -2
- data/docs/TemplateApi.md +106 -3
- data/docs/TemplateCreateEmbeddedDraftRequest.md +2 -2
- data/docs/TemplateCreateRequest.md +27 -0
- data/docs/TemplateCreateResponse.md +11 -0
- data/docs/TemplateCreateResponseTemplate.md +10 -0
- data/docs/TemplateResponseDocument.md +1 -1
- data/docs/TemplateResponseDocumentStaticFieldBase.md +1 -1
- data/docs/UnclaimedDraftApi.md +3 -3
- data/docs/UnclaimedDraftCreateEmbeddedRequest.md +4 -4
- data/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md +4 -3
- data/docs/UnclaimedDraftCreateRequest.md +2 -2
- data/examples/OauthTokenGenerate.rb +0 -8
- data/examples/OauthTokenRefresh.rb +0 -8
- data/examples/SignatureRequestEdit.rb +58 -0
- data/examples/SignatureRequestEditEmbedded.rb +48 -0
- data/examples/SignatureRequestEditEmbeddedWithTemplate.rb +41 -0
- data/examples/SignatureRequestEditWithTemplate.rb +52 -0
- data/examples/TemplateCreate.rb +49 -0
- data/lib/dropbox-sign/api/api_app_api.rb +1 -1
- data/lib/dropbox-sign/api/signature_request_api.rb +17 -14
- data/lib/dropbox-sign/api/team_api.rb +1 -1
- data/lib/dropbox-sign/api/template_api.rb +112 -0
- data/lib/dropbox-sign/api/unclaimed_draft_api.rb +6 -6
- data/lib/dropbox-sign/event_callback_helper.rb +1 -1
- data/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb +13 -1
- data/lib/dropbox-sign/models/embedded_edit_url_request.rb +1 -1
- data/lib/dropbox-sign/models/event_callback_request_event.rb +2 -7
- data/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb +1 -1
- data/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb +1 -1
- data/lib/dropbox-sign/models/signature_request_create_embedded_request.rb +4 -4
- data/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb +1 -1
- data/lib/dropbox-sign/models/signature_request_response.rb +28 -4
- data/lib/dropbox-sign/models/signature_request_send_request.rb +18 -5
- data/lib/dropbox-sign/models/signature_request_send_with_template_request.rb +15 -2
- data/lib/dropbox-sign/models/signature_request_update_request.rb +2 -2
- data/lib/dropbox-sign/models/sub_attachment.rb +1 -1
- data/lib/dropbox-sign/models/sub_custom_field.rb +1 -1
- data/lib/dropbox-sign/models/sub_field_options.rb +1 -1
- data/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb +2 -2
- data/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb +62 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb +62 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb +54 -0
- data/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb +62 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb +52 -5
- data/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb +62 -4
- data/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb +1 -1
- data/lib/dropbox-sign/models/sub_signature_request_signer.rb +1 -1
- data/lib/dropbox-sign/models/sub_signature_request_template_signer.rb +1 -1
- data/lib/dropbox-sign/models/sub_signing_options.rb +1 -1
- data/lib/dropbox-sign/models/sub_white_labeling_options.rb +1 -1
- data/lib/dropbox-sign/models/team_add_member_request.rb +1 -1
- data/lib/dropbox-sign/models/team_remove_member_request.rb +2 -2
- data/lib/dropbox-sign/models/template_add_user_request.rb +2 -2
- data/lib/dropbox-sign/models/template_create_embedded_draft_request.rb +2 -2
- data/lib/dropbox-sign/models/template_create_request.rb +509 -0
- data/lib/dropbox-sign/models/template_create_response.rb +263 -0
- data/lib/dropbox-sign/models/template_create_response_template.rb +252 -0
- data/lib/dropbox-sign/models/template_response_document.rb +1 -1
- data/lib/dropbox-sign/models/template_response_document_static_field_base.rb +1 -1
- data/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb +4 -4
- data/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb +20 -7
- data/lib/dropbox-sign/models/unclaimed_draft_create_request.rb +2 -2
- data/lib/dropbox-sign/version.rb +1 -1
- data/lib/dropbox-sign.rb +4 -0
- data/openapi-config.yaml +1 -1
- data/openapi-sdk.yaml +1010 -499
- data/spec/event_callback_helper_spec.rb +17 -3
- data/templates/event_callback_helper.mustache +1 -1
- data/test_fixtures/EventCallbackHelper_AccountCallbacks.json +82 -0
- data/test_fixtures/{EventCallbackHelper.json → EventCallbackHelper_AppCallbacks.json} +8 -4
- data/test_fixtures/SignatureRequestCreateEmbeddedRequest.json +6 -2
- data/test_fixtures/SignatureRequestSendRequest.json +20 -8
- data/test_fixtures/SignatureRequestSendWithTemplateRequest.json +1 -0
- data/test_fixtures/SubFormFieldsPerDocument.json +8 -4
- data/test_fixtures/TemplateCreateEmbeddedDraftRequest.json +3 -1
- data/test_fixtures/TemplateCreateRequest.json +120 -0
- data/test_fixtures/TemplateCreateResponse.json +7 -0
- data/test_fixtures/UnclaimedDraftCreateEmbeddedRequest.json +3 -1
- data/test_fixtures/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json +2 -1
- data/test_fixtures/UnclaimedDraftCreateRequest.json +3 -1
- metadata +27 -11
@@ -0,0 +1,263 @@
|
|
1
|
+
=begin
|
2
|
+
#Dropbox Sign API
|
3
|
+
|
4
|
+
#Dropbox Sign v3 API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
7
|
+
Contact: apisupport@hellosign.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.3.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Dropbox
|
17
|
+
end
|
18
|
+
|
19
|
+
module Dropbox::Sign
|
20
|
+
class TemplateCreateResponse
|
21
|
+
# @return [TemplateCreateResponseTemplate]
|
22
|
+
attr_accessor :template
|
23
|
+
|
24
|
+
# A list of warnings.
|
25
|
+
# @return [Array<WarningResponse>]
|
26
|
+
attr_accessor :warnings
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'template' => :'template',
|
32
|
+
:'warnings' => :'warnings'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns attribute map of this model + parent
|
42
|
+
def self.merged_attributes
|
43
|
+
self.attribute_map
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'template' => :'TemplateCreateResponseTemplate',
|
50
|
+
:'warnings' => :'Array<WarningResponse>'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping of this model + parent
|
55
|
+
def self.merged_types
|
56
|
+
self.openapi_types
|
57
|
+
end
|
58
|
+
|
59
|
+
# List of attributes with nullable: true
|
60
|
+
def self.openapi_nullable
|
61
|
+
Set.new([
|
62
|
+
])
|
63
|
+
end
|
64
|
+
|
65
|
+
# Returns list of attributes with nullable: true of this model + parent
|
66
|
+
def self.merged_nullable
|
67
|
+
self.openapi_nullable
|
68
|
+
end
|
69
|
+
|
70
|
+
# Attempt to instantiate and hydrate a new instance of this class
|
71
|
+
# @param [Object] data Data to be converted
|
72
|
+
# @return [TemplateCreateResponse]
|
73
|
+
def self.init(data)
|
74
|
+
return ApiClient.default.convert_to_type(
|
75
|
+
data,
|
76
|
+
"TemplateCreateResponse"
|
77
|
+
) || TemplateCreateResponse.new
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
def initialize(attributes = {})
|
83
|
+
if (!attributes.is_a?(Hash))
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::TemplateCreateResponse` initialize method"
|
85
|
+
end
|
86
|
+
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
89
|
+
if (!self.class.merged_attributes.key?(k.to_sym))
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
91
|
+
end
|
92
|
+
h[k.to_sym] = v
|
93
|
+
}
|
94
|
+
|
95
|
+
if attributes.key?(:'template')
|
96
|
+
self.template = attributes[:'template']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'warnings')
|
100
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
101
|
+
self.warnings = value
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
107
|
+
# @return Array for valid properties with the reasons
|
108
|
+
def list_invalid_properties
|
109
|
+
invalid_properties = Array.new
|
110
|
+
invalid_properties
|
111
|
+
end
|
112
|
+
|
113
|
+
# Check to see if the all the properties in the model are valid
|
114
|
+
# @return true if the model is valid
|
115
|
+
def valid?
|
116
|
+
true
|
117
|
+
end
|
118
|
+
|
119
|
+
# Checks equality by comparing each attribute.
|
120
|
+
# @param [Object] Object to be compared
|
121
|
+
def ==(o)
|
122
|
+
return true if self.equal?(o)
|
123
|
+
self.class == o.class &&
|
124
|
+
template == o.template &&
|
125
|
+
warnings == o.warnings
|
126
|
+
end
|
127
|
+
|
128
|
+
# @see the `==` method
|
129
|
+
# @param [Object] Object to be compared
|
130
|
+
def eql?(o)
|
131
|
+
self == o
|
132
|
+
end
|
133
|
+
|
134
|
+
# Calculates hash code according to all attributes.
|
135
|
+
# @return [Integer] Hash code
|
136
|
+
def hash
|
137
|
+
[template, warnings].hash
|
138
|
+
end
|
139
|
+
|
140
|
+
# Builds the object from hash
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
+
# @return [Object] Returns the model itself
|
143
|
+
def self.build_from_hash(attributes)
|
144
|
+
new.build_from_hash(attributes)
|
145
|
+
end
|
146
|
+
|
147
|
+
# Builds the object from hash
|
148
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
149
|
+
# @return [Object] Returns the model itself
|
150
|
+
def build_from_hash(attributes)
|
151
|
+
return nil unless attributes.is_a?(Hash)
|
152
|
+
attribute_map = self.class.merged_attributes
|
153
|
+
|
154
|
+
self.class.merged_types.each_pair do |key, type|
|
155
|
+
if type =~ /\AArray<(.*)>/i
|
156
|
+
# check to ensure the input is an array given that the attribute
|
157
|
+
# is documented as an array but the input is not
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) })
|
160
|
+
end
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]]))
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
self
|
167
|
+
end
|
168
|
+
|
169
|
+
# Deserializes the data based on type
|
170
|
+
# @param string type Data type
|
171
|
+
# @param string value Value to be deserialized
|
172
|
+
# @return [Object] Deserialized data
|
173
|
+
def _deserialize(type, value)
|
174
|
+
case type.to_sym
|
175
|
+
when :Time
|
176
|
+
Time.parse(value)
|
177
|
+
when :Date
|
178
|
+
Date.parse(value)
|
179
|
+
when :String
|
180
|
+
value.to_s
|
181
|
+
when :Integer
|
182
|
+
value.to_i
|
183
|
+
when :Float
|
184
|
+
value.to_f
|
185
|
+
when :Boolean
|
186
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
187
|
+
true
|
188
|
+
else
|
189
|
+
false
|
190
|
+
end
|
191
|
+
when :File
|
192
|
+
value
|
193
|
+
when :Object
|
194
|
+
# generic object (usually a Hash), return directly
|
195
|
+
value
|
196
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
197
|
+
inner_type = Regexp.last_match[:inner_type]
|
198
|
+
value.map { |v| _deserialize(inner_type, v) }
|
199
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
200
|
+
k_type = Regexp.last_match[:k_type]
|
201
|
+
v_type = Regexp.last_match[:v_type]
|
202
|
+
{}.tap do |hash|
|
203
|
+
value.each do |k, v|
|
204
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
else # model
|
208
|
+
# models (e.g. Pet)
|
209
|
+
klass = Dropbox::Sign.const_get(type)
|
210
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the string representation of the object
|
215
|
+
# @return [String] String presentation of the object
|
216
|
+
def to_s
|
217
|
+
to_hash.to_s
|
218
|
+
end
|
219
|
+
|
220
|
+
# to_body is an alias to to_hash (backward compatibility)
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_body
|
223
|
+
to_hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Returns the object in the form of hash
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
228
|
+
def to_hash(include_nil = true)
|
229
|
+
hash = {}
|
230
|
+
self.class.merged_attributes.each_pair do |attr, param|
|
231
|
+
value = self.send(attr)
|
232
|
+
if value.nil?
|
233
|
+
next unless include_nil
|
234
|
+
is_nullable = self.class.merged_nullable.include?(attr)
|
235
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
236
|
+
end
|
237
|
+
|
238
|
+
hash[param] = _to_hash(value, include_nil)
|
239
|
+
end
|
240
|
+
hash
|
241
|
+
end
|
242
|
+
|
243
|
+
# Outputs non-array value in the form of hash
|
244
|
+
# For object, use to_hash. Otherwise, just return the value
|
245
|
+
# @param [Object] value Any valid value
|
246
|
+
# @return [Hash] Returns the value in the form of hash
|
247
|
+
def _to_hash(value, include_nil = true)
|
248
|
+
if value.is_a?(Array)
|
249
|
+
value.compact.map { |v| _to_hash(v, include_nil) }
|
250
|
+
elsif value.is_a?(Hash)
|
251
|
+
{}.tap do |hash|
|
252
|
+
value.each { |k, v| hash[k] = _to_hash(v, include_nil) }
|
253
|
+
end
|
254
|
+
elsif value.respond_to? :to_hash
|
255
|
+
value.to_hash(include_nil)
|
256
|
+
else
|
257
|
+
value
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|
@@ -0,0 +1,252 @@
|
|
1
|
+
=begin
|
2
|
+
#Dropbox Sign API
|
3
|
+
|
4
|
+
#Dropbox Sign v3 API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
7
|
+
Contact: apisupport@hellosign.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.3.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Dropbox
|
17
|
+
end
|
18
|
+
|
19
|
+
module Dropbox::Sign
|
20
|
+
# Template object with parameters: `template_id`.
|
21
|
+
class TemplateCreateResponseTemplate
|
22
|
+
# The id of the Template.
|
23
|
+
# @return [String]
|
24
|
+
attr_accessor :template_id
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'template_id' => :'template_id'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Returns attribute map of this model + parent
|
39
|
+
def self.merged_attributes
|
40
|
+
self.attribute_map
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
def self.openapi_types
|
45
|
+
{
|
46
|
+
:'template_id' => :'String'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping of this model + parent
|
51
|
+
def self.merged_types
|
52
|
+
self.openapi_types
|
53
|
+
end
|
54
|
+
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
61
|
+
# Returns list of attributes with nullable: true of this model + parent
|
62
|
+
def self.merged_nullable
|
63
|
+
self.openapi_nullable
|
64
|
+
end
|
65
|
+
|
66
|
+
# Attempt to instantiate and hydrate a new instance of this class
|
67
|
+
# @param [Object] data Data to be converted
|
68
|
+
# @return [TemplateCreateResponseTemplate]
|
69
|
+
def self.init(data)
|
70
|
+
return ApiClient.default.convert_to_type(
|
71
|
+
data,
|
72
|
+
"TemplateCreateResponseTemplate"
|
73
|
+
) || TemplateCreateResponseTemplate.new
|
74
|
+
end
|
75
|
+
|
76
|
+
# Initializes the object
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
78
|
+
def initialize(attributes = {})
|
79
|
+
if (!attributes.is_a?(Hash))
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::TemplateCreateResponseTemplate` initialize method"
|
81
|
+
end
|
82
|
+
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
85
|
+
if (!self.class.merged_attributes.key?(k.to_sym))
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateResponseTemplate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
87
|
+
end
|
88
|
+
h[k.to_sym] = v
|
89
|
+
}
|
90
|
+
|
91
|
+
if attributes.key?(:'template_id')
|
92
|
+
self.template_id = attributes[:'template_id']
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
97
|
+
# @return Array for valid properties with the reasons
|
98
|
+
def list_invalid_properties
|
99
|
+
invalid_properties = Array.new
|
100
|
+
invalid_properties
|
101
|
+
end
|
102
|
+
|
103
|
+
# Check to see if the all the properties in the model are valid
|
104
|
+
# @return true if the model is valid
|
105
|
+
def valid?
|
106
|
+
true
|
107
|
+
end
|
108
|
+
|
109
|
+
# Checks equality by comparing each attribute.
|
110
|
+
# @param [Object] Object to be compared
|
111
|
+
def ==(o)
|
112
|
+
return true if self.equal?(o)
|
113
|
+
self.class == o.class &&
|
114
|
+
template_id == o.template_id
|
115
|
+
end
|
116
|
+
|
117
|
+
# @see the `==` method
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def eql?(o)
|
120
|
+
self == o
|
121
|
+
end
|
122
|
+
|
123
|
+
# Calculates hash code according to all attributes.
|
124
|
+
# @return [Integer] Hash code
|
125
|
+
def hash
|
126
|
+
[template_id].hash
|
127
|
+
end
|
128
|
+
|
129
|
+
# Builds the object from hash
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
+
# @return [Object] Returns the model itself
|
132
|
+
def self.build_from_hash(attributes)
|
133
|
+
new.build_from_hash(attributes)
|
134
|
+
end
|
135
|
+
|
136
|
+
# Builds the object from hash
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
+
# @return [Object] Returns the model itself
|
139
|
+
def build_from_hash(attributes)
|
140
|
+
return nil unless attributes.is_a?(Hash)
|
141
|
+
attribute_map = self.class.merged_attributes
|
142
|
+
|
143
|
+
self.class.merged_types.each_pair do |key, type|
|
144
|
+
if type =~ /\AArray<(.*)>/i
|
145
|
+
# check to ensure the input is an array given that the attribute
|
146
|
+
# is documented as an array but the input is not
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
148
|
+
self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) })
|
149
|
+
end
|
150
|
+
elsif !attributes[attribute_map[key]].nil?
|
151
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]]))
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
self
|
156
|
+
end
|
157
|
+
|
158
|
+
# Deserializes the data based on type
|
159
|
+
# @param string type Data type
|
160
|
+
# @param string value Value to be deserialized
|
161
|
+
# @return [Object] Deserialized data
|
162
|
+
def _deserialize(type, value)
|
163
|
+
case type.to_sym
|
164
|
+
when :Time
|
165
|
+
Time.parse(value)
|
166
|
+
when :Date
|
167
|
+
Date.parse(value)
|
168
|
+
when :String
|
169
|
+
value.to_s
|
170
|
+
when :Integer
|
171
|
+
value.to_i
|
172
|
+
when :Float
|
173
|
+
value.to_f
|
174
|
+
when :Boolean
|
175
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
176
|
+
true
|
177
|
+
else
|
178
|
+
false
|
179
|
+
end
|
180
|
+
when :File
|
181
|
+
value
|
182
|
+
when :Object
|
183
|
+
# generic object (usually a Hash), return directly
|
184
|
+
value
|
185
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
186
|
+
inner_type = Regexp.last_match[:inner_type]
|
187
|
+
value.map { |v| _deserialize(inner_type, v) }
|
188
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
189
|
+
k_type = Regexp.last_match[:k_type]
|
190
|
+
v_type = Regexp.last_match[:v_type]
|
191
|
+
{}.tap do |hash|
|
192
|
+
value.each do |k, v|
|
193
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
else # model
|
197
|
+
# models (e.g. Pet)
|
198
|
+
klass = Dropbox::Sign.const_get(type)
|
199
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the string representation of the object
|
204
|
+
# @return [String] String presentation of the object
|
205
|
+
def to_s
|
206
|
+
to_hash.to_s
|
207
|
+
end
|
208
|
+
|
209
|
+
# to_body is an alias to to_hash (backward compatibility)
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
211
|
+
def to_body
|
212
|
+
to_hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns the object in the form of hash
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
217
|
+
def to_hash(include_nil = true)
|
218
|
+
hash = {}
|
219
|
+
self.class.merged_attributes.each_pair do |attr, param|
|
220
|
+
value = self.send(attr)
|
221
|
+
if value.nil?
|
222
|
+
next unless include_nil
|
223
|
+
is_nullable = self.class.merged_nullable.include?(attr)
|
224
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
225
|
+
end
|
226
|
+
|
227
|
+
hash[param] = _to_hash(value, include_nil)
|
228
|
+
end
|
229
|
+
hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Outputs non-array value in the form of hash
|
233
|
+
# For object, use to_hash. Otherwise, just return the value
|
234
|
+
# @param [Object] value Any valid value
|
235
|
+
# @return [Hash] Returns the value in the form of hash
|
236
|
+
def _to_hash(value, include_nil = true)
|
237
|
+
if value.is_a?(Array)
|
238
|
+
value.compact.map { |v| _to_hash(v, include_nil) }
|
239
|
+
elsif value.is_a?(Hash)
|
240
|
+
{}.tap do |hash|
|
241
|
+
value.each { |k, v| hash[k] = _to_hash(v, include_nil) }
|
242
|
+
end
|
243
|
+
elsif value.respond_to? :to_hash
|
244
|
+
value.to_hash(include_nil)
|
245
|
+
else
|
246
|
+
value
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
end
|
251
|
+
|
252
|
+
end
|
@@ -38,7 +38,7 @@ module Dropbox::Sign
|
|
38
38
|
# @return [Array<TemplateResponseDocumentCustomFieldBase>]
|
39
39
|
attr_accessor :custom_fields
|
40
40
|
|
41
|
-
# An array describing static overlay fields. **
|
41
|
+
# An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.
|
42
42
|
# @return [Array<TemplateResponseDocumentStaticFieldBase>, nil]
|
43
43
|
attr_accessor :static_fields
|
44
44
|
|
@@ -17,7 +17,7 @@ module Dropbox
|
|
17
17
|
end
|
18
18
|
|
19
19
|
module Dropbox::Sign
|
20
|
-
# An array describing static overlay fields. **
|
20
|
+
# An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.
|
21
21
|
class TemplateResponseDocumentStaticFieldBase
|
22
22
|
# @return [String]
|
23
23
|
attr_accessor :type
|
@@ -42,7 +42,7 @@ module Dropbox::Sign
|
|
42
42
|
# @return [Boolean]
|
43
43
|
attr_accessor :allow_decline
|
44
44
|
|
45
|
-
# Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **
|
45
|
+
# Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.
|
46
46
|
# @return [Boolean]
|
47
47
|
attr_accessor :allow_reassign
|
48
48
|
|
@@ -80,7 +80,7 @@ module Dropbox::Sign
|
|
80
80
|
# @return [Array<SubFormFieldRule>]
|
81
81
|
attr_accessor :form_field_rules
|
82
82
|
|
83
|
-
# The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE
|
83
|
+
# The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`
|
84
84
|
# @return [Array<SubFormFieldsPerDocumentBase>]
|
85
85
|
attr_accessor :form_fields_per_document
|
86
86
|
|
@@ -151,11 +151,11 @@ module Dropbox::Sign
|
|
151
151
|
# @return [Boolean]
|
152
152
|
attr_accessor :use_text_tags
|
153
153
|
|
154
|
-
# Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.
|
154
|
+
# Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.
|
155
155
|
# @return [Boolean]
|
156
156
|
attr_accessor :populate_auto_fill_fields
|
157
157
|
|
158
|
-
# When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **
|
158
|
+
# When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **NOTE:** This does not correspond to the **expires_at** returned in the response.
|
159
159
|
# @return [Integer, nil]
|
160
160
|
attr_accessor :expires_at
|
161
161
|
|
@@ -34,7 +34,7 @@ module Dropbox::Sign
|
|
34
34
|
# @return [Boolean]
|
35
35
|
attr_accessor :allow_decline
|
36
36
|
|
37
|
-
# Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **
|
37
|
+
# Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.
|
38
38
|
# @return [Boolean]
|
39
39
|
attr_accessor :allow_reassign
|
40
40
|
|
@@ -84,7 +84,7 @@ module Dropbox::Sign
|
|
84
84
|
# @return [Hash<String, Object>]
|
85
85
|
attr_accessor :metadata
|
86
86
|
|
87
|
-
# This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). - `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience. **
|
87
|
+
# This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). - `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience. **NOTE:** This parameter overwrites `show_preview=1` (if set).
|
88
88
|
# @return [Boolean]
|
89
89
|
attr_accessor :preview_only
|
90
90
|
|
@@ -127,10 +127,14 @@ module Dropbox::Sign
|
|
127
127
|
# @return [String]
|
128
128
|
attr_accessor :title
|
129
129
|
|
130
|
-
# Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.
|
130
|
+
# Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.
|
131
131
|
# @return [Boolean]
|
132
132
|
attr_accessor :populate_auto_fill_fields
|
133
133
|
|
134
|
+
# This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft.
|
135
|
+
# @return [Boolean]
|
136
|
+
attr_accessor :allow_ccs
|
137
|
+
|
134
138
|
# Attribute mapping from ruby-style variable name to JSON key.
|
135
139
|
def self.attribute_map
|
136
140
|
{
|
@@ -162,7 +166,8 @@ module Dropbox::Sign
|
|
162
166
|
:'subject' => :'subject',
|
163
167
|
:'test_mode' => :'test_mode',
|
164
168
|
:'title' => :'title',
|
165
|
-
:'populate_auto_fill_fields' => :'populate_auto_fill_fields'
|
169
|
+
:'populate_auto_fill_fields' => :'populate_auto_fill_fields',
|
170
|
+
:'allow_ccs' => :'allow_ccs'
|
166
171
|
}
|
167
172
|
end
|
168
173
|
|
@@ -207,7 +212,8 @@ module Dropbox::Sign
|
|
207
212
|
:'subject' => :'String',
|
208
213
|
:'test_mode' => :'Boolean',
|
209
214
|
:'title' => :'String',
|
210
|
-
:'populate_auto_fill_fields' => :'Boolean'
|
215
|
+
:'populate_auto_fill_fields' => :'Boolean',
|
216
|
+
:'allow_ccs' => :'Boolean'
|
211
217
|
}
|
212
218
|
end
|
213
219
|
|
@@ -405,6 +411,12 @@ module Dropbox::Sign
|
|
405
411
|
else
|
406
412
|
self.populate_auto_fill_fields = false
|
407
413
|
end
|
414
|
+
|
415
|
+
if attributes.key?(:'allow_ccs')
|
416
|
+
self.allow_ccs = attributes[:'allow_ccs']
|
417
|
+
else
|
418
|
+
self.allow_ccs = false
|
419
|
+
end
|
408
420
|
end
|
409
421
|
|
410
422
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -519,7 +531,8 @@ module Dropbox::Sign
|
|
519
531
|
subject == o.subject &&
|
520
532
|
test_mode == o.test_mode &&
|
521
533
|
title == o.title &&
|
522
|
-
populate_auto_fill_fields == o.populate_auto_fill_fields
|
534
|
+
populate_auto_fill_fields == o.populate_auto_fill_fields &&
|
535
|
+
allow_ccs == o.allow_ccs
|
523
536
|
end
|
524
537
|
|
525
538
|
# @see the `==` method
|
@@ -531,7 +544,7 @@ module Dropbox::Sign
|
|
531
544
|
# Calculates hash code according to all attributes.
|
532
545
|
# @return [Integer] Hash code
|
533
546
|
def hash
|
534
|
-
[client_id, requester_email_address, template_ids, allow_decline, allow_reassign, ccs, custom_fields, editor_options, field_options, files, file_urls, force_signer_roles, force_subject_message, hold_request, is_for_embedded_signing, message, metadata, preview_only, requesting_redirect_url, show_preview, show_progress_stepper, signers, signing_options, signing_redirect_url, skip_me_now, subject, test_mode, title, populate_auto_fill_fields].hash
|
547
|
+
[client_id, requester_email_address, template_ids, allow_decline, allow_reassign, ccs, custom_fields, editor_options, field_options, files, file_urls, force_signer_roles, force_subject_message, hold_request, is_for_embedded_signing, message, metadata, preview_only, requesting_redirect_url, show_preview, show_progress_stepper, signers, signing_options, signing_redirect_url, skip_me_now, subject, test_mode, title, populate_auto_fill_fields, allow_ccs].hash
|
535
548
|
end
|
536
549
|
|
537
550
|
# Builds the object from hash
|
@@ -61,7 +61,7 @@ module Dropbox::Sign
|
|
61
61
|
# @return [Array<SubFormFieldRule>]
|
62
62
|
attr_accessor :form_field_rules
|
63
63
|
|
64
|
-
# The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE
|
64
|
+
# The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`
|
65
65
|
# @return [Array<SubFormFieldsPerDocumentBase>]
|
66
66
|
attr_accessor :form_fields_per_document
|
67
67
|
|
@@ -108,7 +108,7 @@ module Dropbox::Sign
|
|
108
108
|
# @return [Boolean]
|
109
109
|
attr_accessor :use_text_tags
|
110
110
|
|
111
|
-
# When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **
|
111
|
+
# When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **NOTE:** This does not correspond to the **expires_at** returned in the response.
|
112
112
|
# @return [Integer, nil]
|
113
113
|
attr_accessor :expires_at
|
114
114
|
|
data/lib/dropbox-sign/version.rb
CHANGED