Class: Io::Flow::V0::Models::FlowAddonRole

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

Instance Attribute Summary collapse

Attributes inherited from FlowRole

#__discriminator__

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FlowRole

from_json, #to_hash

Constructor Details

#initialize(value) ⇒ FlowAddonRole

Returns a new instance of FlowAddonRole.



12738
12739
12740
12741
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12738

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

#valueObject (readonly)

Returns the value of attribute value.



12736
12737
12738
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12736

def value
  @value
end

Class Method Details

.ALLObject



12759
12760
12761
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12759

def FlowAddonRole.ALL
  @@all ||= [FlowAddonRole.consumer_data_viewer, FlowAddonRole.membership_manager, FlowAddonRole.flow_operations]
end

.apply(value) ⇒ Object

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



12744
12745
12746
12747
12748
12749
12750
12751
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12744

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_viewerObject

Can view consumer’s private data



12764
12765
12766
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12764

def FlowAddonRole.consumer_data_viewer
  @@_consumer_data_viewer ||= FlowAddonRole.new('consumer_data_viewer')
end

.flow_operationsObject

User works at Flow and can perform additional backend functions for an organization.



12775
12776
12777
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12775

def FlowAddonRole.flow_operations
  @@_flow_operations ||= FlowAddonRole.new('flow_operations')
end

.from_string(value) ⇒ Object

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



12754
12755
12756
12757
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12754

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

.membership_managerObject

Can invite new users to the org.



12769
12770
12771
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12769

def FlowAddonRole.membership_manager
  @@_membership_manager ||= FlowAddonRole.new('membership_manager')
end

Instance Method Details

#subtype_to_hashObject



12779
12780
12781
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12779

def subtype_to_hash
  value
end