Class: DocSpring::TemplatePreview
- Inherits:
-
Object
- Object
- DocSpring::TemplatePreview
- Defined in:
- lib/docspring/models/template_preview.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#add_data_request_submission_id_footers ⇒ Object
Returns the value of attribute add_data_request_submission_id_footers.
-
#allow_additional_properties ⇒ Object
Returns the value of attribute allow_additional_properties.
-
#demo ⇒ Object
Returns the value of attribute demo.
-
#description ⇒ Object
Returns the value of attribute description.
-
#document_filename ⇒ Object
Returns the value of attribute document_filename.
-
#document_md5 ⇒ Object
Returns the value of attribute document_md5.
-
#document_parse_error ⇒ Object
Returns the value of attribute document_parse_error.
-
#document_processed ⇒ Object
Returns the value of attribute document_processed.
-
#document_state ⇒ Object
Returns the value of attribute document_state.
-
#document_url ⇒ Object
Returns the value of attribute document_url.
-
#editable_submissions ⇒ Object
Returns the value of attribute editable_submissions.
-
#embed_domains ⇒ Object
Returns the value of attribute embed_domains.
-
#encrypt_pdfs ⇒ Object
Returns the value of attribute encrypt_pdfs.
-
#encrypt_pdfs_password ⇒ Object
Returns the value of attribute encrypt_pdfs_password.
-
#expiration_interval ⇒ Object
Returns the value of attribute expiration_interval.
-
#expire_after ⇒ Object
Returns the value of attribute expire_after.
-
#expire_submissions ⇒ Object
Returns the value of attribute expire_submissions.
-
#external_predefined_fields_template_id ⇒ Object
Returns the value of attribute external_predefined_fields_template_id.
-
#external_predefined_fields_template_name ⇒ Object
Returns the value of attribute external_predefined_fields_template_name.
-
#first_template ⇒ Object
Returns the value of attribute first_template.
-
#id ⇒ Object
Returns the value of attribute id.
-
#locked ⇒ Object
Returns the value of attribute locked.
-
#merge_audit_trail_pdf ⇒ Object
Returns the value of attribute merge_audit_trail_pdf.
-
#name ⇒ Object
Returns the value of attribute name.
-
#page_count ⇒ Object
Returns the value of attribute page_count.
-
#page_dimensions ⇒ Object
Returns the value of attribute page_dimensions.
-
#parent_folder_id ⇒ Object
Returns the value of attribute parent_folder_id.
-
#path ⇒ Object
Returns the value of attribute path.
-
#permanent_document_url ⇒ Object
Returns the value of attribute permanent_document_url.
-
#public_submissions ⇒ Object
Returns the value of attribute public_submissions.
-
#public_web_form ⇒ Object
Returns the value of attribute public_web_form.
-
#redirect_url ⇒ Object
Returns the value of attribute redirect_url.
-
#slack_webhook_url ⇒ Object
Returns the value of attribute slack_webhook_url.
-
#template_type ⇒ Object
Returns the value of attribute template_type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#webhook_url ⇒ Object
Returns the value of attribute webhook_url.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ TemplatePreview
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 = {}) ⇒ TemplatePreview
Initializes the object
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 275 276 277 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 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/docspring/models/template_preview.rb', line 227 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::TemplatePreview` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::TemplatePreview`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'add_data_request_submission_id_footers') self. = attributes[:'add_data_request_submission_id_footers'] else self. = nil end if attributes.key?(:'allow_additional_properties') self.allow_additional_properties = attributes[:'allow_additional_properties'] else self.allow_additional_properties = nil end if attributes.key?(:'description') self.description = attributes[:'description'] else self.description = nil end if attributes.key?(:'document_filename') self.document_filename = attributes[:'document_filename'] else self.document_filename = nil end if attributes.key?(:'document_md5') self.document_md5 = attributes[:'document_md5'] else self.document_md5 = nil end if attributes.key?(:'document_parse_error') self.document_parse_error = attributes[:'document_parse_error'] else self.document_parse_error = nil end if attributes.key?(:'document_processed') self.document_processed = attributes[:'document_processed'] else self.document_processed = nil end if attributes.key?(:'document_state') self.document_state = attributes[:'document_state'] else self.document_state = nil end if attributes.key?(:'document_url') self.document_url = attributes[:'document_url'] else self.document_url = nil end if attributes.key?(:'editable_submissions') self.editable_submissions = attributes[:'editable_submissions'] else self.editable_submissions = nil end if attributes.key?(:'embed_domains') self. = attributes[:'embed_domains'] else self. = nil end if attributes.key?(:'encrypt_pdfs_password') self.encrypt_pdfs_password = attributes[:'encrypt_pdfs_password'] else self.encrypt_pdfs_password = nil end if attributes.key?(:'encrypt_pdfs') self.encrypt_pdfs = attributes[:'encrypt_pdfs'] else self.encrypt_pdfs = nil end if attributes.key?(:'expiration_interval') self.expiration_interval = attributes[:'expiration_interval'] else self.expiration_interval = nil end if attributes.key?(:'expire_after') self.expire_after = attributes[:'expire_after'] else self.expire_after = nil end if attributes.key?(:'expire_submissions') self.expire_submissions = attributes[:'expire_submissions'] else self.expire_submissions = nil end if attributes.key?(:'external_predefined_fields_template_id') self.external_predefined_fields_template_id = attributes[:'external_predefined_fields_template_id'] else self.external_predefined_fields_template_id = nil end if attributes.key?(:'external_predefined_fields_template_name') self.external_predefined_fields_template_name = attributes[:'external_predefined_fields_template_name'] else self.external_predefined_fields_template_name = nil end if attributes.key?(:'first_template') self.first_template = attributes[:'first_template'] else self.first_template = nil end if attributes.key?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'locked') self.locked = attributes[:'locked'] else self.locked = nil end if attributes.key?(:'merge_audit_trail_pdf') self.merge_audit_trail_pdf = attributes[:'merge_audit_trail_pdf'] else self.merge_audit_trail_pdf = nil end if attributes.key?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'page_count') self.page_count = attributes[:'page_count'] else self.page_count = nil end if attributes.key?(:'page_dimensions') if (value = attributes[:'page_dimensions']).is_a?(Array) self.page_dimensions = value end else self.page_dimensions = nil end if attributes.key?(:'parent_folder_id') self.parent_folder_id = attributes[:'parent_folder_id'] else self.parent_folder_id = nil end if attributes.key?(:'path') self.path = attributes[:'path'] else self.path = nil end if attributes.key?(:'permanent_document_url') self.permanent_document_url = attributes[:'permanent_document_url'] else self.permanent_document_url = nil end if attributes.key?(:'public_submissions') self.public_submissions = attributes[:'public_submissions'] else self.public_submissions = nil end if attributes.key?(:'public_web_form') self.public_web_form = attributes[:'public_web_form'] else self.public_web_form = nil end if attributes.key?(:'redirect_url') self.redirect_url = attributes[:'redirect_url'] else self.redirect_url = nil end if attributes.key?(:'slack_webhook_url') self.slack_webhook_url = attributes[:'slack_webhook_url'] else self.slack_webhook_url = nil end if attributes.key?(:'template_type') self.template_type = attributes[:'template_type'] else self.template_type = nil end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] else self.updated_at = nil end if attributes.key?(:'webhook_url') self.webhook_url = attributes[:'webhook_url'] else self.webhook_url = nil end if attributes.key?(:'demo') self.demo = attributes[:'demo'] else self.demo = nil end end |
Instance Attribute Details
#add_data_request_submission_id_footers ⇒ Object
Returns the value of attribute add_data_request_submission_id_footers.
18 19 20 |
# File 'lib/docspring/models/template_preview.rb', line 18 def @add_data_request_submission_id_footers end |
#allow_additional_properties ⇒ Object
Returns the value of attribute allow_additional_properties.
20 21 22 |
# File 'lib/docspring/models/template_preview.rb', line 20 def allow_additional_properties @allow_additional_properties end |
#demo ⇒ Object
Returns the value of attribute demo.
88 89 90 |
# File 'lib/docspring/models/template_preview.rb', line 88 def demo @demo end |
#description ⇒ Object
Returns the value of attribute description.
22 23 24 |
# File 'lib/docspring/models/template_preview.rb', line 22 def description @description end |
#document_filename ⇒ Object
Returns the value of attribute document_filename.
24 25 26 |
# File 'lib/docspring/models/template_preview.rb', line 24 def document_filename @document_filename end |
#document_md5 ⇒ Object
Returns the value of attribute document_md5.
26 27 28 |
# File 'lib/docspring/models/template_preview.rb', line 26 def document_md5 @document_md5 end |
#document_parse_error ⇒ Object
Returns the value of attribute document_parse_error.
28 29 30 |
# File 'lib/docspring/models/template_preview.rb', line 28 def document_parse_error @document_parse_error end |
#document_processed ⇒ Object
Returns the value of attribute document_processed.
30 31 32 |
# File 'lib/docspring/models/template_preview.rb', line 30 def document_processed @document_processed end |
#document_state ⇒ Object
Returns the value of attribute document_state.
32 33 34 |
# File 'lib/docspring/models/template_preview.rb', line 32 def document_state @document_state end |
#document_url ⇒ Object
Returns the value of attribute document_url.
34 35 36 |
# File 'lib/docspring/models/template_preview.rb', line 34 def document_url @document_url end |
#editable_submissions ⇒ Object
Returns the value of attribute editable_submissions.
36 37 38 |
# File 'lib/docspring/models/template_preview.rb', line 36 def editable_submissions @editable_submissions end |
#embed_domains ⇒ Object
Returns the value of attribute embed_domains.
38 39 40 |
# File 'lib/docspring/models/template_preview.rb', line 38 def @embed_domains end |
#encrypt_pdfs ⇒ Object
Returns the value of attribute encrypt_pdfs.
42 43 44 |
# File 'lib/docspring/models/template_preview.rb', line 42 def encrypt_pdfs @encrypt_pdfs end |
#encrypt_pdfs_password ⇒ Object
Returns the value of attribute encrypt_pdfs_password.
40 41 42 |
# File 'lib/docspring/models/template_preview.rb', line 40 def encrypt_pdfs_password @encrypt_pdfs_password end |
#expiration_interval ⇒ Object
Returns the value of attribute expiration_interval.
44 45 46 |
# File 'lib/docspring/models/template_preview.rb', line 44 def expiration_interval @expiration_interval end |
#expire_after ⇒ Object
Returns the value of attribute expire_after.
46 47 48 |
# File 'lib/docspring/models/template_preview.rb', line 46 def expire_after @expire_after end |
#expire_submissions ⇒ Object
Returns the value of attribute expire_submissions.
48 49 50 |
# File 'lib/docspring/models/template_preview.rb', line 48 def expire_submissions @expire_submissions end |
#external_predefined_fields_template_id ⇒ Object
Returns the value of attribute external_predefined_fields_template_id.
50 51 52 |
# File 'lib/docspring/models/template_preview.rb', line 50 def external_predefined_fields_template_id @external_predefined_fields_template_id end |
#external_predefined_fields_template_name ⇒ Object
Returns the value of attribute external_predefined_fields_template_name.
52 53 54 |
# File 'lib/docspring/models/template_preview.rb', line 52 def external_predefined_fields_template_name @external_predefined_fields_template_name end |
#first_template ⇒ Object
Returns the value of attribute first_template.
54 55 56 |
# File 'lib/docspring/models/template_preview.rb', line 54 def first_template @first_template end |
#id ⇒ Object
Returns the value of attribute id.
56 57 58 |
# File 'lib/docspring/models/template_preview.rb', line 56 def id @id end |
#locked ⇒ Object
Returns the value of attribute locked.
58 59 60 |
# File 'lib/docspring/models/template_preview.rb', line 58 def locked @locked end |
#merge_audit_trail_pdf ⇒ Object
Returns the value of attribute merge_audit_trail_pdf.
60 61 62 |
# File 'lib/docspring/models/template_preview.rb', line 60 def merge_audit_trail_pdf @merge_audit_trail_pdf end |
#name ⇒ Object
Returns the value of attribute name.
62 63 64 |
# File 'lib/docspring/models/template_preview.rb', line 62 def name @name end |
#page_count ⇒ Object
Returns the value of attribute page_count.
64 65 66 |
# File 'lib/docspring/models/template_preview.rb', line 64 def page_count @page_count end |
#page_dimensions ⇒ Object
Returns the value of attribute page_dimensions.
66 67 68 |
# File 'lib/docspring/models/template_preview.rb', line 66 def page_dimensions @page_dimensions end |
#parent_folder_id ⇒ Object
Returns the value of attribute parent_folder_id.
68 69 70 |
# File 'lib/docspring/models/template_preview.rb', line 68 def parent_folder_id @parent_folder_id end |
#path ⇒ Object
Returns the value of attribute path.
70 71 72 |
# File 'lib/docspring/models/template_preview.rb', line 70 def path @path end |
#permanent_document_url ⇒ Object
Returns the value of attribute permanent_document_url.
72 73 74 |
# File 'lib/docspring/models/template_preview.rb', line 72 def permanent_document_url @permanent_document_url end |
#public_submissions ⇒ Object
Returns the value of attribute public_submissions.
74 75 76 |
# File 'lib/docspring/models/template_preview.rb', line 74 def public_submissions @public_submissions end |
#public_web_form ⇒ Object
Returns the value of attribute public_web_form.
76 77 78 |
# File 'lib/docspring/models/template_preview.rb', line 76 def public_web_form @public_web_form end |
#redirect_url ⇒ Object
Returns the value of attribute redirect_url.
78 79 80 |
# File 'lib/docspring/models/template_preview.rb', line 78 def redirect_url @redirect_url end |
#slack_webhook_url ⇒ Object
Returns the value of attribute slack_webhook_url.
80 81 82 |
# File 'lib/docspring/models/template_preview.rb', line 80 def slack_webhook_url @slack_webhook_url end |
#template_type ⇒ Object
Returns the value of attribute template_type.
82 83 84 |
# File 'lib/docspring/models/template_preview.rb', line 82 def template_type @template_type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
84 85 86 |
# File 'lib/docspring/models/template_preview.rb', line 84 def updated_at @updated_at end |
#webhook_url ⇒ Object
Returns the value of attribute webhook_url.
86 87 88 |
# File 'lib/docspring/models/template_preview.rb', line 86 def webhook_url @webhook_url end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 |
# File 'lib/docspring/models/template_preview.rb', line 670 def self._deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = DocSpring.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
155 156 157 |
# File 'lib/docspring/models/template_preview.rb', line 155 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
113 114 115 116 117 118 119 120 121 122 123 124 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 |
# File 'lib/docspring/models/template_preview.rb', line 113 def self.attribute_map { :'add_data_request_submission_id_footers' => :'add_data_request_submission_id_footers', :'allow_additional_properties' => :'allow_additional_properties', :'description' => :'description', :'document_filename' => :'document_filename', :'document_md5' => :'document_md5', :'document_parse_error' => :'document_parse_error', :'document_processed' => :'document_processed', :'document_state' => :'document_state', :'document_url' => :'document_url', :'editable_submissions' => :'editable_submissions', :'embed_domains' => :'embed_domains', :'encrypt_pdfs_password' => :'encrypt_pdfs_password', :'encrypt_pdfs' => :'encrypt_pdfs', :'expiration_interval' => :'expiration_interval', :'expire_after' => :'expire_after', :'expire_submissions' => :'expire_submissions', :'external_predefined_fields_template_id' => :'external_predefined_fields_template_id', :'external_predefined_fields_template_name' => :'external_predefined_fields_template_name', :'first_template' => :'first_template', :'id' => :'id', :'locked' => :'locked', :'merge_audit_trail_pdf' => :'merge_audit_trail_pdf', :'name' => :'name', :'page_count' => :'page_count', :'page_dimensions' => :'page_dimensions', :'parent_folder_id' => :'parent_folder_id', :'path' => :'path', :'permanent_document_url' => :'permanent_document_url', :'public_submissions' => :'public_submissions', :'public_web_form' => :'public_web_form', :'redirect_url' => :'redirect_url', :'slack_webhook_url' => :'slack_webhook_url', :'template_type' => :'template_type', :'updated_at' => :'updated_at', :'webhook_url' => :'webhook_url', :'demo' => :'demo' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 |
# File 'lib/docspring/models/template_preview.rb', line 646 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/docspring/models/template_preview.rb', line 202 def self.openapi_nullable Set.new([ :'description', :'document_filename', :'document_md5', :'document_url', :'embed_domains', :'encrypt_pdfs_password', :'external_predefined_fields_template_id', :'external_predefined_fields_template_name', :'id', :'name', :'page_dimensions', :'parent_folder_id', :'path', :'permanent_document_url', :'redirect_url', :'slack_webhook_url', :'updated_at', :'webhook_url', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/docspring/models/template_preview.rb', line 160 def self.openapi_types { :'add_data_request_submission_id_footers' => :'Boolean', :'allow_additional_properties' => :'Boolean', :'description' => :'String', :'document_filename' => :'String', :'document_md5' => :'String', :'document_parse_error' => :'Boolean', :'document_processed' => :'Boolean', :'document_state' => :'String', :'document_url' => :'String', :'editable_submissions' => :'Boolean', :'embed_domains' => :'String', :'encrypt_pdfs_password' => :'String', :'encrypt_pdfs' => :'Boolean', :'expiration_interval' => :'String', :'expire_after' => :'Integer', :'expire_submissions' => :'Boolean', :'external_predefined_fields_template_id' => :'String', :'external_predefined_fields_template_name' => :'String', :'first_template' => :'Boolean', :'id' => :'String', :'locked' => :'Boolean', :'merge_audit_trail_pdf' => :'Boolean', :'name' => :'String', :'page_count' => :'Integer', :'page_dimensions' => :'Array<Array<Float>>', :'parent_folder_id' => :'String', :'path' => :'String', :'permanent_document_url' => :'String', :'public_submissions' => :'Boolean', :'public_web_form' => :'Boolean', :'redirect_url' => :'String', :'slack_webhook_url' => :'String', :'template_type' => :'String', :'updated_at' => :'String', :'webhook_url' => :'String', :'demo' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 |
# File 'lib/docspring/models/template_preview.rb', line 590 def ==(o) return true if self.equal?(o) self.class == o.class && == o. && allow_additional_properties == o.allow_additional_properties && description == o.description && document_filename == o.document_filename && document_md5 == o.document_md5 && document_parse_error == o.document_parse_error && document_processed == o.document_processed && document_state == o.document_state && document_url == o.document_url && editable_submissions == o.editable_submissions && == o. && encrypt_pdfs_password == o.encrypt_pdfs_password && encrypt_pdfs == o.encrypt_pdfs && expiration_interval == o.expiration_interval && expire_after == o.expire_after && expire_submissions == o.expire_submissions && external_predefined_fields_template_id == o.external_predefined_fields_template_id && external_predefined_fields_template_name == o.external_predefined_fields_template_name && first_template == o.first_template && id == o.id && locked == o.locked && merge_audit_trail_pdf == o.merge_audit_trail_pdf && name == o.name && page_count == o.page_count && page_dimensions == o.page_dimensions && parent_folder_id == o.parent_folder_id && path == o.path && permanent_document_url == o.permanent_document_url && public_submissions == o.public_submissions && public_web_form == o.public_web_form && redirect_url == o.redirect_url && slack_webhook_url == o.slack_webhook_url && template_type == o.template_type && updated_at == o.updated_at && webhook_url == o.webhook_url && demo == o.demo end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
741 742 743 744 745 746 747 748 749 750 751 752 753 |
# File 'lib/docspring/models/template_preview.rb', line 741 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 |
#eql?(o) ⇒ Boolean
633 634 635 |
# File 'lib/docspring/models/template_preview.rb', line 633 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
639 640 641 |
# File 'lib/docspring/models/template_preview.rb', line 639 def hash [, allow_additional_properties, description, document_filename, document_md5, document_parse_error, document_processed, document_state, document_url, editable_submissions, , encrypt_pdfs_password, encrypt_pdfs, expiration_interval, expire_after, expire_submissions, external_predefined_fields_template_id, external_predefined_fields_template_name, first_template, id, locked, merge_audit_trail_pdf, name, page_count, page_dimensions, parent_folder_id, path, permanent_document_url, public_submissions, public_web_form, redirect_url, slack_webhook_url, template_type, updated_at, webhook_url, demo].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 |
# File 'lib/docspring/models/template_preview.rb', line 461 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @add_data_request_submission_id_footers.nil? invalid_properties.push('invalid value for "add_data_request_submission_id_footers", add_data_request_submission_id_footers cannot be nil.') end if @allow_additional_properties.nil? invalid_properties.push('invalid value for "allow_additional_properties", allow_additional_properties cannot be nil.') end if @document_parse_error.nil? invalid_properties.push('invalid value for "document_parse_error", document_parse_error cannot be nil.') end if @document_processed.nil? invalid_properties.push('invalid value for "document_processed", document_processed cannot be nil.') end if @document_state.nil? invalid_properties.push('invalid value for "document_state", document_state cannot be nil.') end if @editable_submissions.nil? invalid_properties.push('invalid value for "editable_submissions", editable_submissions cannot be nil.') end if @encrypt_pdfs.nil? invalid_properties.push('invalid value for "encrypt_pdfs", encrypt_pdfs cannot be nil.') end if @expiration_interval.nil? invalid_properties.push('invalid value for "expiration_interval", expiration_interval cannot be nil.') end if @expire_after.nil? invalid_properties.push('invalid value for "expire_after", expire_after cannot be nil.') end if @expire_submissions.nil? invalid_properties.push('invalid value for "expire_submissions", expire_submissions cannot be nil.') end if @first_template.nil? invalid_properties.push('invalid value for "first_template", first_template cannot be nil.') end if @locked.nil? invalid_properties.push('invalid value for "locked", locked cannot be nil.') end if @merge_audit_trail_pdf.nil? invalid_properties.push('invalid value for "merge_audit_trail_pdf", merge_audit_trail_pdf cannot be nil.') end if @page_count.nil? invalid_properties.push('invalid value for "page_count", page_count cannot be nil.') end if @public_submissions.nil? invalid_properties.push('invalid value for "public_submissions", public_submissions cannot be nil.') end if @public_web_form.nil? invalid_properties.push('invalid value for "public_web_form", public_web_form cannot be nil.') end if @template_type.nil? invalid_properties.push('invalid value for "template_type", template_type cannot be nil.') end if @demo.nil? invalid_properties.push('invalid value for "demo", demo cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
717 718 719 |
# File 'lib/docspring/models/template_preview.rb', line 717 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
723 724 725 726 727 728 729 730 731 732 733 734 735 |
# File 'lib/docspring/models/template_preview.rb', line 723 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
711 712 713 |
# File 'lib/docspring/models/template_preview.rb', line 711 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/docspring/models/template_preview.rb', line 541 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @add_data_request_submission_id_footers.nil? return false if @allow_additional_properties.nil? return false if @document_parse_error.nil? return false if @document_processed.nil? return false if @document_state.nil? document_state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "password_required", "malformed_pdf", "unknown_error"]) return false unless document_state_validator.valid?(@document_state) return false if @editable_submissions.nil? return false if @encrypt_pdfs.nil? return false if @expiration_interval.nil? return false if @expire_after.nil? return false if @expire_submissions.nil? return false if @first_template.nil? return false if @locked.nil? return false if @merge_audit_trail_pdf.nil? return false if @page_count.nil? return false if @public_submissions.nil? return false if @public_web_form.nil? return false if @template_type.nil? template_type_validator = EnumAttributeValidator.new('String', ["pdf", "html"]) return false unless template_type_validator.valid?(@template_type) return false if @demo.nil? true end |