Class: Io::Flow::V0::Models::FtpFileSource

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ FtpFileSource

Returns a new instance of FtpFileSource.



16580
16581
16582
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16580

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



16578
16579
16580
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16578

def value
  @value
end

Class Method Details

.ALLObject



16600
16601
16602
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16600

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



16585
16586
16587
16588
16589
16590
16591
16592
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16585

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

.flowObject

Indicates flow created this file



16605
16606
16607
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16605

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



16595
16596
16597
16598
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16595

def FtpFileSource.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  FtpFileSource.ALL.find { |v| v.value == value }
end

.organizationObject

Indicates the organization created this file



16610
16611
16612
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16610

def FtpFileSource.organization
  @@_organization ||= FtpFileSource.new('organization')
end

Instance Method Details

#to_hashObject



16614
16615
16616
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16614

def to_hash
  value
end