Class: Io::Flow::V0::Models::FlowAddonRole
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from FlowRole
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of FlowAddonRole for this value, creating a new instance for an unknown value.
-
.consumer_data_viewer ⇒ Object
Can view consumer’s private data.
-
.from_string(value) ⇒ Object
Returns the instance of FlowAddonRole for this value, or nil if not found.
-
.membership_manager ⇒ Object
Can invite new users to the org.
Instance Method Summary collapse
-
#initialize(value) ⇒ FlowAddonRole
constructor
A new instance of FlowAddonRole.
- #subtype_to_hash ⇒ Object
Methods inherited from FlowRole
Constructor Details
#initialize(value) ⇒ FlowAddonRole
Returns a new instance of FlowAddonRole.
13079 13080 13081 13082 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13079 def initialize(value) super(:name => FlowRole::Types::FLOW_ADDON_ROLE, :__discriminator__ => 'flow_addon_role') @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
13077 13078 13079 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13077 def value @value end |
Class Method Details
.ALL ⇒ Object
13100 13101 13102 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13100 def FlowAddonRole.ALL @@all ||= [FlowAddonRole.consumer_data_viewer, FlowAddonRole.membership_manager] end |
.apply(value) ⇒ Object
Returns the instance of FlowAddonRole for this value, creating a new instance for an unknown value
13085 13086 13087 13088 13089 13090 13091 13092 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13085 def FlowAddonRole.apply(value) if value.instance_of?(FlowAddonRole) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FlowAddonRole.new(value)) end end |
.consumer_data_viewer ⇒ Object
Can view consumer’s private data
13105 13106 13107 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13105 def FlowAddonRole.consumer_data_viewer @@_consumer_data_viewer ||= FlowAddonRole.new('consumer_data_viewer') end |
.from_string(value) ⇒ Object
Returns the instance of FlowAddonRole for this value, or nil if not found
13095 13096 13097 13098 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13095 def FlowAddonRole.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FlowAddonRole.ALL.find { |v| v.value == value } end |
.membership_manager ⇒ Object
Can invite new users to the org.
13110 13111 13112 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13110 def FlowAddonRole.membership_manager @@_membership_manager ||= FlowAddonRole.new('membership_manager') end |
Instance Method Details
#subtype_to_hash ⇒ Object
13114 13115 13116 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13114 def subtype_to_hash value end |