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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -7
  3. data/Rakefile +0 -1
  4. data/docs/ApiTokensApi.md +0 -164
  5. data/docs/Document.md +6 -0
  6. data/docs/DocumentAttachment.md +1 -1
  7. data/docs/DocumentAttachmentsApi.md +4 -4
  8. data/docs/DocumentSearch.md +5 -5
  9. data/docs/DocumentSigningLog.md +9 -0
  10. data/docs/DocumentSignrequest.md +28 -0
  11. data/docs/DocumentTeam.md +10 -0
  12. data/docs/DocumentsApi.md +11 -11
  13. data/docs/DocumentsSearchApi.md +8 -8
  14. data/docs/Event.md +1 -0
  15. data/docs/EventsApi.md +13 -13
  16. data/docs/FileFromSf.md +1 -0
  17. data/docs/InlineResponse201.md +1 -1
  18. data/docs/InlineSignRequest.md +3 -0
  19. data/docs/SignRequest.md +4 -1
  20. data/docs/SignRequestQuickCreate.md +5 -1
  21. data/docs/Signer.md +3 -0
  22. data/docs/SignrequestsApi.md +5 -5
  23. data/docs/Team.md +2 -0
  24. data/docs/TeamMember.md +1 -0
  25. data/docs/TeamMembersApi.md +7 -7
  26. data/docs/TeamsApi.md +57 -3
  27. data/docs/Template.md +1 -0
  28. data/docs/TemplatesApi.md +1 -1
  29. data/docs/WebhookSubscription.md +1 -0
  30. data/docs/WebhooksApi.md +4 -4
  31. data/lib/signrequest_client.rb +4 -1
  32. data/lib/signrequest_client/api/api_tokens_api.rb +5 -170
  33. data/lib/signrequest_client/api/document_attachments_api.rb +11 -14
  34. data/lib/signrequest_client/api/documents_api.rb +14 -18
  35. data/lib/signrequest_client/api/documents_search_api.rb +5 -6
  36. data/lib/signrequest_client/api/events_api.rb +8 -10
  37. data/lib/signrequest_client/api/signrequest_quick_create_api.rb +5 -6
  38. data/lib/signrequest_client/api/signrequests_api.rb +17 -22
  39. data/lib/signrequest_client/api/team_members_api.rb +8 -10
  40. data/lib/signrequest_client/api/teams_api.rb +69 -21
  41. data/lib/signrequest_client/api/templates_api.rb +8 -10
  42. data/lib/signrequest_client/api/webhooks_api.rb +20 -26
  43. data/lib/signrequest_client/api_client.rb +9 -9
  44. data/lib/signrequest_client/api_error.rb +1 -1
  45. data/lib/signrequest_client/configuration.rb +2 -2
  46. data/lib/signrequest_client/models/auth_token.rb +16 -23
  47. data/lib/signrequest_client/models/document.rb +113 -45
  48. data/lib/signrequest_client/models/document_attachment.rb +17 -25
  49. data/lib/signrequest_client/models/document_search.rb +111 -122
  50. data/lib/signrequest_client/models/document_signer_template_conf.rb +14 -21
  51. data/lib/signrequest_client/models/document_signing_log.rb +209 -0
  52. data/lib/signrequest_client/models/document_signrequest.rb +538 -0
  53. data/lib/signrequest_client/models/document_team.rb +240 -0
  54. data/lib/signrequest_client/models/event.rb +24 -20
  55. data/lib/signrequest_client/models/file_from_sf.rb +40 -21
  56. data/lib/signrequest_client/models/inline_document_signer_integration_data.rb +9 -13
  57. data/lib/signrequest_client/models/inline_integration_data.rb +9 -13
  58. data/lib/signrequest_client/models/inline_prefill_tags.rb +8 -13
  59. data/lib/signrequest_client/models/inline_response_200.rb +8 -13
  60. data/lib/signrequest_client/models/inline_response_200_1.rb +8 -13
  61. data/lib/signrequest_client/models/inline_response_200_2.rb +8 -13
  62. data/lib/signrequest_client/models/inline_response_200_3.rb +8 -13
  63. data/lib/signrequest_client/models/inline_response_200_4.rb +8 -13
  64. data/lib/signrequest_client/models/inline_response_200_5.rb +8 -13
  65. data/lib/signrequest_client/models/inline_response_200_6.rb +8 -13
  66. data/lib/signrequest_client/models/inline_response_200_7.rb +8 -13
  67. data/lib/signrequest_client/models/inline_response_200_8.rb +8 -13
  68. data/lib/signrequest_client/models/inline_response_200_9.rb +8 -13
  69. data/lib/signrequest_client/models/inline_response_201.rb +27 -31
  70. data/lib/signrequest_client/models/inline_response_201_1.rb +11 -15
  71. data/lib/signrequest_client/models/inline_sign_request.rb +69 -35
  72. data/lib/signrequest_client/models/inline_team.rb +12 -19
  73. data/lib/signrequest_client/models/inline_team_member.rb +8 -14
  74. data/lib/signrequest_client/models/invite_member.rb +10 -15
  75. data/lib/signrequest_client/models/placeholder.rb +15 -21
  76. data/lib/signrequest_client/models/required_attachment.rb +14 -20
  77. data/lib/signrequest_client/models/sign_request.rb +75 -40
  78. data/lib/signrequest_client/models/sign_request_quick_create.rb +124 -61
  79. data/lib/signrequest_client/models/signer.rb +103 -60
  80. data/lib/signrequest_client/models/signer_attachment.rb +10 -17
  81. data/lib/signrequest_client/models/signer_inputs.rb +14 -20
  82. data/lib/signrequest_client/models/signing_log.rb +8 -14
  83. data/lib/signrequest_client/models/team.rb +55 -34
  84. data/lib/signrequest_client/models/team_member.rb +18 -15
  85. data/lib/signrequest_client/models/template.rb +23 -20
  86. data/lib/signrequest_client/models/user.rb +18 -26
  87. data/lib/signrequest_client/models/webhook_subscription.rb +33 -30
  88. data/lib/signrequest_client/version.rb +2 -2
  89. data/signrequest_client-1.0.0.gem +0 -0
  90. data/signrequest_client.gemspec +4 -4
  91. data/spec/models/document_signing_log_spec.rb +47 -0
  92. data/spec/models/document_signrequest_spec.rb +165 -0
  93. data/spec/models/document_team_spec.rb +53 -0
  94. metadata +28 -42
@@ -6,7 +6,7 @@
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.3.1
9
+ Swagger Codegen version: 2.4.8
10
10
 
11
11
  =end
12
12
 
@@ -33,7 +33,7 @@ module SignRequestClient
33
33
  @config = config
34
34
  @user_agent = "Swagger-Codegen/#{VERSION}/ruby"
35
35
  @default_headers = {
36
- 'Content-Type' => "application/json",
36
+ 'Content-Type' => 'application/json',
37
37
  'User-Agent' => @user_agent
38
38
  }
39
39
  end
@@ -137,7 +137,7 @@ module SignRequestClient
137
137
  # @param [String] mime MIME
138
138
  # @return [Boolean] True if the MIME is application/json
139
139
  def json_mime?(mime)
140
- (mime == "*/*") || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
140
+ (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
141
141
  end
142
142
 
143
143
  # Deserialize the response to the given return type.
@@ -201,12 +201,12 @@ module SignRequestClient
201
201
  when /\AArray<(.+)>\z/
202
202
  # e.g. Array<Pet>
203
203
  sub_type = $1
204
- data.map {|item| convert_to_type(item, sub_type) }
204
+ data.map { |item| convert_to_type(item, sub_type) }
205
205
  when /\AHash\<String, (.+)\>\z/
206
206
  # e.g. Hash<String, Integer>
207
207
  sub_type = $1
208
208
  {}.tap do |hash|
209
- data.each {|k, v| hash[k] = convert_to_type(v, sub_type) }
209
+ data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
210
210
  end
211
211
  else
212
212
  # models, e.g. Pet
@@ -228,7 +228,7 @@ module SignRequestClient
228
228
  encoding = nil
229
229
  request.on_headers do |response|
230
230
  content_disposition = response.headers['Content-Disposition']
231
- if content_disposition and content_disposition =~ /filename=/i
231
+ if content_disposition && content_disposition =~ /filename=/i
232
232
  filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
233
233
  prefix = sanitize_filename(filename)
234
234
  else
@@ -327,7 +327,7 @@ module SignRequestClient
327
327
  return nil if accepts.nil? || accepts.empty?
328
328
  # use JSON when present, otherwise use all of the provided
329
329
  json_accept = accepts.find { |s| json_mime?(s) }
330
- return json_accept || accepts.join(',')
330
+ json_accept || accepts.join(',')
331
331
  end
332
332
 
333
333
  # Return Content-Type header based on an array of content types provided.
@@ -338,7 +338,7 @@ module SignRequestClient
338
338
  return 'application/json' if content_types.nil? || content_types.empty?
339
339
  # use JSON when present, otherwise use the first one
340
340
  json_content_type = content_types.find { |s| json_mime?(s) }
341
- return json_content_type || content_types.first
341
+ json_content_type || content_types.first
342
342
  end
343
343
 
344
344
  # Convert object (array, hash, object, etc) to JSON string.
@@ -348,7 +348,7 @@ module SignRequestClient
348
348
  return model if model.nil? || model.is_a?(String)
349
349
  local_body = nil
350
350
  if model.is_a?(Array)
351
- local_body = model.map{|m| object_to_hash(m) }
351
+ local_body = model.map { |m| object_to_hash(m) }
352
352
  else
353
353
  local_body = object_to_hash(model)
354
354
  end
@@ -6,7 +6,7 @@
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.3.1
9
+ Swagger Codegen version: 2.4.8
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
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.3.1
9
+ Swagger Codegen version: 2.4.8
10
10
 
11
11
  =end
12
12
 
@@ -170,7 +170,7 @@ module SignRequestClient
170
170
  def base_path=(base_path)
171
171
  # Add leading and trailing slashes to base_path
172
172
  @base_path = "/#{base_path}".gsub(/\/+/, '/')
173
- @base_path = "" if @base_path == "/"
173
+ @base_path = '' if @base_path == '/'
174
174
  end
175
175
 
176
176
  def base_url
@@ -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.3.1
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 AuthToken
18
17
  attr_accessor :email
19
18
 
@@ -27,7 +26,6 @@ module SignRequestClient
27
26
 
28
27
  attr_accessor :url
29
28
 
30
-
31
29
  # Attribute mapping from ruby-style variable name to JSON key.
32
30
  def self.attribute_map
33
31
  {
@@ -58,7 +56,7 @@ module SignRequestClient
58
56
  return unless attributes.is_a?(Hash)
59
57
 
60
58
  # convert string to symbol for hash key
61
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
59
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
62
60
 
63
61
  if attributes.has_key?(:'email')
64
62
  self.email = attributes[:'email']
@@ -83,7 +81,6 @@ module SignRequestClient
83
81
  if attributes.has_key?(:'url')
84
82
  self.url = attributes[:'url']
85
83
  end
86
-
87
84
  end
88
85
 
89
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -91,26 +88,26 @@ module SignRequestClient
91
88
  def list_invalid_properties
92
89
  invalid_properties = Array.new
93
90
  if @subdomain.nil?
94
- invalid_properties.push("invalid value for 'subdomain', subdomain cannot be nil.")
91
+ invalid_properties.push('invalid value for "subdomain", subdomain cannot be nil.')
95
92
  end
96
93
 
97
94
  if @subdomain.to_s.length < 1
98
- invalid_properties.push("invalid value for 'subdomain', the character length must be great than or equal to 1.")
95
+ invalid_properties.push('invalid value for "subdomain", the character length must be great than or equal to 1.')
99
96
  end
100
97
 
101
98
  if @subdomain !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
102
- invalid_properties.push("invalid value for 'subdomain', must conform to the pattern /^[-a-zA-Z0-9_]+$/.")
99
+ invalid_properties.push('invalid value for "subdomain", must conform to the pattern /^[-a-zA-Z0-9_]+$/.')
103
100
  end
104
101
 
105
102
  if !@name.nil? && @name.to_s.length < 1
106
- invalid_properties.push("invalid value for 'name', the character length must be great than or equal to 1.")
103
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
107
104
  end
108
105
 
109
106
  if !@key.nil? && @key.to_s.length < 1
110
- invalid_properties.push("invalid value for 'key', the character length must be great than or equal to 1.")
107
+ invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.')
111
108
  end
112
109
 
113
- return invalid_properties
110
+ invalid_properties
114
111
  end
115
112
 
116
113
  # Check to see if the all the properties in the model are valid
@@ -121,22 +118,22 @@ module SignRequestClient
121
118
  return false if @subdomain !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
122
119
  return false if !@name.nil? && @name.to_s.length < 1
123
120
  return false if !@key.nil? && @key.to_s.length < 1
124
- return true
121
+ true
125
122
  end
126
123
 
127
124
  # Custom attribute writer method with validation
128
125
  # @param [Object] subdomain Value to be assigned
129
126
  def subdomain=(subdomain)
130
127
  if subdomain.nil?
131
- fail ArgumentError, "subdomain cannot be nil"
128
+ fail ArgumentError, 'subdomain cannot be nil'
132
129
  end
133
130
 
134
131
  if subdomain.to_s.length < 1
135
- fail ArgumentError, "invalid value for 'subdomain', the character length must be great than or equal to 1."
132
+ fail ArgumentError, 'invalid value for "subdomain", the character length must be great than or equal to 1.'
136
133
  end
137
134
 
138
135
  if subdomain !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
139
- fail ArgumentError, "invalid value for 'subdomain', must conform to the pattern /^[-a-zA-Z0-9_]+$/."
136
+ fail ArgumentError, 'invalid value for "subdomain", must conform to the pattern /^[-a-zA-Z0-9_]+$/.'
140
137
  end
141
138
 
142
139
  @subdomain = subdomain
@@ -145,9 +142,8 @@ module SignRequestClient
145
142
  # Custom attribute writer method with validation
146
143
  # @param [Object] name Value to be assigned
147
144
  def name=(name)
148
-
149
145
  if !name.nil? && name.to_s.length < 1
150
- fail ArgumentError, "invalid value for 'name', the character length must be great than or equal to 1."
146
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
151
147
  end
152
148
 
153
149
  @name = name
@@ -156,9 +152,8 @@ module SignRequestClient
156
152
  # Custom attribute writer method with validation
157
153
  # @param [Object] key Value to be assigned
158
154
  def key=(key)
159
-
160
155
  if !key.nil? && key.to_s.length < 1
161
- fail ArgumentError, "invalid value for 'key', the character length must be great than or equal to 1."
156
+ fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.'
162
157
  end
163
158
 
164
159
  @key = key
@@ -199,7 +194,7 @@ module SignRequestClient
199
194
  # check to ensure the input is an array given that the the attribute
200
195
  # is documented as an array but the input is not
201
196
  if attributes[self.class.attribute_map[key]].is_a?(Array)
202
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
197
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
203
198
  end
204
199
  elsif !attributes[self.class.attribute_map[key]].nil?
205
200
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -281,7 +276,7 @@ module SignRequestClient
281
276
  # @return [Hash] Returns the value in the form of hash
282
277
  def _to_hash(value)
283
278
  if value.is_a?(Array)
284
- value.compact.map{ |v| _to_hash(v) }
279
+ value.compact.map { |v| _to_hash(v) }
285
280
  elsif value.is_a?(Hash)
286
281
  {}.tap do |hash|
287
282
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -292,7 +287,5 @@ module SignRequestClient
292
287
  value
293
288
  end
294
289
  end
295
-
296
290
  end
297
-
298
291
  end
@@ -6,17 +6,18 @@
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.3.1
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 Document
18
17
  attr_accessor :url
19
18
 
19
+ attr_accessor :team
20
+
20
21
  attr_accessor :uuid
21
22
 
22
23
  attr_accessor :user
@@ -60,15 +61,22 @@ module SignRequestClient
60
61
  # Number of days after which a finished document (signed/cancelled/declined) will be automatically deleted
61
62
  attr_accessor :auto_delete_days
62
63
 
64
+ # Number of days after which a non finished document will be automatically expired
65
+ attr_accessor :auto_expire_days
66
+
63
67
  # Temporary URL to signed document as PDF, expires in five minutes
64
68
  attr_accessor :pdf
65
69
 
66
70
  # `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired
67
71
  attr_accessor :status
68
72
 
73
+ attr_accessor :signrequest
74
+
69
75
  # Indicates whether document was created using the API
70
76
  attr_accessor :api_used
71
77
 
78
+ attr_accessor :signing_log
79
+
72
80
  # SHA256 hash of PDF contents
73
81
  attr_accessor :security_hash
74
82
 
@@ -77,6 +85,12 @@ module SignRequestClient
77
85
  # Date and time calculated using `auto_delete_days` after which a finished document (signed/cancelled/declined) will be automatically deleted
78
86
  attr_accessor :auto_delete_after
79
87
 
88
+ # Indicates whether document was created as part of a sandbox team
89
+ attr_accessor :sandbox
90
+
91
+ # Date and time calculated using `auto_expire_days` after which a non finished document will be automatically expired
92
+ attr_accessor :auto_expire_after
93
+
80
94
  class EnumAttributeValidator
81
95
  attr_reader :datatype
82
96
  attr_reader :allowable_values
@@ -103,6 +117,7 @@ module SignRequestClient
103
117
  def self.attribute_map
104
118
  {
105
119
  :'url' => :'url',
120
+ :'team' => :'team',
106
121
  :'uuid' => :'uuid',
107
122
  :'user' => :'user',
108
123
  :'file_as_pdf' => :'file_as_pdf',
@@ -119,12 +134,17 @@ module SignRequestClient
119
134
  :'integrations' => :'integrations',
120
135
  :'file_from_sf' => :'file_from_sf',
121
136
  :'auto_delete_days' => :'auto_delete_days',
137
+ :'auto_expire_days' => :'auto_expire_days',
122
138
  :'pdf' => :'pdf',
123
139
  :'status' => :'status',
140
+ :'signrequest' => :'signrequest',
124
141
  :'api_used' => :'api_used',
142
+ :'signing_log' => :'signing_log',
125
143
  :'security_hash' => :'security_hash',
126
144
  :'attachments' => :'attachments',
127
- :'auto_delete_after' => :'auto_delete_after'
145
+ :'auto_delete_after' => :'auto_delete_after',
146
+ :'sandbox' => :'sandbox',
147
+ :'auto_expire_after' => :'auto_expire_after'
128
148
  }
129
149
  end
130
150
 
@@ -132,6 +152,7 @@ module SignRequestClient
132
152
  def self.swagger_types
133
153
  {
134
154
  :'url' => :'String',
155
+ :'team' => :'DocumentTeam',
135
156
  :'uuid' => :'String',
136
157
  :'user' => :'User',
137
158
  :'file_as_pdf' => :'String',
@@ -148,12 +169,17 @@ module SignRequestClient
148
169
  :'integrations' => :'Array<InlineIntegrationData>',
149
170
  :'file_from_sf' => :'FileFromSf',
150
171
  :'auto_delete_days' => :'Integer',
172
+ :'auto_expire_days' => :'Integer',
151
173
  :'pdf' => :'String',
152
174
  :'status' => :'String',
175
+ :'signrequest' => :'DocumentSignrequest',
153
176
  :'api_used' => :'BOOLEAN',
177
+ :'signing_log' => :'DocumentSigningLog',
154
178
  :'security_hash' => :'String',
155
179
  :'attachments' => :'Array<DocumentAttachment>',
156
- :'auto_delete_after' => :'DateTime'
180
+ :'auto_delete_after' => :'DateTime',
181
+ :'sandbox' => :'BOOLEAN',
182
+ :'auto_expire_after' => :'DateTime'
157
183
  }
158
184
  end
159
185
 
@@ -163,12 +189,16 @@ module SignRequestClient
163
189
  return unless attributes.is_a?(Hash)
164
190
 
165
191
  # convert string to symbol for hash key
166
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
192
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
167
193
 
168
194
  if attributes.has_key?(:'url')
169
195
  self.url = attributes[:'url']
170
196
  end
171
197
 
198
+ if attributes.has_key?(:'team')
199
+ self.team = attributes[:'team']
200
+ end
201
+
172
202
  if attributes.has_key?(:'uuid')
173
203
  self.uuid = attributes[:'uuid']
174
204
  end
@@ -237,6 +267,10 @@ module SignRequestClient
237
267
  self.auto_delete_days = attributes[:'auto_delete_days']
238
268
  end
239
269
 
270
+ if attributes.has_key?(:'auto_expire_days')
271
+ self.auto_expire_days = attributes[:'auto_expire_days']
272
+ end
273
+
240
274
  if attributes.has_key?(:'pdf')
241
275
  self.pdf = attributes[:'pdf']
242
276
  end
@@ -245,10 +279,18 @@ module SignRequestClient
245
279
  self.status = attributes[:'status']
246
280
  end
247
281
 
282
+ if attributes.has_key?(:'signrequest')
283
+ self.signrequest = attributes[:'signrequest']
284
+ end
285
+
248
286
  if attributes.has_key?(:'api_used')
249
287
  self.api_used = attributes[:'api_used']
250
288
  end
251
289
 
290
+ if attributes.has_key?(:'signing_log')
291
+ self.signing_log = attributes[:'signing_log']
292
+ end
293
+
252
294
  if attributes.has_key?(:'security_hash')
253
295
  self.security_hash = attributes[:'security_hash']
254
296
  end
@@ -263,6 +305,13 @@ module SignRequestClient
263
305
  self.auto_delete_after = attributes[:'auto_delete_after']
264
306
  end
265
307
 
308
+ if attributes.has_key?(:'sandbox')
309
+ self.sandbox = attributes[:'sandbox']
310
+ end
311
+
312
+ if attributes.has_key?(:'auto_expire_after')
313
+ self.auto_expire_after = attributes[:'auto_expire_after']
314
+ end
266
315
  end
267
316
 
268
317
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -270,46 +319,54 @@ module SignRequestClient
270
319
  def list_invalid_properties
271
320
  invalid_properties = Array.new
272
321
  if !@uuid.nil? && @uuid.to_s.length < 1
273
- invalid_properties.push("invalid value for 'uuid', the character length must be great than or equal to 1.")
322
+ invalid_properties.push('invalid value for "uuid", the character length must be great than or equal to 1.')
274
323
  end
275
324
 
276
325
  if !@file_as_pdf.nil? && @file_as_pdf.to_s.length < 1
277
- invalid_properties.push("invalid value for 'file_as_pdf', the character length must be great than or equal to 1.")
326
+ invalid_properties.push('invalid value for "file_as_pdf", the character length must be great than or equal to 1.')
278
327
  end
279
328
 
280
329
  if !@name.nil? && @name.to_s.length > 255
281
- invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 255.")
330
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
282
331
  end
283
332
 
284
333
  if !@external_id.nil? && @external_id.to_s.length > 255
285
- invalid_properties.push("invalid value for 'external_id', the character length must be smaller than or equal to 255.")
334
+ invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 255.')
286
335
  end
287
336
 
288
337
  if !@frontend_id.nil? && @frontend_id.to_s.length > 255
289
- invalid_properties.push("invalid value for 'frontend_id', the character length must be smaller than or equal to 255.")
338
+ invalid_properties.push('invalid value for "frontend_id", the character length must be smaller than or equal to 255.')
290
339
  end
291
340
 
292
341
  if !@file_from_url.nil? && @file_from_url.to_s.length > 2100
293
- invalid_properties.push("invalid value for 'file_from_url', the character length must be smaller than or equal to 2100.")
342
+ invalid_properties.push('invalid value for "file_from_url", the character length must be smaller than or equal to 2100.')
294
343
  end
295
344
 
296
345
  if !@events_callback_url.nil? && @events_callback_url.to_s.length > 2100
297
- invalid_properties.push("invalid value for 'events_callback_url', the character length must be smaller than or equal to 2100.")
346
+ invalid_properties.push('invalid value for "events_callback_url", the character length must be smaller than or equal to 2100.')
298
347
  end
299
348
 
300
349
  if !@auto_delete_days.nil? && @auto_delete_days > 730
301
- invalid_properties.push("invalid value for 'auto_delete_days', must be smaller than or equal to 730.")
350
+ invalid_properties.push('invalid value for "auto_delete_days", must be smaller than or equal to 730.')
302
351
  end
303
352
 
304
353
  if !@auto_delete_days.nil? && @auto_delete_days < 1
305
- invalid_properties.push("invalid value for 'auto_delete_days', must be greater than or equal to 1.")
354
+ invalid_properties.push('invalid value for "auto_delete_days", must be greater than or equal to 1.')
355
+ end
356
+
357
+ if !@auto_expire_days.nil? && @auto_expire_days > 730
358
+ invalid_properties.push('invalid value for "auto_expire_days", must be smaller than or equal to 730.')
359
+ end
360
+
361
+ if !@auto_expire_days.nil? && @auto_expire_days < 1
362
+ invalid_properties.push('invalid value for "auto_expire_days", must be greater than or equal to 1.')
306
363
  end
307
364
 
308
365
  if !@security_hash.nil? && @security_hash.to_s.length < 1
309
- invalid_properties.push("invalid value for 'security_hash', the character length must be great than or equal to 1.")
366
+ invalid_properties.push('invalid value for "security_hash", the character length must be great than or equal to 1.')
310
367
  end
311
368
 
312
- return invalid_properties
369
+ invalid_properties
313
370
  end
314
371
 
315
372
  # Check to see if the all the properties in the model are valid
@@ -324,18 +381,19 @@ module SignRequestClient
324
381
  return false if !@events_callback_url.nil? && @events_callback_url.to_s.length > 2100
325
382
  return false if !@auto_delete_days.nil? && @auto_delete_days > 730
326
383
  return false if !@auto_delete_days.nil? && @auto_delete_days < 1
327
- status_validator = EnumAttributeValidator.new('String', ["co", "ne", "se", "vi", "si", "do", "sd", "ca", "de", "ec", "es", "xp"])
384
+ return false if !@auto_expire_days.nil? && @auto_expire_days > 730
385
+ return false if !@auto_expire_days.nil? && @auto_expire_days < 1
386
+ status_validator = EnumAttributeValidator.new('String', ['co', 'ne', 'se', 'vi', 'si', 'do', 'sd', 'ca', 'de', 'ec', 'es', 'xp'])
328
387
  return false unless status_validator.valid?(@status)
329
388
  return false if !@security_hash.nil? && @security_hash.to_s.length < 1
330
- return true
389
+ true
331
390
  end
332
391
 
333
392
  # Custom attribute writer method with validation
334
393
  # @param [Object] uuid Value to be assigned
335
394
  def uuid=(uuid)
336
-
337
395
  if !uuid.nil? && uuid.to_s.length < 1
338
- fail ArgumentError, "invalid value for 'uuid', the character length must be great than or equal to 1."
396
+ fail ArgumentError, 'invalid value for "uuid", the character length must be great than or equal to 1.'
339
397
  end
340
398
 
341
399
  @uuid = uuid
@@ -344,9 +402,8 @@ module SignRequestClient
344
402
  # Custom attribute writer method with validation
345
403
  # @param [Object] file_as_pdf Value to be assigned
346
404
  def file_as_pdf=(file_as_pdf)
347
-
348
405
  if !file_as_pdf.nil? && file_as_pdf.to_s.length < 1
349
- fail ArgumentError, "invalid value for 'file_as_pdf', the character length must be great than or equal to 1."
406
+ fail ArgumentError, 'invalid value for "file_as_pdf", the character length must be great than or equal to 1.'
350
407
  end
351
408
 
352
409
  @file_as_pdf = file_as_pdf
@@ -355,9 +412,8 @@ module SignRequestClient
355
412
  # Custom attribute writer method with validation
356
413
  # @param [Object] name Value to be assigned
357
414
  def name=(name)
358
-
359
415
  if !name.nil? && name.to_s.length > 255
360
- fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 255."
416
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
361
417
  end
362
418
 
363
419
  @name = name
@@ -366,9 +422,8 @@ module SignRequestClient
366
422
  # Custom attribute writer method with validation
367
423
  # @param [Object] external_id Value to be assigned
368
424
  def external_id=(external_id)
369
-
370
425
  if !external_id.nil? && external_id.to_s.length > 255
371
- fail ArgumentError, "invalid value for 'external_id', the character length must be smaller than or equal to 255."
426
+ fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 255.'
372
427
  end
373
428
 
374
429
  @external_id = external_id
@@ -377,9 +432,8 @@ module SignRequestClient
377
432
  # Custom attribute writer method with validation
378
433
  # @param [Object] frontend_id Value to be assigned
379
434
  def frontend_id=(frontend_id)
380
-
381
435
  if !frontend_id.nil? && frontend_id.to_s.length > 255
382
- fail ArgumentError, "invalid value for 'frontend_id', the character length must be smaller than or equal to 255."
436
+ fail ArgumentError, 'invalid value for "frontend_id", the character length must be smaller than or equal to 255.'
383
437
  end
384
438
 
385
439
  @frontend_id = frontend_id
@@ -388,9 +442,8 @@ module SignRequestClient
388
442
  # Custom attribute writer method with validation
389
443
  # @param [Object] file_from_url Value to be assigned
390
444
  def file_from_url=(file_from_url)
391
-
392
445
  if !file_from_url.nil? && file_from_url.to_s.length > 2100
393
- fail ArgumentError, "invalid value for 'file_from_url', the character length must be smaller than or equal to 2100."
446
+ fail ArgumentError, 'invalid value for "file_from_url", the character length must be smaller than or equal to 2100.'
394
447
  end
395
448
 
396
449
  @file_from_url = file_from_url
@@ -399,9 +452,8 @@ module SignRequestClient
399
452
  # Custom attribute writer method with validation
400
453
  # @param [Object] events_callback_url Value to be assigned
401
454
  def events_callback_url=(events_callback_url)
402
-
403
455
  if !events_callback_url.nil? && events_callback_url.to_s.length > 2100
404
- fail ArgumentError, "invalid value for 'events_callback_url', the character length must be smaller than or equal to 2100."
456
+ fail ArgumentError, 'invalid value for "events_callback_url", the character length must be smaller than or equal to 2100.'
405
457
  end
406
458
 
407
459
  @events_callback_url = events_callback_url
@@ -410,24 +462,37 @@ module SignRequestClient
410
462
  # Custom attribute writer method with validation
411
463
  # @param [Object] auto_delete_days Value to be assigned
412
464
  def auto_delete_days=(auto_delete_days)
413
-
414
465
  if !auto_delete_days.nil? && auto_delete_days > 730
415
- fail ArgumentError, "invalid value for 'auto_delete_days', must be smaller than or equal to 730."
466
+ fail ArgumentError, 'invalid value for "auto_delete_days", must be smaller than or equal to 730.'
416
467
  end
417
468
 
418
469
  if !auto_delete_days.nil? && auto_delete_days < 1
419
- fail ArgumentError, "invalid value for 'auto_delete_days', must be greater than or equal to 1."
470
+ fail ArgumentError, 'invalid value for "auto_delete_days", must be greater than or equal to 1.'
420
471
  end
421
472
 
422
473
  @auto_delete_days = auto_delete_days
423
474
  end
424
475
 
476
+ # Custom attribute writer method with validation
477
+ # @param [Object] auto_expire_days Value to be assigned
478
+ def auto_expire_days=(auto_expire_days)
479
+ if !auto_expire_days.nil? && auto_expire_days > 730
480
+ fail ArgumentError, 'invalid value for "auto_expire_days", must be smaller than or equal to 730.'
481
+ end
482
+
483
+ if !auto_expire_days.nil? && auto_expire_days < 1
484
+ fail ArgumentError, 'invalid value for "auto_expire_days", must be greater than or equal to 1.'
485
+ end
486
+
487
+ @auto_expire_days = auto_expire_days
488
+ end
489
+
425
490
  # Custom attribute writer method checking allowed values (enum).
426
491
  # @param [Object] status Object to be assigned
427
492
  def status=(status)
428
- validator = EnumAttributeValidator.new('String', ["co", "ne", "se", "vi", "si", "do", "sd", "ca", "de", "ec", "es", "xp"])
493
+ validator = EnumAttributeValidator.new('String', ['co', 'ne', 'se', 'vi', 'si', 'do', 'sd', 'ca', 'de', 'ec', 'es', 'xp'])
429
494
  unless validator.valid?(status)
430
- fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
495
+ fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
431
496
  end
432
497
  @status = status
433
498
  end
@@ -435,9 +500,8 @@ module SignRequestClient
435
500
  # Custom attribute writer method with validation
436
501
  # @param [Object] security_hash Value to be assigned
437
502
  def security_hash=(security_hash)
438
-
439
503
  if !security_hash.nil? && security_hash.to_s.length < 1
440
- fail ArgumentError, "invalid value for 'security_hash', the character length must be great than or equal to 1."
504
+ fail ArgumentError, 'invalid value for "security_hash", the character length must be great than or equal to 1.'
441
505
  end
442
506
 
443
507
  @security_hash = security_hash
@@ -449,6 +513,7 @@ module SignRequestClient
449
513
  return true if self.equal?(o)
450
514
  self.class == o.class &&
451
515
  url == o.url &&
516
+ team == o.team &&
452
517
  uuid == o.uuid &&
453
518
  user == o.user &&
454
519
  file_as_pdf == o.file_as_pdf &&
@@ -465,12 +530,17 @@ module SignRequestClient
465
530
  integrations == o.integrations &&
466
531
  file_from_sf == o.file_from_sf &&
467
532
  auto_delete_days == o.auto_delete_days &&
533
+ auto_expire_days == o.auto_expire_days &&
468
534
  pdf == o.pdf &&
469
535
  status == o.status &&
536
+ signrequest == o.signrequest &&
470
537
  api_used == o.api_used &&
538
+ signing_log == o.signing_log &&
471
539
  security_hash == o.security_hash &&
472
540
  attachments == o.attachments &&
473
- auto_delete_after == o.auto_delete_after
541
+ auto_delete_after == o.auto_delete_after &&
542
+ sandbox == o.sandbox &&
543
+ auto_expire_after == o.auto_expire_after
474
544
  end
475
545
 
476
546
  # @see the `==` method
@@ -482,7 +552,7 @@ module SignRequestClient
482
552
  # Calculates hash code according to all attributes.
483
553
  # @return [Fixnum] Hash code
484
554
  def hash
485
- [url, uuid, user, file_as_pdf, name, external_id, frontend_id, file, file_from_url, events_callback_url, file_from_content, file_from_content_name, template, prefill_tags, integrations, file_from_sf, auto_delete_days, pdf, status, api_used, security_hash, attachments, auto_delete_after].hash
555
+ [url, team, uuid, user, file_as_pdf, name, external_id, frontend_id, file, file_from_url, events_callback_url, file_from_content, file_from_content_name, template, prefill_tags, integrations, file_from_sf, auto_delete_days, auto_expire_days, pdf, status, signrequest, api_used, signing_log, security_hash, attachments, auto_delete_after, sandbox, auto_expire_after].hash
486
556
  end
487
557
 
488
558
  # Builds the object from hash
@@ -495,7 +565,7 @@ module SignRequestClient
495
565
  # check to ensure the input is an array given that the the attribute
496
566
  # is documented as an array but the input is not
497
567
  if attributes[self.class.attribute_map[key]].is_a?(Array)
498
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
568
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
499
569
  end
500
570
  elsif !attributes[self.class.attribute_map[key]].nil?
501
571
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -577,7 +647,7 @@ module SignRequestClient
577
647
  # @return [Hash] Returns the value in the form of hash
578
648
  def _to_hash(value)
579
649
  if value.is_a?(Array)
580
- value.compact.map{ |v| _to_hash(v) }
650
+ value.compact.map { |v| _to_hash(v) }
581
651
  elsif value.is_a?(Hash)
582
652
  {}.tap do |hash|
583
653
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -588,7 +658,5 @@ module SignRequestClient
588
658
  value
589
659
  end
590
660
  end
591
-
592
661
  end
593
-
594
662
  end