Class: Io::Flow::V0::Models::FlowUserRole

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) ⇒ FlowUserRole

Returns a new instance of FlowUserRole.



14505
14506
14507
14508
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14505

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

#valueObject (readonly)

Returns the value of attribute value.



14503
14504
14505
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14503

def value
  @value
end

Class Method Details

.ALLObject



14526
14527
14528
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14526

def FlowUserRole.ALL
  @@all ||= [FlowUserRole.organization_admin, FlowUserRole.organization_merchant, FlowUserRole.organization_operations, FlowUserRole.organization_fulfillment, FlowUserRole.organization_marketing, FlowUserRole.organization_finance, FlowUserRole.flow_operations]
end

.apply(value) ⇒ Object

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



14511
14512
14513
14514
14515
14516
14517
14518
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14511

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

.flow_operationsObject

Can access Flow internal functions.



14561
14562
14563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14561

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

.from_string(value) ⇒ Object

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



14521
14522
14523
14524
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14521

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

.organization_adminObject

Can fully administrate a merchant organization.



14531
14532
14533
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14531

def FlowUserRole.organization_admin
  @@_organization_admin ||= FlowUserRole.new('organization_admin')
end

.organization_financeObject

Can access billing and reconcilliation functions and retreive relevant data.



14556
14557
14558
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14556

def FlowUserRole.organization_finance
  @@_organization_finance ||= FlowUserRole.new('organization_finance')
end

.organization_fulfillmentObject

Can access fulfillment functions and retreive relevant data.



14546
14547
14548
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14546

def FlowUserRole.organization_fulfillment
  @@_organization_fulfillment ||= FlowUserRole.new('organization_fulfillment')
end

.organization_marketingObject

Can access marketing functions and retreive relevant data.



14551
14552
14553
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14551

def FlowUserRole.organization_marketing
  @@_organization_marketing ||= FlowUserRole.new('organization_marketing')
end

.organization_merchantObject

Can access merchant functions such as analytics, billing, experiences.



14536
14537
14538
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14536

def FlowUserRole.organization_merchant
  @@_organization_merchant ||= FlowUserRole.new('organization_merchant')
end

.organization_operationsObject

Can access customer service functions and retreive relevant data.



14541
14542
14543
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14541

def FlowUserRole.organization_operations
  @@_organization_operations ||= FlowUserRole.new('organization_operations')
end

Instance Method Details

#subtype_to_hashObject



14565
14566
14567
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14565

def subtype_to_hash
  value
end