Class: Io::Flow::V0::Models::FlowRole
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FlowRole
- 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 FlowRole for this value, creating a new instance for an unknown value.
-
.channel_admin ⇒ Object
Can fully administrate a channel.
-
.channel_organization_admin ⇒ Object
Can fully administrate a channel organization.
-
.flow_operations ⇒ Object
Can access Flow internal functions.
-
.from_string(value) ⇒ Object
Returns the instance of FlowRole for this value, or nil if not found.
-
.organization_admin ⇒ Object
Can fully administrate a merchant organization.
-
.organization_customer_service ⇒ Object
Can access customer service functions and retreive relevant data.
-
.organization_finance ⇒ Object
Can access billing and reconcilliation functions and retreive relevant data.
-
.organization_fulfillment ⇒ Object
Can access fulfillment functions and retreive relevant data.
-
.organization_marketing ⇒ Object
Can access marketing functions and retreive relevant data.
-
.organization_merchant ⇒ Object
Can access merchant functions such as analytics, billing, experiences.
Instance Method Summary collapse
-
#initialize(value) ⇒ FlowRole
constructor
A new instance of FlowRole.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ FlowRole
Returns a new instance of FlowRole.
19150 19151 19152 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19150 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19148 19149 19150 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19148 def value @value end |
Class Method Details
.ALL ⇒ Object
19170 19171 19172 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19170 def FlowRole.ALL @@all ||= [FlowRole.organization_admin, FlowRole.organization_merchant, FlowRole.organization_customer_service, FlowRole.organization_fulfillment, FlowRole.organization_marketing, FlowRole.organization_finance, FlowRole.flow_operations, FlowRole.channel_admin, FlowRole.channel_organization_admin] end |
.apply(value) ⇒ Object
Returns the instance of FlowRole for this value, creating a new instance for an unknown value
19155 19156 19157 19158 19159 19160 19161 19162 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19155 def FlowRole.apply(value) if value.instance_of?(FlowRole) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FlowRole.new(value)) end end |
.channel_admin ⇒ Object
Can fully administrate a channel
19210 19211 19212 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19210 def FlowRole.channel_admin @@_channel_admin ||= FlowRole.new('channel_admin') end |
.channel_organization_admin ⇒ Object
Can fully administrate a channel organization
19215 19216 19217 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19215 def FlowRole.channel_organization_admin @@_channel_organization_admin ||= FlowRole.new('channel_organization_admin') end |
.flow_operations ⇒ Object
Can access Flow internal functions.
19205 19206 19207 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19205 def FlowRole.flow_operations @@_flow_operations ||= FlowRole.new('flow_operations') end |
.from_string(value) ⇒ Object
Returns the instance of FlowRole for this value, or nil if not found
19165 19166 19167 19168 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19165 def FlowRole.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FlowRole.ALL.find { |v| v.value == value } end |
.organization_admin ⇒ Object
Can fully administrate a merchant organization.
19175 19176 19177 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19175 def FlowRole.organization_admin @@_organization_admin ||= FlowRole.new('organization_admin') end |
.organization_customer_service ⇒ Object
Can access customer service functions and retreive relevant data.
19185 19186 19187 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19185 def FlowRole.organization_customer_service @@_organization_customer_service ||= FlowRole.new('organization_customer_service') end |
.organization_finance ⇒ Object
Can access billing and reconcilliation functions and retreive relevant data.
19200 19201 19202 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19200 def FlowRole.organization_finance @@_organization_finance ||= FlowRole.new('organization_finance') end |
.organization_fulfillment ⇒ Object
Can access fulfillment functions and retreive relevant data.
19190 19191 19192 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19190 def FlowRole.organization_fulfillment @@_organization_fulfillment ||= FlowRole.new('organization_fulfillment') end |
Instance Method Details
#to_hash ⇒ Object
19219 19220 19221 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19219 def to_hash value end |