Class: Unit::Application::UploadDocumentRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/unit/models/application/upload_document_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(application_id, document_id, file, file_type, is_back_side: false) ⇒ UploadDocumentRequest

Returns a new instance of UploadDocumentRequest.

Parameters:

  • application_id (String)

    The application ID

  • document_id (String)

    The document ID

  • file (String)

    The file content

  • file_type (String)

    The file type. One of the Unit::Types::DocumentFileType constants.

  • is_back_side (Boolean) (defaults to: false)

    The file is back side



15
16
17
18
19
20
21
# File 'lib/unit/models/application/upload_document_request.rb', line 15

def initialize(application_id, document_id, file, file_type, is_back_side: false)
  @application_id = application_id
  @document_id = document_id
  @file = file
  @file_type = file_type
  @is_back_side = is_back_side
end

Instance Attribute Details

#application_idObject (readonly)

Returns the value of attribute application_id.



8
9
10
# File 'lib/unit/models/application/upload_document_request.rb', line 8

def application_id
  @application_id
end

#content_typeObject (readonly)

Returns the value of attribute content_type.



8
9
10
# File 'lib/unit/models/application/upload_document_request.rb', line 8

def content_type
  @content_type
end

#document_idObject (readonly)

Returns the value of attribute document_id.



8
9
10
# File 'lib/unit/models/application/upload_document_request.rb', line 8

def document_id
  @document_id
end

#fileObject (readonly)

Returns the value of attribute file.



8
9
10
# File 'lib/unit/models/application/upload_document_request.rb', line 8

def file
  @file
end

#file_typeObject (readonly)

Returns the value of attribute file_type.



8
9
10
# File 'lib/unit/models/application/upload_document_request.rb', line 8

def file_type
  @file_type
end

#is_back_sideObject (readonly)

Returns the value of attribute is_back_side.



8
9
10
# File 'lib/unit/models/application/upload_document_request.rb', line 8

def is_back_side
  @is_back_side
end