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.



33178
33179
33180
33181
33182
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33178

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.



33176
33177
33178
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33176

def hostname
  @hostname
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



33188
33189
33190
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33188

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

#to_hashObject



33192
33193
33194
33195
33196
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33192

def to_hash
  {
    :hostname => hostname
  }
end

#to_jsonObject



33184
33185
33186
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33184

def to_json
  JSON.dump(to_hash)
end