Class: Io::Flow::V0::Models::FtpFileForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FtpFileForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Create a file that will be uploaded to this organization’s FTP Server
Instance Attribute Summary collapse
-
#directory ⇒ Object
readonly
Returns the value of attribute directory.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ FtpFileForm
constructor
A new instance of FtpFileForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ FtpFileForm
Returns a new instance of FtpFileForm.
31924 31925 31926 31927 31928 31929 31930 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31924 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:url, :directory], 'FtpFileForm') @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String) @directory = HttpClient::Preconditions.assert_class('directory', opts.delete(:directory), String) @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)) end |
Instance Attribute Details
#directory ⇒ Object (readonly)
Returns the value of attribute directory.
31922 31923 31924 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31922 def directory @directory end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
31922 31923 31924 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31922 def name @name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
31922 31923 31924 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31922 def url @url end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
31936 31937 31938 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31936 def copy(incoming={}) FtpFileForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
31940 31941 31942 31943 31944 31945 31946 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31940 def to_hash { :url => url, :directory => directory, :name => name } end |
#to_json ⇒ Object
31932 31933 31934 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31932 def to_json JSON.dump(to_hash) end |