Class: SignRequestClient::Document
- Inherits:
-
Object
- Object
- SignRequestClient::Document
- Defined in:
- lib/signrequest_client/models/document.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#api_used ⇒ Object
Returns the value of attribute api_used.
-
#attachments ⇒ Object
Returns the value of attribute attachments.
-
#auto_delete_after ⇒ Object
Returns the value of attribute auto_delete_after.
-
#auto_delete_days ⇒ Object
Returns the value of attribute auto_delete_days.
-
#events_callback_url ⇒ Object
Returns the value of attribute events_callback_url.
-
#external_id ⇒ Object
Returns the value of attribute external_id.
-
#file ⇒ Object
Returns the value of attribute file.
-
#file_as_pdf ⇒ Object
Returns the value of attribute file_as_pdf.
-
#file_from_content ⇒ Object
Returns the value of attribute file_from_content.
-
#file_from_content_name ⇒ Object
Returns the value of attribute file_from_content_name.
-
#file_from_sf ⇒ Object
Returns the value of attribute file_from_sf.
-
#file_from_url ⇒ Object
Returns the value of attribute file_from_url.
-
#frontend_id ⇒ Object
Returns the value of attribute frontend_id.
-
#integrations ⇒ Object
Returns the value of attribute integrations.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pdf ⇒ Object
Returns the value of attribute pdf.
-
#prefill_tags ⇒ Object
Returns the value of attribute prefill_tags.
-
#security_hash ⇒ Object
Returns the value of attribute security_hash.
-
#signing_log ⇒ Object
Returns the value of attribute signing_log.
-
#signrequest ⇒ Object
Returns the value of attribute signrequest.
-
#status ⇒ Object
Returns the value of attribute status.
-
#team ⇒ Object
Returns the value of attribute team.
-
#template ⇒ Object
Returns the value of attribute template.
-
#url ⇒ Object
Returns the value of attribute url.
-
#user ⇒ Object
Returns the value of attribute user.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Document
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Document
Initializes the object
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/signrequest_client/models/document.rb', line 158 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes.has_key?(:'url') self.url = attributes[:'url'] end if attributes.has_key?(:'team') self.team = attributes[:'team'] end if attributes.has_key?(:'uuid') self.uuid = attributes[:'uuid'] end if attributes.has_key?(:'user') self.user = attributes[:'user'] end if attributes.has_key?(:'file_as_pdf') self.file_as_pdf = attributes[:'file_as_pdf'] end if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'external_id') self.external_id = attributes[:'external_id'] end if attributes.has_key?(:'frontend_id') self.frontend_id = attributes[:'frontend_id'] end if attributes.has_key?(:'file') self.file = attributes[:'file'] end if attributes.has_key?(:'file_from_url') self.file_from_url = attributes[:'file_from_url'] end if attributes.has_key?(:'events_callback_url') self.events_callback_url = attributes[:'events_callback_url'] end if attributes.has_key?(:'file_from_content') self.file_from_content = attributes[:'file_from_content'] end if attributes.has_key?(:'file_from_content_name') self.file_from_content_name = attributes[:'file_from_content_name'] end if attributes.has_key?(:'template') self.template = attributes[:'template'] end if attributes.has_key?(:'prefill_tags') if (value = attributes[:'prefill_tags']).is_a?(Array) self. = value end end if attributes.has_key?(:'integrations') if (value = attributes[:'integrations']).is_a?(Array) self.integrations = value end end if attributes.has_key?(:'file_from_sf') self.file_from_sf = attributes[:'file_from_sf'] end if attributes.has_key?(:'auto_delete_days') self.auto_delete_days = attributes[:'auto_delete_days'] end if attributes.has_key?(:'pdf') self.pdf = attributes[:'pdf'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'signrequest') self.signrequest = attributes[:'signrequest'] end if attributes.has_key?(:'api_used') self.api_used = attributes[:'api_used'] end if attributes.has_key?(:'signing_log') self.signing_log = attributes[:'signing_log'] end if attributes.has_key?(:'security_hash') self.security_hash = attributes[:'security_hash'] end if attributes.has_key?(:'attachments') if (value = attributes[:'attachments']).is_a?(Array) self. = value end end if attributes.has_key?(:'auto_delete_after') self.auto_delete_after = attributes[:'auto_delete_after'] end end |
Instance Attribute Details
#api_used ⇒ Object
Returns the value of attribute api_used.
60 61 62 |
# File 'lib/signrequest_client/models/document.rb', line 60 def api_used @api_used end |
#attachments ⇒ Object
Returns the value of attribute attachments.
66 67 68 |
# File 'lib/signrequest_client/models/document.rb', line 66 def @attachments end |
#auto_delete_after ⇒ Object
Returns the value of attribute auto_delete_after.
68 69 70 |
# File 'lib/signrequest_client/models/document.rb', line 68 def auto_delete_after @auto_delete_after end |
#auto_delete_days ⇒ Object
Returns the value of attribute auto_delete_days.
52 53 54 |
# File 'lib/signrequest_client/models/document.rb', line 52 def auto_delete_days @auto_delete_days end |
#events_callback_url ⇒ Object
Returns the value of attribute events_callback_url.
38 39 40 |
# File 'lib/signrequest_client/models/document.rb', line 38 def events_callback_url @events_callback_url end |
#external_id ⇒ Object
Returns the value of attribute external_id.
30 31 32 |
# File 'lib/signrequest_client/models/document.rb', line 30 def external_id @external_id end |
#file ⇒ Object
Returns the value of attribute file.
34 35 36 |
# File 'lib/signrequest_client/models/document.rb', line 34 def file @file end |
#file_as_pdf ⇒ Object
Returns the value of attribute file_as_pdf.
26 27 28 |
# File 'lib/signrequest_client/models/document.rb', line 26 def file_as_pdf @file_as_pdf end |
#file_from_content ⇒ Object
Returns the value of attribute file_from_content.
40 41 42 |
# File 'lib/signrequest_client/models/document.rb', line 40 def file_from_content @file_from_content end |
#file_from_content_name ⇒ Object
Returns the value of attribute file_from_content_name.
42 43 44 |
# File 'lib/signrequest_client/models/document.rb', line 42 def file_from_content_name @file_from_content_name end |
#file_from_sf ⇒ Object
Returns the value of attribute file_from_sf.
50 51 52 |
# File 'lib/signrequest_client/models/document.rb', line 50 def file_from_sf @file_from_sf end |
#file_from_url ⇒ Object
Returns the value of attribute file_from_url.
36 37 38 |
# File 'lib/signrequest_client/models/document.rb', line 36 def file_from_url @file_from_url end |
#frontend_id ⇒ Object
Returns the value of attribute frontend_id.
32 33 34 |
# File 'lib/signrequest_client/models/document.rb', line 32 def frontend_id @frontend_id end |
#integrations ⇒ Object
Returns the value of attribute integrations.
48 49 50 |
# File 'lib/signrequest_client/models/document.rb', line 48 def integrations @integrations end |
#name ⇒ Object
Returns the value of attribute name.
28 29 30 |
# File 'lib/signrequest_client/models/document.rb', line 28 def name @name end |
#pdf ⇒ Object
Returns the value of attribute pdf.
54 55 56 |
# File 'lib/signrequest_client/models/document.rb', line 54 def pdf @pdf end |
#prefill_tags ⇒ Object
Returns the value of attribute prefill_tags.
46 47 48 |
# File 'lib/signrequest_client/models/document.rb', line 46 def @prefill_tags end |
#security_hash ⇒ Object
Returns the value of attribute security_hash.
64 65 66 |
# File 'lib/signrequest_client/models/document.rb', line 64 def security_hash @security_hash end |
#signing_log ⇒ Object
Returns the value of attribute signing_log.
62 63 64 |
# File 'lib/signrequest_client/models/document.rb', line 62 def signing_log @signing_log end |
#signrequest ⇒ Object
Returns the value of attribute signrequest.
58 59 60 |
# File 'lib/signrequest_client/models/document.rb', line 58 def signrequest @signrequest end |
#status ⇒ Object
Returns the value of attribute status.
56 57 58 |
# File 'lib/signrequest_client/models/document.rb', line 56 def status @status end |
#team ⇒ Object
Returns the value of attribute team.
20 21 22 |
# File 'lib/signrequest_client/models/document.rb', line 20 def team @team end |
#template ⇒ Object
Returns the value of attribute template.
44 45 46 |
# File 'lib/signrequest_client/models/document.rb', line 44 def template @template end |
#url ⇒ Object
Returns the value of attribute url.
18 19 20 |
# File 'lib/signrequest_client/models/document.rb', line 18 def url @url end |
#user ⇒ Object
Returns the value of attribute user.
24 25 26 |
# File 'lib/signrequest_client/models/document.rb', line 24 def user @user end |
#uuid ⇒ Object
Returns the value of attribute uuid.
22 23 24 |
# File 'lib/signrequest_client/models/document.rb', line 22 def uuid @uuid end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/signrequest_client/models/document.rb', line 93 def self.attribute_map { :'url' => :'url', :'team' => :'team', :'uuid' => :'uuid', :'user' => :'user', :'file_as_pdf' => :'file_as_pdf', :'name' => :'name', :'external_id' => :'external_id', :'frontend_id' => :'frontend_id', :'file' => :'file', :'file_from_url' => :'file_from_url', :'events_callback_url' => :'events_callback_url', :'file_from_content' => :'file_from_content', :'file_from_content_name' => :'file_from_content_name', :'template' => :'template', :'prefill_tags' => :'prefill_tags', :'integrations' => :'integrations', :'file_from_sf' => :'file_from_sf', :'auto_delete_days' => :'auto_delete_days', :'pdf' => :'pdf', :'status' => :'status', :'signrequest' => :'signrequest', :'api_used' => :'api_used', :'signing_log' => :'signing_log', :'security_hash' => :'security_hash', :'attachments' => :'attachments', :'auto_delete_after' => :'auto_delete_after' } end |
.swagger_types ⇒ Object
Attribute type mapping.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/signrequest_client/models/document.rb', line 125 def self.swagger_types { :'url' => :'String', :'team' => :'InlineTeam', :'uuid' => :'String', :'user' => :'User', :'file_as_pdf' => :'String', :'name' => :'String', :'external_id' => :'String', :'frontend_id' => :'String', :'file' => :'String', :'file_from_url' => :'String', :'events_callback_url' => :'String', :'file_from_content' => :'String', :'file_from_content_name' => :'String', :'template' => :'String', :'prefill_tags' => :'Array<InlinePrefillTags>', :'integrations' => :'Array<InlineIntegrationData>', :'file_from_sf' => :'FileFromSf', :'auto_delete_days' => :'Integer', :'pdf' => :'String', :'status' => :'String', :'signrequest' => :'InlineSignRequest', :'api_used' => :'BOOLEAN', :'signing_log' => :'SigningLog', :'security_hash' => :'String', :'attachments' => :'Array<DocumentAttachment>', :'auto_delete_after' => :'DateTime' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/signrequest_client/models/document.rb', line 456 def ==(o) return true if self.equal?(o) self.class == o.class && url == o.url && team == o.team && uuid == o.uuid && user == o.user && file_as_pdf == o.file_as_pdf && name == o.name && external_id == o.external_id && frontend_id == o.frontend_id && file == o.file && file_from_url == o.file_from_url && events_callback_url == o.events_callback_url && file_from_content == o.file_from_content && file_from_content_name == o.file_from_content_name && template == o.template && == o. && integrations == o.integrations && file_from_sf == o.file_from_sf && auto_delete_days == o.auto_delete_days && pdf == o.pdf && status == o.status && signrequest == o.signrequest && api_used == o.api_used && signing_log == o.signing_log && security_hash == o.security_hash && == o. && auto_delete_after == o.auto_delete_after end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/signrequest_client/models/document.rb', line 523 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = SignRequestClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
589 590 591 592 593 594 595 596 597 598 599 600 601 |
# File 'lib/signrequest_client/models/document.rb', line 589 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 |
# File 'lib/signrequest_client/models/document.rb', line 502 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
489 490 491 |
# File 'lib/signrequest_client/models/document.rb', line 489 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
495 496 497 |
# File 'lib/signrequest_client/models/document.rb', line 495 def hash [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, , integrations, file_from_sf, auto_delete_days, pdf, status, signrequest, api_used, signing_log, security_hash, , auto_delete_after].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/signrequest_client/models/document.rb', line 278 def list_invalid_properties invalid_properties = Array.new if !@uuid.nil? && @uuid.to_s.length < 1 invalid_properties.push("invalid value for 'uuid', the character length must be great than or equal to 1.") end if !@file_as_pdf.nil? && @file_as_pdf.to_s.length < 1 invalid_properties.push("invalid value for 'file_as_pdf', the character length must be great than or equal to 1.") end if !@name.nil? && @name.to_s.length > 255 invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 255.") end if !@external_id.nil? && @external_id.to_s.length > 255 invalid_properties.push("invalid value for 'external_id', the character length must be smaller than or equal to 255.") end if !@frontend_id.nil? && @frontend_id.to_s.length > 255 invalid_properties.push("invalid value for 'frontend_id', the character length must be smaller than or equal to 255.") end if !@file_from_url.nil? && @file_from_url.to_s.length > 2100 invalid_properties.push("invalid value for 'file_from_url', the character length must be smaller than or equal to 2100.") end if !@events_callback_url.nil? && @events_callback_url.to_s.length > 2100 invalid_properties.push("invalid value for 'events_callback_url', the character length must be smaller than or equal to 2100.") end if !@auto_delete_days.nil? && @auto_delete_days > 730 invalid_properties.push("invalid value for 'auto_delete_days', must be smaller than or equal to 730.") end if !@auto_delete_days.nil? && @auto_delete_days < 1 invalid_properties.push("invalid value for 'auto_delete_days', must be greater than or equal to 1.") end if !@security_hash.nil? && @security_hash.to_s.length < 1 invalid_properties.push("invalid value for 'security_hash', the character length must be great than or equal to 1.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
569 570 571 |
# File 'lib/signrequest_client/models/document.rb', line 569 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
575 576 577 578 579 580 581 582 583 |
# File 'lib/signrequest_client/models/document.rb', line 575 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
563 564 565 |
# File 'lib/signrequest_client/models/document.rb', line 563 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/signrequest_client/models/document.rb', line 325 def valid? return false if !@uuid.nil? && @uuid.to_s.length < 1 return false if !@file_as_pdf.nil? && @file_as_pdf.to_s.length < 1 return false if !@name.nil? && @name.to_s.length > 255 return false if !@external_id.nil? && @external_id.to_s.length > 255 return false if !@frontend_id.nil? && @frontend_id.to_s.length > 255 return false if !@file_from_url.nil? && @file_from_url.to_s.length > 2100 return false if !@events_callback_url.nil? && @events_callback_url.to_s.length > 2100 return false if !@auto_delete_days.nil? && @auto_delete_days > 730 return false if !@auto_delete_days.nil? && @auto_delete_days < 1 status_validator = EnumAttributeValidator.new('String', ["co", "ne", "se", "vi", "si", "do", "sd", "ca", "de", "ec", "es"]) return false unless status_validator.valid?(@status) return false if !@security_hash.nil? && @security_hash.to_s.length < 1 return true end |