Class: Io::Flow::V0::Models::FtpFileSource
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FtpFileSource
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of FtpFileSource for this value, creating a new instance for an unknown value.
-
.flow ⇒ Object
Indicates flow created this file.
-
.from_string(value) ⇒ Object
Returns the instance of FtpFileSource for this value, or nil if not found.
-
.organization ⇒ Object
Indicates the organization created this file.
Instance Method Summary collapse
-
#initialize(value) ⇒ FtpFileSource
constructor
A new instance of FtpFileSource.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ FtpFileSource
Returns a new instance of FtpFileSource.
20858 20859 20860 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20858 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20856 20857 20858 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20856 def value @value end |
Class Method Details
.ALL ⇒ Object
20878 20879 20880 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20878 def FtpFileSource.ALL @@all ||= [FtpFileSource.flow, FtpFileSource.organization] end |
.apply(value) ⇒ Object
Returns the instance of FtpFileSource for this value, creating a new instance for an unknown value
20863 20864 20865 20866 20867 20868 20869 20870 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20863 def FtpFileSource.apply(value) if value.instance_of?(FtpFileSource) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FtpFileSource.new(value)) end end |
.flow ⇒ Object
Indicates flow created this file
20883 20884 20885 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20883 def FtpFileSource.flow @@_flow ||= FtpFileSource.new('flow') end |
.from_string(value) ⇒ Object
Returns the instance of FtpFileSource for this value, or nil if not found
20873 20874 20875 20876 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20873 def FtpFileSource.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FtpFileSource.ALL.find { |v| v.value == value } end |
.organization ⇒ Object
Indicates the organization created this file
20888 20889 20890 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20888 def FtpFileSource.organization @@_organization ||= FtpFileSource.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
20892 20893 20894 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20892 def to_hash value end |