Class: Io::Flow::V0::Models::FtpServer

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ FtpServer

Returns a new instance of FtpServer.



30983
30984
30985
30986
30987
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30983

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:hostname], 'FtpServer')
  @hostname = HttpClient::Preconditions.assert_class('hostname', opts.delete(:hostname), String)
end

Instance Attribute Details

#hostnameObject (readonly)

Returns the value of attribute hostname.



30981
30982
30983
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30981

def hostname
  @hostname
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



30993
30994
30995
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30993

def copy(incoming={})
  FtpServer.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



30997
30998
30999
31000
31001
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30997

def to_hash
  {
    :hostname => hostname
  }
end

#to_jsonObject



30989
30990
30991
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30989

def to_json
  JSON.dump(to_hash)
end