Class: Worldline::Connect::SDK::V1::Domain::HostedFile
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::HostedFile
- Defined in:
- lib/worldline/connect/sdk/v1/domain/hosted_file.rb
Instance Attribute Summary collapse
-
#file_name ⇒ String
The current value of file_name.
-
#file_size ⇒ String
The current value of file_size.
-
#file_type ⇒ String
The current value of file_type.
-
#id ⇒ String
The current value of id.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#file_name ⇒ String
Returns the current value of file_name.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/hosted_file.rb', line 16 def file_name @file_name end |
#file_size ⇒ String
Returns the current value of file_size.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/hosted_file.rb', line 16 def file_size @file_size end |
#file_type ⇒ String
Returns the current value of file_type.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/hosted_file.rb', line 16 def file_type @file_type end |
#id ⇒ String
Returns the current value of id.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/hosted_file.rb', line 16 def id @id end |
Instance Method Details
#from_hash(hash) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/worldline/connect/sdk/v1/domain/hosted_file.rb', line 36 def from_hash(hash) super if hash.has_key? 'fileName' @file_name = hash['fileName'] end if hash.has_key? 'fileSize' @file_size = hash['fileSize'] end if hash.has_key? 'fileType' @file_type = hash['fileType'] end if hash.has_key? 'id' @id = hash['id'] end end |
#to_h ⇒ Hash
27 28 29 30 31 32 33 34 |
# File 'lib/worldline/connect/sdk/v1/domain/hosted_file.rb', line 27 def to_h hash = super hash['fileName'] = @file_name unless @file_name.nil? hash['fileSize'] = @file_size unless @file_size.nil? hash['fileType'] = @file_type unless @file_type.nil? hash['id'] = @id unless @id.nil? hash end |