Class: Io::Flow::V0::Models::FlowUserRole
- 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 FlowUserRole for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of FlowUserRole for this value, or nil if not found.
-
.organization_admin ⇒ Object
Can fully administrate a merchant organization.
-
.organization_merchant ⇒ Object
Can access merchant functions such as analytics, billing, experiences.
-
.organization_operations ⇒ Object
Can access customer service functions and retreive relevant data.
Instance Method Summary collapse
-
#initialize(value) ⇒ FlowUserRole
constructor
A new instance of FlowUserRole.
- #subtype_to_hash ⇒ Object
Methods inherited from FlowRole
Constructor Details
#initialize(value) ⇒ FlowUserRole
Returns a new instance of FlowUserRole.
12909 12910 12911 12912 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12909 def initialize(value) super(:name => FlowRole::Types::FLOW_USER_ROLE, :__discriminator__ => 'flow_user_role') @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
12907 12908 12909 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12907 def value @value end |
Class Method Details
.ALL ⇒ Object
12930 12931 12932 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12930 def FlowUserRole.ALL @@all ||= [FlowUserRole.organization_admin, FlowUserRole.organization_merchant, FlowUserRole.organization_operations] end |
.apply(value) ⇒ Object
Returns the instance of FlowUserRole for this value, creating a new instance for an unknown value
12915 12916 12917 12918 12919 12920 12921 12922 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12915 def FlowUserRole.apply(value) if value.instance_of?(FlowUserRole) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FlowUserRole.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of FlowUserRole for this value, or nil if not found
12925 12926 12927 12928 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12925 def FlowUserRole.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FlowUserRole.ALL.find { |v| v.value == value } end |
.organization_admin ⇒ Object
Can fully administrate a merchant organization.
12935 12936 12937 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12935 def FlowUserRole.organization_admin @@_organization_admin ||= FlowUserRole.new('organization_admin') end |
.organization_merchant ⇒ Object
Can access merchant functions such as analytics, billing, experiences.
12940 12941 12942 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12940 def FlowUserRole.organization_merchant @@_organization_merchant ||= FlowUserRole.new('organization_merchant') end |
.organization_operations ⇒ Object
Can access customer service functions and retreive relevant data.
12945 12946 12947 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12945 def FlowUserRole.organization_operations @@_organization_operations ||= FlowUserRole.new('organization_operations') end |
Instance Method Details
#subtype_to_hash ⇒ Object
12949 12950 12951 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12949 def subtype_to_hash value end |