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.



43816
43817
43818
43819
43820
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43816

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.



43814
43815
43816
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43814

def hostname
  @hostname
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



43826
43827
43828
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43826

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

#to_hashObject



43830
43831
43832
43833
43834
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43830

def to_hash
  {
    :hostname => hostname
  }
end

#to_jsonObject



43822
43823
43824
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43822

def to_json
  JSON.dump(to_hash)
end