Class: Io::Flow::V0::Models::OrganizationType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrganizationType
- 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 OrganizationType for this value, creating a new instance for an unknown value.
- .channel ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of OrganizationType for this value, or nil if not found.
- .standalone ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ OrganizationType
constructor
A new instance of OrganizationType.
- #to_hash ⇒ Object
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
#value ⇒ Object (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
.ALL ⇒ Object
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 |
.channel ⇒ Object
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 |
.standalone ⇒ Object
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_hash ⇒ Object
24018 24019 24020 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24018 def to_hash value end |