Class: DocSpring::FullTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/docspring/models/full_template.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ FullTemplate

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
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
486
487
488
489
490
# File 'lib/docspring/models/full_template.rb', line 238

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::FullTemplate` 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::FullTemplate`. 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?(:'name')
    self.name = attributes[:'name']
  else
    self.name = nil
  end

  if attributes.key?(:'description')
    self.description = attributes[:'description']
  else
    self.description = 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?(:'public_submissions')
    self.public_submissions = attributes[:'public_submissions']
  else
    self.public_submissions = nil
  end

  if attributes.key?(:'expire_submissions')
    self.expire_submissions = attributes[:'expire_submissions']
  else
    self.expire_submissions = nil
  end

  if attributes.key?(:'expire_after')
    self.expire_after = attributes[:'expire_after']
  else
    self.expire_after = nil
  end

  if attributes.key?(:'expiration_interval')
    self.expiration_interval = attributes[:'expiration_interval']
  else
    self.expiration_interval = 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?(:'editable_submissions')
    self.editable_submissions = attributes[:'editable_submissions']
  else
    self.editable_submissions = nil
  end

  if attributes.key?(:'locked')
    self.locked = attributes[:'locked']
  else
    self.locked = nil
  end

  if attributes.key?(:'webhook_url')
    self.webhook_url = attributes[:'webhook_url']
  else
    self.webhook_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?(:'redirect_url')
    self.redirect_url = attributes[:'redirect_url']
  else
    self.redirect_url = nil
  end

  if attributes.key?(:'first_template')
    self.first_template = attributes[:'first_template']
  else
    self.first_template = nil
  end

  if attributes.key?(:'html')
    self.html = attributes[:'html']
  else
    self.html = nil
  end

  if attributes.key?(:'header_html')
    self.header_html = attributes[:'header_html']
  else
    self.header_html = nil
  end

  if attributes.key?(:'footer_html')
    self.footer_html = attributes[:'footer_html']
  else
    self.footer_html = nil
  end

  if attributes.key?(:'scss')
    self.scss = attributes[:'scss']
  else
    self.scss = nil
  end

  if attributes.key?(:'encrypt_pdfs')
    self.encrypt_pdfs = attributes[:'encrypt_pdfs']
  else
    self.encrypt_pdfs = 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?(:'defaults')
    self.defaults = attributes[:'defaults']
  else
    self.defaults = nil
  end

  if attributes.key?(:'fields')
    self.fields = attributes[:'fields']
  else
    self.fields = nil
  end

  if attributes.key?(:'shared_field_data')
    self.shared_field_data = attributes[:'shared_field_data']
  else
    self.shared_field_data = nil
  end

  if attributes.key?(:'field_order')
    if (value = attributes[:'field_order']).is_a?(Array)
      self.field_order = value
    end
  else
    self.field_order = nil
  end

  if attributes.key?(:'document_md5')
    self.document_md5 = attributes[:'document_md5']
  else
    self.document_md5 = nil
  end

  if attributes.key?(:'document_filename')
    self.document_filename = attributes[:'document_filename']
  else
    self.document_filename = 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_state')
    self.document_state = attributes[:'document_state']
  else
    self.document_state = nil
  end

  if attributes.key?(:'embed_domains')
    if (value = attributes[:'embed_domains']).is_a?(Array)
      self.embed_domains = value
    end
  else
    self.embed_domains = nil
  end

  if attributes.key?(:'page_count')
    self.page_count = attributes[:'page_count']
  else
    self.page_count = nil
  end

  if attributes.key?(:'document_processed')
    self.document_processed = attributes[:'document_processed']
  else
    self.document_processed = nil
  end

  if attributes.key?(:'demo')
    self.demo = attributes[:'demo']
  else
    self.demo = nil
  end

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  else
    self.id = nil
  end

  if attributes.key?(:'template_type')
    self.template_type = attributes[:'template_type']
  else
    self.template_type = 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?(:'document_url')
    self.document_url = attributes[:'document_url']
  else
    self.document_url = 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?(:'path')
    self.path = attributes[:'path']
  else
    self.path = nil
  end

  if attributes.key?(:'parent_folder_id')
    self.parent_folder_id = attributes[:'parent_folder_id']
  else
    self.parent_folder_id = nil
  end
end

Instance Attribute Details

#allow_additional_propertiesObject

Returns the value of attribute allow_additional_properties.



32
33
34
# File 'lib/docspring/models/full_template.rb', line 32

def allow_additional_properties
  @allow_additional_properties
end

#defaultsObject

Returns the value of attribute defaults.



58
59
60
# File 'lib/docspring/models/full_template.rb', line 58

def defaults
  @defaults
end

#demoObject

Returns the value of attribute demo.



80
81
82
# File 'lib/docspring/models/full_template.rb', line 80

def demo
  @demo
end

#descriptionObject

Returns the value of attribute description.



20
21
22
# File 'lib/docspring/models/full_template.rb', line 20

def description
  @description
end

#document_filenameObject

Returns the value of attribute document_filename.



68
69
70
# File 'lib/docspring/models/full_template.rb', line 68

def document_filename
  @document_filename
end

#document_md5Object

Returns the value of attribute document_md5.



66
67
68
# File 'lib/docspring/models/full_template.rb', line 66

def document_md5
  @document_md5
end

#document_parse_errorObject

Returns the value of attribute document_parse_error.



70
71
72
# File 'lib/docspring/models/full_template.rb', line 70

def document_parse_error
  @document_parse_error
end

#document_processedObject

Returns the value of attribute document_processed.



78
79
80
# File 'lib/docspring/models/full_template.rb', line 78

def document_processed
  @document_processed
end

#document_stateObject

Returns the value of attribute document_state.



72
73
74
# File 'lib/docspring/models/full_template.rb', line 72

def document_state
  @document_state
end

#document_urlObject

Returns the value of attribute document_url.



88
89
90
# File 'lib/docspring/models/full_template.rb', line 88

def document_url
  @document_url
end

#editable_submissionsObject

Returns the value of attribute editable_submissions.



34
35
36
# File 'lib/docspring/models/full_template.rb', line 34

def editable_submissions
  @editable_submissions
end

#embed_domainsObject

Returns the value of attribute embed_domains.



74
75
76
# File 'lib/docspring/models/full_template.rb', line 74

def embed_domains
  @embed_domains
end

#encrypt_pdfsObject

Returns the value of attribute encrypt_pdfs.



54
55
56
# File 'lib/docspring/models/full_template.rb', line 54

def encrypt_pdfs
  @encrypt_pdfs
end

#encrypt_pdfs_passwordObject

Returns the value of attribute encrypt_pdfs_password.



56
57
58
# File 'lib/docspring/models/full_template.rb', line 56

def encrypt_pdfs_password
  @encrypt_pdfs_password
end

#expiration_intervalObject

Returns the value of attribute expiration_interval.



30
31
32
# File 'lib/docspring/models/full_template.rb', line 30

def expiration_interval
  @expiration_interval
end

#expire_afterObject

Returns the value of attribute expire_after.



28
29
30
# File 'lib/docspring/models/full_template.rb', line 28

def expire_after
  @expire_after
end

#expire_submissionsObject

Returns the value of attribute expire_submissions.



26
27
28
# File 'lib/docspring/models/full_template.rb', line 26

def expire_submissions
  @expire_submissions
end

#field_orderObject

Returns the value of attribute field_order.



64
65
66
# File 'lib/docspring/models/full_template.rb', line 64

def field_order
  @field_order
end

#fieldsObject

Returns the value of attribute fields.



60
61
62
# File 'lib/docspring/models/full_template.rb', line 60

def fields
  @fields
end

#first_templateObject

Returns the value of attribute first_template.



44
45
46
# File 'lib/docspring/models/full_template.rb', line 44

def first_template
  @first_template
end

Returns the value of attribute footer_html.



50
51
52
# File 'lib/docspring/models/full_template.rb', line 50

def footer_html
  @footer_html
end

#header_htmlObject

Returns the value of attribute header_html.



48
49
50
# File 'lib/docspring/models/full_template.rb', line 48

def header_html
  @header_html
end

#htmlObject

Returns the value of attribute html.



46
47
48
# File 'lib/docspring/models/full_template.rb', line 46

def html
  @html
end

#idObject

Returns the value of attribute id.



82
83
84
# File 'lib/docspring/models/full_template.rb', line 82

def id
  @id
end

#lockedObject

Returns the value of attribute locked.



36
37
38
# File 'lib/docspring/models/full_template.rb', line 36

def locked
  @locked
end

#nameObject

Returns the value of attribute name.



18
19
20
# File 'lib/docspring/models/full_template.rb', line 18

def name
  @name
end

#page_countObject

Returns the value of attribute page_count.



76
77
78
# File 'lib/docspring/models/full_template.rb', line 76

def page_count
  @page_count
end

#page_dimensionsObject

Returns the value of attribute page_dimensions.



86
87
88
# File 'lib/docspring/models/full_template.rb', line 86

def page_dimensions
  @page_dimensions
end

#parent_folder_idObject

Returns the value of attribute parent_folder_id.



94
95
96
# File 'lib/docspring/models/full_template.rb', line 94

def parent_folder_id
  @parent_folder_id
end

#pathObject

Returns the value of attribute path.



92
93
94
# File 'lib/docspring/models/full_template.rb', line 92

def path
  @path
end

#permanent_document_urlObject

Returns the value of attribute permanent_document_url.



90
91
92
# File 'lib/docspring/models/full_template.rb', line 90

def permanent_document_url
  @permanent_document_url
end

#public_submissionsObject

Returns the value of attribute public_submissions.



24
25
26
# File 'lib/docspring/models/full_template.rb', line 24

def public_submissions
  @public_submissions
end

#public_web_formObject

Returns the value of attribute public_web_form.



22
23
24
# File 'lib/docspring/models/full_template.rb', line 22

def public_web_form
  @public_web_form
end

#redirect_urlObject

Returns the value of attribute redirect_url.



42
43
44
# File 'lib/docspring/models/full_template.rb', line 42

def redirect_url
  @redirect_url
end

#scssObject

Returns the value of attribute scss.



52
53
54
# File 'lib/docspring/models/full_template.rb', line 52

def scss
  @scss
end

#shared_field_dataObject

Returns the value of attribute shared_field_data.



62
63
64
# File 'lib/docspring/models/full_template.rb', line 62

def shared_field_data
  @shared_field_data
end

#slack_webhook_urlObject

Returns the value of attribute slack_webhook_url.



40
41
42
# File 'lib/docspring/models/full_template.rb', line 40

def slack_webhook_url
  @slack_webhook_url
end

#template_typeObject

Returns the value of attribute template_type.



84
85
86
# File 'lib/docspring/models/full_template.rb', line 84

def template_type
  @template_type
end

#webhook_urlObject

Returns the value of attribute webhook_url.



38
39
40
# File 'lib/docspring/models/full_template.rb', line 38

def webhook_url
  @webhook_url
end

Class Method Details

._deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
# File 'lib/docspring/models/full_template.rb', line 714

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_attributesObject

Returns all the JSON keys this model knows about



164
165
166
# File 'lib/docspring/models/full_template.rb', line 164

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
153
154
155
156
157
158
159
160
161
# File 'lib/docspring/models/full_template.rb', line 119

def self.attribute_map
  {
    :'name' => :'name',
    :'description' => :'description',
    :'public_web_form' => :'public_web_form',
    :'public_submissions' => :'public_submissions',
    :'expire_submissions' => :'expire_submissions',
    :'expire_after' => :'expire_after',
    :'expiration_interval' => :'expiration_interval',
    :'allow_additional_properties' => :'allow_additional_properties',
    :'editable_submissions' => :'editable_submissions',
    :'locked' => :'locked',
    :'webhook_url' => :'webhook_url',
    :'slack_webhook_url' => :'slack_webhook_url',
    :'redirect_url' => :'redirect_url',
    :'first_template' => :'first_template',
    :'html' => :'html',
    :'header_html' => :'header_html',
    :'footer_html' => :'footer_html',
    :'scss' => :'scss',
    :'encrypt_pdfs' => :'encrypt_pdfs',
    :'encrypt_pdfs_password' => :'encrypt_pdfs_password',
    :'defaults' => :'defaults',
    :'fields' => :'fields',
    :'shared_field_data' => :'shared_field_data',
    :'field_order' => :'field_order',
    :'document_md5' => :'document_md5',
    :'document_filename' => :'document_filename',
    :'document_parse_error' => :'document_parse_error',
    :'document_state' => :'document_state',
    :'embed_domains' => :'embed_domains',
    :'page_count' => :'page_count',
    :'document_processed' => :'document_processed',
    :'demo' => :'demo',
    :'id' => :'id',
    :'template_type' => :'template_type',
    :'page_dimensions' => :'page_dimensions',
    :'document_url' => :'document_url',
    :'permanent_document_url' => :'permanent_document_url',
    :'path' => :'path',
    :'parent_folder_id' => :'parent_folder_id'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
# File 'lib/docspring/models/full_template.rb', line 690

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_nullableObject

List of attributes with nullable: true



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/docspring/models/full_template.rb', line 214

def self.openapi_nullable
  Set.new([
    :'name',
    :'description',
    :'webhook_url',
    :'slack_webhook_url',
    :'redirect_url',
    :'html',
    :'header_html',
    :'footer_html',
    :'scss',
    :'encrypt_pdfs_password',
    :'document_md5',
    :'document_filename',
    :'embed_domains',
    :'page_dimensions',
    :'document_url',
    :'permanent_document_url',
    :'parent_folder_id'
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/docspring/models/full_template.rb', line 169

def self.openapi_types
  {
    :'name' => :'String',
    :'description' => :'String',
    :'public_web_form' => :'Boolean',
    :'public_submissions' => :'Boolean',
    :'expire_submissions' => :'Boolean',
    :'expire_after' => :'Float',
    :'expiration_interval' => :'String',
    :'allow_additional_properties' => :'Boolean',
    :'editable_submissions' => :'Boolean',
    :'locked' => :'Boolean',
    :'webhook_url' => :'String',
    :'slack_webhook_url' => :'String',
    :'redirect_url' => :'String',
    :'first_template' => :'Boolean',
    :'html' => :'String',
    :'header_html' => :'String',
    :'footer_html' => :'String',
    :'scss' => :'String',
    :'encrypt_pdfs' => :'Boolean',
    :'encrypt_pdfs_password' => :'String',
    :'defaults' => :'TemplateDefaults',
    :'fields' => :'Object',
    :'shared_field_data' => :'Object',
    :'field_order' => :'Array<Array<Float>>',
    :'document_md5' => :'String',
    :'document_filename' => :'String',
    :'document_parse_error' => :'Boolean',
    :'document_state' => :'String',
    :'embed_domains' => :'Array<String>',
    :'page_count' => :'Float',
    :'document_processed' => :'Boolean',
    :'demo' => :'Boolean',
    :'id' => :'String',
    :'template_type' => :'String',
    :'page_dimensions' => :'Array<Array<Float>>',
    :'document_url' => :'String',
    :'permanent_document_url' => :'String',
    :'path' => :'String',
    :'parent_folder_id' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
# File 'lib/docspring/models/full_template.rb', line 631

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      name == o.name &&
      description == o.description &&
      public_web_form == o.public_web_form &&
      public_submissions == o.public_submissions &&
      expire_submissions == o.expire_submissions &&
      expire_after == o.expire_after &&
      expiration_interval == o.expiration_interval &&
      allow_additional_properties == o.allow_additional_properties &&
      editable_submissions == o.editable_submissions &&
      locked == o.locked &&
      webhook_url == o.webhook_url &&
      slack_webhook_url == o.slack_webhook_url &&
      redirect_url == o.redirect_url &&
      first_template == o.first_template &&
      html == o.html &&
      header_html == o.header_html &&
      footer_html == o.footer_html &&
      scss == o.scss &&
      encrypt_pdfs == o.encrypt_pdfs &&
      encrypt_pdfs_password == o.encrypt_pdfs_password &&
      defaults == o.defaults &&
      fields == o.fields &&
      shared_field_data == o.shared_field_data &&
      field_order == o.field_order &&
      document_md5 == o.document_md5 &&
      document_filename == o.document_filename &&
      document_parse_error == o.document_parse_error &&
      document_state == o.document_state &&
      embed_domains == o.embed_domains &&
      page_count == o.page_count &&
      document_processed == o.document_processed &&
      demo == o.demo &&
      id == o.id &&
      template_type == o.template_type &&
      page_dimensions == o.page_dimensions &&
      document_url == o.document_url &&
      permanent_document_url == o.permanent_document_url &&
      path == o.path &&
      parent_folder_id == o.parent_folder_id
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



785
786
787
788
789
790
791
792
793
794
795
796
797
# File 'lib/docspring/models/full_template.rb', line 785

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


677
678
679
# File 'lib/docspring/models/full_template.rb', line 677

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



683
684
685
# File 'lib/docspring/models/full_template.rb', line 683

def hash
  [name, description, public_web_form, public_submissions, expire_submissions, expire_after, expiration_interval, allow_additional_properties, editable_submissions, locked, webhook_url, slack_webhook_url, redirect_url, first_template, html, header_html, footer_html, scss, encrypt_pdfs, encrypt_pdfs_password, defaults, fields, shared_field_data, field_order, document_md5, document_filename, document_parse_error, document_state, embed_domains, page_count, document_processed, demo, id, template_type, page_dimensions, document_url, permanent_document_url, path, parent_folder_id].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
538
539
540
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
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
# File 'lib/docspring/models/full_template.rb', line 494

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @public_web_form.nil?
    invalid_properties.push('invalid value for "public_web_form", public_web_form cannot be nil.')
  end

  if @public_submissions.nil?
    invalid_properties.push('invalid value for "public_submissions", public_submissions cannot be nil.')
  end

  if @expire_submissions.nil?
    invalid_properties.push('invalid value for "expire_submissions", expire_submissions cannot be nil.')
  end

  if @expire_after.nil?
    invalid_properties.push('invalid value for "expire_after", expire_after cannot be nil.')
  end

  if @expiration_interval.nil?
    invalid_properties.push('invalid value for "expiration_interval", expiration_interval 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 @editable_submissions.nil?
    invalid_properties.push('invalid value for "editable_submissions", editable_submissions cannot be nil.')
  end

  if @locked.nil?
    invalid_properties.push('invalid value for "locked", locked cannot be nil.')
  end

  if @first_template.nil?
    invalid_properties.push('invalid value for "first_template", first_template cannot be nil.')
  end

  if @encrypt_pdfs.nil?
    invalid_properties.push('invalid value for "encrypt_pdfs", encrypt_pdfs cannot be nil.')
  end

  if @defaults.nil?
    invalid_properties.push('invalid value for "defaults", defaults cannot be nil.')
  end

  if @fields.nil?
    invalid_properties.push('invalid value for "fields", fields cannot be nil.')
  end

  if @shared_field_data.nil?
    invalid_properties.push('invalid value for "shared_field_data", shared_field_data cannot be nil.')
  end

  if @field_order.nil?
    invalid_properties.push('invalid value for "field_order", field_order 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_state.nil?
    invalid_properties.push('invalid value for "document_state", document_state cannot be nil.')
  end

  if @page_count.nil?
    invalid_properties.push('invalid value for "page_count", page_count cannot be nil.')
  end

  if @document_processed.nil?
    invalid_properties.push('invalid value for "document_processed", document_processed cannot be nil.')
  end

  if @demo.nil?
    invalid_properties.push('invalid value for "demo", demo cannot be nil.')
  end

  if @id.nil?
    invalid_properties.push('invalid value for "id", id cannot be nil.')
  end

  if @template_type.nil?
    invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
  end

  if @path.nil?
    invalid_properties.push('invalid value for "path", path cannot be nil.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



761
762
763
# File 'lib/docspring/models/full_template.rb', line 761

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'lib/docspring/models/full_template.rb', line 767

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



755
756
757
# File 'lib/docspring/models/full_template.rb', line 755

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



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
# File 'lib/docspring/models/full_template.rb', line 590

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @public_web_form.nil?
  return false if @public_submissions.nil?
  return false if @expire_submissions.nil?
  return false if @expire_after.nil?
  return false if @expiration_interval.nil?
  expiration_interval_validator = EnumAttributeValidator.new('String', ["minutes", "hours", "days"])
  return false unless expiration_interval_validator.valid?(@expiration_interval)
  return false if @allow_additional_properties.nil?
  return false if @editable_submissions.nil?
  return false if @locked.nil?
  return false if @first_template.nil?
  return false if @encrypt_pdfs.nil?
  return false if @defaults.nil?
  return false if @fields.nil?
  return false if @shared_field_data.nil?
  return false if @field_order.nil?
  return false if @document_parse_error.nil?
  return false if @document_state.nil?
  return false if @page_count.nil?
  return false if @document_processed.nil?
  return false if @demo.nil?
  return false if @id.nil?
  return false if @template_type.nil?
  return false if @path.nil?
  true
end