Method: DocSpring::UploadTemplateDataDocument#initialize

Defined in:
lib/docspring/models/upload_template_data_document.rb

#initialize(attributes = {}) ⇒ UploadTemplateDataDocument

Initializes the object

Parameters:

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

    Model attributes in the form of hash



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/docspring/models/upload_template_data_document.rb', line 65

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?(:'metadata')
    self. = attributes[:'metadata']
  end

  if attributes.has_key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.has_key?(:'storage')
    self.storage = attributes[:'storage']
  end
end