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.



40597
40598
40599
40600
40601
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40597

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.



40595
40596
40597
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40595

def hostname
  @hostname
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



40607
40608
40609
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40607

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

#to_hashObject



40611
40612
40613
40614
40615
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40611

def to_hash
  {
    :hostname => hostname
  }
end

#to_jsonObject



40603
40604
40605
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40603

def to_json
  JSON.dump(to_hash)
end