signrequest_client 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -7
- data/Rakefile +0 -1
- data/docs/ApiTokensApi.md +0 -164
- data/docs/Document.md +6 -0
- data/docs/DocumentAttachment.md +1 -1
- data/docs/DocumentAttachmentsApi.md +4 -4
- data/docs/DocumentSearch.md +5 -5
- data/docs/DocumentSigningLog.md +9 -0
- data/docs/DocumentSignrequest.md +28 -0
- data/docs/DocumentTeam.md +10 -0
- data/docs/DocumentsApi.md +11 -11
- data/docs/DocumentsSearchApi.md +8 -8
- data/docs/Event.md +1 -0
- data/docs/EventsApi.md +13 -13
- data/docs/FileFromSf.md +1 -0
- data/docs/InlineResponse201.md +1 -1
- data/docs/InlineSignRequest.md +3 -0
- data/docs/SignRequest.md +4 -1
- data/docs/SignRequestQuickCreate.md +5 -1
- data/docs/Signer.md +3 -0
- data/docs/SignrequestsApi.md +5 -5
- data/docs/Team.md +2 -0
- data/docs/TeamMember.md +1 -0
- data/docs/TeamMembersApi.md +7 -7
- data/docs/TeamsApi.md +57 -3
- data/docs/Template.md +1 -0
- data/docs/TemplatesApi.md +1 -1
- data/docs/WebhookSubscription.md +1 -0
- data/docs/WebhooksApi.md +4 -4
- data/lib/signrequest_client.rb +4 -1
- data/lib/signrequest_client/api/api_tokens_api.rb +5 -170
- data/lib/signrequest_client/api/document_attachments_api.rb +11 -14
- data/lib/signrequest_client/api/documents_api.rb +14 -18
- data/lib/signrequest_client/api/documents_search_api.rb +5 -6
- data/lib/signrequest_client/api/events_api.rb +8 -10
- data/lib/signrequest_client/api/signrequest_quick_create_api.rb +5 -6
- data/lib/signrequest_client/api/signrequests_api.rb +17 -22
- data/lib/signrequest_client/api/team_members_api.rb +8 -10
- data/lib/signrequest_client/api/teams_api.rb +69 -21
- data/lib/signrequest_client/api/templates_api.rb +8 -10
- data/lib/signrequest_client/api/webhooks_api.rb +20 -26
- data/lib/signrequest_client/api_client.rb +9 -9
- data/lib/signrequest_client/api_error.rb +1 -1
- data/lib/signrequest_client/configuration.rb +2 -2
- data/lib/signrequest_client/models/auth_token.rb +16 -23
- data/lib/signrequest_client/models/document.rb +113 -45
- data/lib/signrequest_client/models/document_attachment.rb +17 -25
- data/lib/signrequest_client/models/document_search.rb +111 -122
- data/lib/signrequest_client/models/document_signer_template_conf.rb +14 -21
- data/lib/signrequest_client/models/document_signing_log.rb +209 -0
- data/lib/signrequest_client/models/document_signrequest.rb +538 -0
- data/lib/signrequest_client/models/document_team.rb +240 -0
- data/lib/signrequest_client/models/event.rb +24 -20
- data/lib/signrequest_client/models/file_from_sf.rb +40 -21
- data/lib/signrequest_client/models/inline_document_signer_integration_data.rb +9 -13
- data/lib/signrequest_client/models/inline_integration_data.rb +9 -13
- data/lib/signrequest_client/models/inline_prefill_tags.rb +8 -13
- data/lib/signrequest_client/models/inline_response_200.rb +8 -13
- data/lib/signrequest_client/models/inline_response_200_1.rb +8 -13
- data/lib/signrequest_client/models/inline_response_200_2.rb +8 -13
- data/lib/signrequest_client/models/inline_response_200_3.rb +8 -13
- data/lib/signrequest_client/models/inline_response_200_4.rb +8 -13
- data/lib/signrequest_client/models/inline_response_200_5.rb +8 -13
- data/lib/signrequest_client/models/inline_response_200_6.rb +8 -13
- data/lib/signrequest_client/models/inline_response_200_7.rb +8 -13
- data/lib/signrequest_client/models/inline_response_200_8.rb +8 -13
- data/lib/signrequest_client/models/inline_response_200_9.rb +8 -13
- data/lib/signrequest_client/models/inline_response_201.rb +27 -31
- data/lib/signrequest_client/models/inline_response_201_1.rb +11 -15
- data/lib/signrequest_client/models/inline_sign_request.rb +69 -35
- data/lib/signrequest_client/models/inline_team.rb +12 -19
- data/lib/signrequest_client/models/inline_team_member.rb +8 -14
- data/lib/signrequest_client/models/invite_member.rb +10 -15
- data/lib/signrequest_client/models/placeholder.rb +15 -21
- data/lib/signrequest_client/models/required_attachment.rb +14 -20
- data/lib/signrequest_client/models/sign_request.rb +75 -40
- data/lib/signrequest_client/models/sign_request_quick_create.rb +124 -61
- data/lib/signrequest_client/models/signer.rb +103 -60
- data/lib/signrequest_client/models/signer_attachment.rb +10 -17
- data/lib/signrequest_client/models/signer_inputs.rb +14 -20
- data/lib/signrequest_client/models/signing_log.rb +8 -14
- data/lib/signrequest_client/models/team.rb +55 -34
- data/lib/signrequest_client/models/team_member.rb +18 -15
- data/lib/signrequest_client/models/template.rb +23 -20
- data/lib/signrequest_client/models/user.rb +18 -26
- data/lib/signrequest_client/models/webhook_subscription.rb +33 -30
- data/lib/signrequest_client/version.rb +2 -2
- data/signrequest_client-1.0.0.gem +0 -0
- data/signrequest_client.gemspec +4 -4
- data/spec/models/document_signing_log_spec.rb +47 -0
- data/spec/models/document_signrequest_spec.rb +165 -0
- data/spec/models/document_team_spec.rb +53 -0
- metadata +28 -42
@@ -0,0 +1,240 @@
|
|
1
|
+
=begin
|
2
|
+
#SignRequest API
|
3
|
+
|
4
|
+
#API for SignRequest.com
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: tech-support@signrequest.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.8
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module SignRequestClient
|
16
|
+
class DocumentTeam
|
17
|
+
attr_accessor :name
|
18
|
+
|
19
|
+
attr_accessor :subdomain
|
20
|
+
|
21
|
+
attr_accessor :url
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'name' => :'name',
|
27
|
+
:'subdomain' => :'subdomain',
|
28
|
+
:'url' => :'url'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'name' => :'String',
|
36
|
+
:'subdomain' => :'String',
|
37
|
+
:'url' => :'String'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
48
|
+
|
49
|
+
if attributes.has_key?(:'name')
|
50
|
+
self.name = attributes[:'name']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.has_key?(:'subdomain')
|
54
|
+
self.subdomain = attributes[:'subdomain']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes.has_key?(:'url')
|
58
|
+
self.url = attributes[:'url']
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
63
|
+
# @return Array for valid properties with the reasons
|
64
|
+
def list_invalid_properties
|
65
|
+
invalid_properties = Array.new
|
66
|
+
if !@name.nil? && @name.to_s.length < 1
|
67
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
68
|
+
end
|
69
|
+
|
70
|
+
if !@subdomain.nil? && @subdomain.to_s.length < 1
|
71
|
+
invalid_properties.push('invalid value for "subdomain", the character length must be great than or equal to 1.')
|
72
|
+
end
|
73
|
+
|
74
|
+
if !@subdomain.nil? && @subdomain !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
75
|
+
invalid_properties.push('invalid value for "subdomain", must conform to the pattern /^[-a-zA-Z0-9_]+$/.')
|
76
|
+
end
|
77
|
+
|
78
|
+
invalid_properties
|
79
|
+
end
|
80
|
+
|
81
|
+
# Check to see if the all the properties in the model are valid
|
82
|
+
# @return true if the model is valid
|
83
|
+
def valid?
|
84
|
+
return false if !@name.nil? && @name.to_s.length < 1
|
85
|
+
return false if !@subdomain.nil? && @subdomain.to_s.length < 1
|
86
|
+
return false if !@subdomain.nil? && @subdomain !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
87
|
+
true
|
88
|
+
end
|
89
|
+
|
90
|
+
# Custom attribute writer method with validation
|
91
|
+
# @param [Object] name Value to be assigned
|
92
|
+
def name=(name)
|
93
|
+
if !name.nil? && name.to_s.length < 1
|
94
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
95
|
+
end
|
96
|
+
|
97
|
+
@name = name
|
98
|
+
end
|
99
|
+
|
100
|
+
# Custom attribute writer method with validation
|
101
|
+
# @param [Object] subdomain Value to be assigned
|
102
|
+
def subdomain=(subdomain)
|
103
|
+
if !subdomain.nil? && subdomain.to_s.length < 1
|
104
|
+
fail ArgumentError, 'invalid value for "subdomain", the character length must be great than or equal to 1.'
|
105
|
+
end
|
106
|
+
|
107
|
+
if !subdomain.nil? && subdomain !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
108
|
+
fail ArgumentError, 'invalid value for "subdomain", must conform to the pattern /^[-a-zA-Z0-9_]+$/.'
|
109
|
+
end
|
110
|
+
|
111
|
+
@subdomain = subdomain
|
112
|
+
end
|
113
|
+
|
114
|
+
# Checks equality by comparing each attribute.
|
115
|
+
# @param [Object] Object to be compared
|
116
|
+
def ==(o)
|
117
|
+
return true if self.equal?(o)
|
118
|
+
self.class == o.class &&
|
119
|
+
name == o.name &&
|
120
|
+
subdomain == o.subdomain &&
|
121
|
+
url == o.url
|
122
|
+
end
|
123
|
+
|
124
|
+
# @see the `==` method
|
125
|
+
# @param [Object] Object to be compared
|
126
|
+
def eql?(o)
|
127
|
+
self == o
|
128
|
+
end
|
129
|
+
|
130
|
+
# Calculates hash code according to all attributes.
|
131
|
+
# @return [Fixnum] Hash code
|
132
|
+
def hash
|
133
|
+
[name, subdomain, url].hash
|
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
|
+
self.class.swagger_types.each_pair do |key, type|
|
142
|
+
if type =~ /\AArray<(.*)>/i
|
143
|
+
# check to ensure the input is an array given that the the attribute
|
144
|
+
# is documented as an array but the input is not
|
145
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
146
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
147
|
+
end
|
148
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
149
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
150
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
151
|
+
end
|
152
|
+
|
153
|
+
self
|
154
|
+
end
|
155
|
+
|
156
|
+
# Deserializes the data based on type
|
157
|
+
# @param string type Data type
|
158
|
+
# @param string value Value to be deserialized
|
159
|
+
# @return [Object] Deserialized data
|
160
|
+
def _deserialize(type, value)
|
161
|
+
case type.to_sym
|
162
|
+
when :DateTime
|
163
|
+
DateTime.parse(value)
|
164
|
+
when :Date
|
165
|
+
Date.parse(value)
|
166
|
+
when :String
|
167
|
+
value.to_s
|
168
|
+
when :Integer
|
169
|
+
value.to_i
|
170
|
+
when :Float
|
171
|
+
value.to_f
|
172
|
+
when :BOOLEAN
|
173
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
174
|
+
true
|
175
|
+
else
|
176
|
+
false
|
177
|
+
end
|
178
|
+
when :Object
|
179
|
+
# generic object (usually a Hash), return directly
|
180
|
+
value
|
181
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
182
|
+
inner_type = Regexp.last_match[:inner_type]
|
183
|
+
value.map { |v| _deserialize(inner_type, v) }
|
184
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
185
|
+
k_type = Regexp.last_match[:k_type]
|
186
|
+
v_type = Regexp.last_match[:v_type]
|
187
|
+
{}.tap do |hash|
|
188
|
+
value.each do |k, v|
|
189
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
else # model
|
193
|
+
temp_model = SignRequestClient.const_get(type).new
|
194
|
+
temp_model.build_from_hash(value)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the string representation of the object
|
199
|
+
# @return [String] String presentation of the object
|
200
|
+
def to_s
|
201
|
+
to_hash.to_s
|
202
|
+
end
|
203
|
+
|
204
|
+
# to_body is an alias to to_hash (backward compatibility)
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_body
|
207
|
+
to_hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns the object in the form of hash
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
212
|
+
def to_hash
|
213
|
+
hash = {}
|
214
|
+
self.class.attribute_map.each_pair do |attr, param|
|
215
|
+
value = self.send(attr)
|
216
|
+
next if value.nil?
|
217
|
+
hash[param] = _to_hash(value)
|
218
|
+
end
|
219
|
+
hash
|
220
|
+
end
|
221
|
+
|
222
|
+
# Outputs non-array value in the form of hash
|
223
|
+
# For object, use to_hash. Otherwise, just return the value
|
224
|
+
# @param [Object] value Any valid value
|
225
|
+
# @return [Hash] Returns the value in the form of hash
|
226
|
+
def _to_hash(value)
|
227
|
+
if value.is_a?(Array)
|
228
|
+
value.compact.map { |v| _to_hash(v) }
|
229
|
+
elsif value.is_a?(Hash)
|
230
|
+
{}.tap do |hash|
|
231
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
232
|
+
end
|
233
|
+
elsif value.respond_to? :to_hash
|
234
|
+
value.to_hash
|
235
|
+
else
|
236
|
+
value
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
@@ -6,14 +6,13 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
Contact: tech-support@signrequest.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.8
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module SignRequestClient
|
16
|
-
|
17
16
|
class Event
|
18
17
|
attr_accessor :uuid
|
19
18
|
|
@@ -29,6 +28,8 @@ module SignRequestClient
|
|
29
28
|
|
30
29
|
attr_accessor :timestamp
|
31
30
|
|
31
|
+
attr_accessor :team
|
32
|
+
|
32
33
|
attr_accessor :document
|
33
34
|
|
34
35
|
attr_accessor :signer
|
@@ -65,6 +66,7 @@ module SignRequestClient
|
|
65
66
|
:'delivered_on' => :'delivered_on',
|
66
67
|
:'callback_status_code' => :'callback_status_code',
|
67
68
|
:'timestamp' => :'timestamp',
|
69
|
+
:'team' => :'team',
|
68
70
|
:'document' => :'document',
|
69
71
|
:'signer' => :'signer'
|
70
72
|
}
|
@@ -80,6 +82,7 @@ module SignRequestClient
|
|
80
82
|
:'delivered_on' => :'DateTime',
|
81
83
|
:'callback_status_code' => :'Integer',
|
82
84
|
:'timestamp' => :'DateTime',
|
85
|
+
:'team' => :'DocumentTeam',
|
83
86
|
:'document' => :'Document',
|
84
87
|
:'signer' => :'Signer'
|
85
88
|
}
|
@@ -91,7 +94,7 @@ module SignRequestClient
|
|
91
94
|
return unless attributes.is_a?(Hash)
|
92
95
|
|
93
96
|
# convert string to symbol for hash key
|
94
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
97
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
95
98
|
|
96
99
|
if attributes.has_key?(:'uuid')
|
97
100
|
self.uuid = attributes[:'uuid']
|
@@ -121,6 +124,10 @@ module SignRequestClient
|
|
121
124
|
self.timestamp = attributes[:'timestamp']
|
122
125
|
end
|
123
126
|
|
127
|
+
if attributes.has_key?(:'team')
|
128
|
+
self.team = attributes[:'team']
|
129
|
+
end
|
130
|
+
|
124
131
|
if attributes.has_key?(:'document')
|
125
132
|
self.document = attributes[:'document']
|
126
133
|
end
|
@@ -128,7 +135,6 @@ module SignRequestClient
|
|
128
135
|
if attributes.has_key?(:'signer')
|
129
136
|
self.signer = attributes[:'signer']
|
130
137
|
end
|
131
|
-
|
132
138
|
end
|
133
139
|
|
134
140
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -136,29 +142,28 @@ module SignRequestClient
|
|
136
142
|
def list_invalid_properties
|
137
143
|
invalid_properties = Array.new
|
138
144
|
if !@uuid.nil? && @uuid.to_s.length < 1
|
139
|
-
invalid_properties.push(
|
145
|
+
invalid_properties.push('invalid value for "uuid", the character length must be great than or equal to 1.')
|
140
146
|
end
|
141
147
|
|
142
|
-
|
148
|
+
invalid_properties
|
143
149
|
end
|
144
150
|
|
145
151
|
# Check to see if the all the properties in the model are valid
|
146
152
|
# @return true if the model is valid
|
147
153
|
def valid?
|
148
154
|
return false if !@uuid.nil? && @uuid.to_s.length < 1
|
149
|
-
status_validator = EnumAttributeValidator.new('String', [
|
155
|
+
status_validator = EnumAttributeValidator.new('String', ['ok', 'error'])
|
150
156
|
return false unless status_validator.valid?(@status)
|
151
|
-
event_type_validator = EnumAttributeValidator.new('String', [
|
157
|
+
event_type_validator = EnumAttributeValidator.new('String', ['convert_error', 'converted', 'sending_error', 'sent', 'declined', 'cancelled', 'expired', 'signed', 'viewed', 'downloaded', 'signer_signed', 'signer_email_bounced', 'signer_viewed_email', 'signer_viewed', 'signer_forwarded', 'signer_downloaded', 'signrequest_received'])
|
152
158
|
return false unless event_type_validator.valid?(@event_type)
|
153
|
-
|
159
|
+
true
|
154
160
|
end
|
155
161
|
|
156
162
|
# Custom attribute writer method with validation
|
157
163
|
# @param [Object] uuid Value to be assigned
|
158
164
|
def uuid=(uuid)
|
159
|
-
|
160
165
|
if !uuid.nil? && uuid.to_s.length < 1
|
161
|
-
fail ArgumentError,
|
166
|
+
fail ArgumentError, 'invalid value for "uuid", the character length must be great than or equal to 1.'
|
162
167
|
end
|
163
168
|
|
164
169
|
@uuid = uuid
|
@@ -167,9 +172,9 @@ module SignRequestClient
|
|
167
172
|
# Custom attribute writer method checking allowed values (enum).
|
168
173
|
# @param [Object] status Object to be assigned
|
169
174
|
def status=(status)
|
170
|
-
validator = EnumAttributeValidator.new('String', [
|
175
|
+
validator = EnumAttributeValidator.new('String', ['ok', 'error'])
|
171
176
|
unless validator.valid?(status)
|
172
|
-
fail ArgumentError,
|
177
|
+
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
|
173
178
|
end
|
174
179
|
@status = status
|
175
180
|
end
|
@@ -177,9 +182,9 @@ module SignRequestClient
|
|
177
182
|
# Custom attribute writer method checking allowed values (enum).
|
178
183
|
# @param [Object] event_type Object to be assigned
|
179
184
|
def event_type=(event_type)
|
180
|
-
validator = EnumAttributeValidator.new('String', [
|
185
|
+
validator = EnumAttributeValidator.new('String', ['convert_error', 'converted', 'sending_error', 'sent', 'declined', 'cancelled', 'expired', 'signed', 'viewed', 'downloaded', 'signer_signed', 'signer_email_bounced', 'signer_viewed_email', 'signer_viewed', 'signer_forwarded', 'signer_downloaded', 'signrequest_received'])
|
181
186
|
unless validator.valid?(event_type)
|
182
|
-
fail ArgumentError,
|
187
|
+
fail ArgumentError, 'invalid value for "event_type", must be one of #{validator.allowable_values}.'
|
183
188
|
end
|
184
189
|
@event_type = event_type
|
185
190
|
end
|
@@ -196,6 +201,7 @@ module SignRequestClient
|
|
196
201
|
delivered_on == o.delivered_on &&
|
197
202
|
callback_status_code == o.callback_status_code &&
|
198
203
|
timestamp == o.timestamp &&
|
204
|
+
team == o.team &&
|
199
205
|
document == o.document &&
|
200
206
|
signer == o.signer
|
201
207
|
end
|
@@ -209,7 +215,7 @@ module SignRequestClient
|
|
209
215
|
# Calculates hash code according to all attributes.
|
210
216
|
# @return [Fixnum] Hash code
|
211
217
|
def hash
|
212
|
-
[uuid, status, event_type, delivered, delivered_on, callback_status_code, timestamp, document, signer].hash
|
218
|
+
[uuid, status, event_type, delivered, delivered_on, callback_status_code, timestamp, team, document, signer].hash
|
213
219
|
end
|
214
220
|
|
215
221
|
# Builds the object from hash
|
@@ -222,7 +228,7 @@ module SignRequestClient
|
|
222
228
|
# check to ensure the input is an array given that the the attribute
|
223
229
|
# is documented as an array but the input is not
|
224
230
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
225
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
231
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
226
232
|
end
|
227
233
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
228
234
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -304,7 +310,7 @@ module SignRequestClient
|
|
304
310
|
# @return [Hash] Returns the value in the form of hash
|
305
311
|
def _to_hash(value)
|
306
312
|
if value.is_a?(Array)
|
307
|
-
value.compact.map{ |v| _to_hash(v) }
|
313
|
+
value.compact.map { |v| _to_hash(v) }
|
308
314
|
elsif value.is_a?(Hash)
|
309
315
|
{}.tap do |hash|
|
310
316
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -315,7 +321,5 @@ module SignRequestClient
|
|
315
321
|
value
|
316
322
|
end
|
317
323
|
end
|
318
|
-
|
319
324
|
end
|
320
|
-
|
321
325
|
end
|
@@ -6,25 +6,26 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
Contact: tech-support@signrequest.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.8
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module SignRequestClient
|
16
|
-
|
17
16
|
class FileFromSf
|
18
17
|
attr_accessor :object_type
|
19
18
|
|
20
19
|
attr_accessor :object_id
|
21
20
|
|
21
|
+
attr_accessor :uid
|
22
22
|
|
23
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
24
|
def self.attribute_map
|
25
25
|
{
|
26
26
|
:'object_type' => :'object_type',
|
27
|
-
:'object_id' => :'object_id'
|
27
|
+
:'object_id' => :'object_id',
|
28
|
+
:'uid' => :'uid'
|
28
29
|
}
|
29
30
|
end
|
30
31
|
|
@@ -32,7 +33,8 @@ module SignRequestClient
|
|
32
33
|
def self.swagger_types
|
33
34
|
{
|
34
35
|
:'object_type' => :'String',
|
35
|
-
:'object_id' => :'String'
|
36
|
+
:'object_id' => :'String',
|
37
|
+
:'uid' => :'String'
|
36
38
|
}
|
37
39
|
end
|
38
40
|
|
@@ -42,7 +44,7 @@ module SignRequestClient
|
|
42
44
|
return unless attributes.is_a?(Hash)
|
43
45
|
|
44
46
|
# convert string to symbol for hash key
|
45
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
48
|
|
47
49
|
if attributes.has_key?(:'object_type')
|
48
50
|
self.object_type = attributes[:'object_type']
|
@@ -52,6 +54,9 @@ module SignRequestClient
|
|
52
54
|
self.object_id = attributes[:'object_id']
|
53
55
|
end
|
54
56
|
|
57
|
+
if attributes.has_key?(:'uid')
|
58
|
+
self.uid = attributes[:'uid']
|
59
|
+
end
|
55
60
|
end
|
56
61
|
|
57
62
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -59,22 +64,26 @@ module SignRequestClient
|
|
59
64
|
def list_invalid_properties
|
60
65
|
invalid_properties = Array.new
|
61
66
|
if @object_type.nil?
|
62
|
-
invalid_properties.push(
|
67
|
+
invalid_properties.push('invalid value for "object_type", object_type cannot be nil.')
|
63
68
|
end
|
64
69
|
|
65
70
|
if @object_type.to_s.length < 1
|
66
|
-
invalid_properties.push(
|
71
|
+
invalid_properties.push('invalid value for "object_type", the character length must be great than or equal to 1.')
|
67
72
|
end
|
68
73
|
|
69
74
|
if @object_id.nil?
|
70
|
-
invalid_properties.push(
|
75
|
+
invalid_properties.push('invalid value for "object_id", object_id cannot be nil.')
|
71
76
|
end
|
72
77
|
|
73
78
|
if @object_id.to_s.length < 1
|
74
|
-
invalid_properties.push(
|
79
|
+
invalid_properties.push('invalid value for "object_id", the character length must be great than or equal to 1.')
|
80
|
+
end
|
81
|
+
|
82
|
+
if !@uid.nil? && @uid.to_s.length < 1
|
83
|
+
invalid_properties.push('invalid value for "uid", the character length must be great than or equal to 1.')
|
75
84
|
end
|
76
85
|
|
77
|
-
|
86
|
+
invalid_properties
|
78
87
|
end
|
79
88
|
|
80
89
|
# Check to see if the all the properties in the model are valid
|
@@ -84,18 +93,19 @@ module SignRequestClient
|
|
84
93
|
return false if @object_type.to_s.length < 1
|
85
94
|
return false if @object_id.nil?
|
86
95
|
return false if @object_id.to_s.length < 1
|
87
|
-
return
|
96
|
+
return false if !@uid.nil? && @uid.to_s.length < 1
|
97
|
+
true
|
88
98
|
end
|
89
99
|
|
90
100
|
# Custom attribute writer method with validation
|
91
101
|
# @param [Object] object_type Value to be assigned
|
92
102
|
def object_type=(object_type)
|
93
103
|
if object_type.nil?
|
94
|
-
fail ArgumentError,
|
104
|
+
fail ArgumentError, 'object_type cannot be nil'
|
95
105
|
end
|
96
106
|
|
97
107
|
if object_type.to_s.length < 1
|
98
|
-
fail ArgumentError,
|
108
|
+
fail ArgumentError, 'invalid value for "object_type", the character length must be great than or equal to 1.'
|
99
109
|
end
|
100
110
|
|
101
111
|
@object_type = object_type
|
@@ -105,23 +115,34 @@ module SignRequestClient
|
|
105
115
|
# @param [Object] object_id Value to be assigned
|
106
116
|
def object_id=(object_id)
|
107
117
|
if object_id.nil?
|
108
|
-
fail ArgumentError,
|
118
|
+
fail ArgumentError, 'object_id cannot be nil'
|
109
119
|
end
|
110
120
|
|
111
121
|
if object_id.to_s.length < 1
|
112
|
-
fail ArgumentError,
|
122
|
+
fail ArgumentError, 'invalid value for "object_id", the character length must be great than or equal to 1.'
|
113
123
|
end
|
114
124
|
|
115
125
|
@object_id = object_id
|
116
126
|
end
|
117
127
|
|
128
|
+
# Custom attribute writer method with validation
|
129
|
+
# @param [Object] uid Value to be assigned
|
130
|
+
def uid=(uid)
|
131
|
+
if !uid.nil? && uid.to_s.length < 1
|
132
|
+
fail ArgumentError, 'invalid value for "uid", the character length must be great than or equal to 1.'
|
133
|
+
end
|
134
|
+
|
135
|
+
@uid = uid
|
136
|
+
end
|
137
|
+
|
118
138
|
# Checks equality by comparing each attribute.
|
119
139
|
# @param [Object] Object to be compared
|
120
140
|
def ==(o)
|
121
141
|
return true if self.equal?(o)
|
122
142
|
self.class == o.class &&
|
123
143
|
object_type == o.object_type &&
|
124
|
-
object_id == o.object_id
|
144
|
+
object_id == o.object_id &&
|
145
|
+
uid == o.uid
|
125
146
|
end
|
126
147
|
|
127
148
|
# @see the `==` method
|
@@ -133,7 +154,7 @@ module SignRequestClient
|
|
133
154
|
# Calculates hash code according to all attributes.
|
134
155
|
# @return [Fixnum] Hash code
|
135
156
|
def hash
|
136
|
-
[object_type, object_id].hash
|
157
|
+
[object_type, object_id, uid].hash
|
137
158
|
end
|
138
159
|
|
139
160
|
# Builds the object from hash
|
@@ -146,7 +167,7 @@ module SignRequestClient
|
|
146
167
|
# check to ensure the input is an array given that the the attribute
|
147
168
|
# is documented as an array but the input is not
|
148
169
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
149
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
170
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
150
171
|
end
|
151
172
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
152
173
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -228,7 +249,7 @@ module SignRequestClient
|
|
228
249
|
# @return [Hash] Returns the value in the form of hash
|
229
250
|
def _to_hash(value)
|
230
251
|
if value.is_a?(Array)
|
231
|
-
value.compact.map{ |v| _to_hash(v) }
|
252
|
+
value.compact.map { |v| _to_hash(v) }
|
232
253
|
elsif value.is_a?(Hash)
|
233
254
|
{}.tap do |hash|
|
234
255
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -239,7 +260,5 @@ module SignRequestClient
|
|
239
260
|
value
|
240
261
|
end
|
241
262
|
end
|
242
|
-
|
243
263
|
end
|
244
|
-
|
245
264
|
end
|