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.



32563
32564
32565
32566
32567
32568
32569
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32563

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.



32561
32562
32563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32561

def description
  @description
end

#pathObject (readonly)

Returns the value of attribute path.



32561
32562
32563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32561

def path
  @path
end

#webhookObject (readonly)

Returns the value of attribute webhook.



32561
32562
32563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32561

def webhook
  @webhook
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



32575
32576
32577
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32575

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

#to_hashObject



32579
32580
32581
32582
32583
32584
32585
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32579

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

#to_jsonObject



32571
32572
32573
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32571

def to_json
  JSON.dump(to_hash)
end