class Ingenico::Connect::SDK::Domain::File::HostedFile

@attr [String] file_name @attr [String] file_size @attr [String] file_type @attr [String] id

Attributes

file_name[RW]
file_size[RW]
file_type[RW]
id[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/file/hosted_file.rb, line 35
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() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/file/hosted_file.rb, line 26
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