Class: Io::Flow::V0::Models::OrganizationType

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) ⇒ OrganizationType

Returns a new instance of OrganizationType.



23986
23987
23988
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23986

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



23984
23985
23986
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23984

def value
  @value
end

Class Method Details

.ALLObject



24006
24007
24008
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24006

def OrganizationType.ALL
  @@all ||= [OrganizationType.standalone, OrganizationType.channel]
end

.apply(value) ⇒ Object

Returns the instance of OrganizationType for this value, creating a new instance for an unknown value



23991
23992
23993
23994
23995
23996
23997
23998
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23991

def OrganizationType.apply(value)
  if value.instance_of?(OrganizationType)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || OrganizationType.new(value))
  end
end

.channelObject



24014
24015
24016
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24014

def OrganizationType.channel
  @@_channel ||= OrganizationType.new('channel')
end

.from_string(value) ⇒ Object

Returns the instance of OrganizationType for this value, or nil if not found



24001
24002
24003
24004
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24001

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

.standaloneObject



24010
24011
24012
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24010

def OrganizationType.standalone
  @@_standalone ||= OrganizationType.new('standalone')
end

Instance Method Details

#to_hashObject



24018
24019
24020
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24018

def to_hash
  value
end