Module: Assently::ApiMappers::DocumentMapper

Defined in:
lib/assently/api_mappers/document_mapper.rb

Class Method Summary collapse

Class Method Details

.to_api(document) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/assently/api_mappers/document_mapper.rb', line 6

def self.to_api document
  {
    "Filename" => document.filename,
    "Data" => document.data,
    "ContentType" => document.content_type,
    "Size" => document.size,
    "FormFields" => document.form_fields.map { |form_field|
      Assently::ApiMappers::FormFieldMapper.to_api(form_field)
    }
  }
end