Class: Retab::UploadFileRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::UploadFileRequest
- Defined in:
- lib/retab/files/upload_file_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ filename: :filename, content_type: :content_type, size_bytes: :size_bytes, sha256: :sha_256 }.freeze
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
-
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ UploadFileRequest
constructor
A new instance of UploadFileRequest.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ UploadFileRequest
Returns a new instance of UploadFileRequest.
21 22 23 24 25 26 27 |
# File 'lib/retab/files/upload_file_request.rb', line 21 def initialize(json) hash = self.class.normalize(json) @filename = hash[:filename] @content_type = hash[:content_type] @size_bytes = hash[:size_bytes] @sha_256 = hash[:sha256] end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
15 16 17 |
# File 'lib/retab/files/upload_file_request.rb', line 15 def content_type @content_type end |
#filename ⇒ Object
Returns the value of attribute filename.
15 16 17 |
# File 'lib/retab/files/upload_file_request.rb', line 15 def filename @filename end |
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
15 16 17 |
# File 'lib/retab/files/upload_file_request.rb', line 15 def sha_256 @sha_256 end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
15 16 17 |
# File 'lib/retab/files/upload_file_request.rb', line 15 def size_bytes @size_bytes end |