Class: Io::Flow::V0::Models::FtpFolderForm

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 = {}) ⇒ FtpFolderForm

Returns a new instance of FtpFolderForm.



38692
38693
38694
38695
38696
38697
38698
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38692

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:path], 'FtpFolderForm')
  @path = HttpClient::Preconditions.assert_class('path', opts.delete(:path), String)
  @webhook = HttpClient::Preconditions.assert_boolean('webhook', (x = opts.delete(:webhook); x.nil? ? false : x))
  @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



38690
38691
38692
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38690

def description
  @description
end

#pathObject (readonly)

Returns the value of attribute path.



38690
38691
38692
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38690

def path
  @path
end

#webhookObject (readonly)

Returns the value of attribute webhook.



38690
38691
38692
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38690

def webhook
  @webhook
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



38704
38705
38706
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38704

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

#to_hashObject



38708
38709
38710
38711
38712
38713
38714
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38708

def to_hash
  {
    :path => path,
    :webhook => webhook,
    :description => description
  }
end

#to_jsonObject



38700
38701
38702
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38700

def to_json
  JSON.dump(to_hash)
end