Class: Io::Flow::V0::Models::FlowRole

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ FlowRole

Returns a new instance of FlowRole.



20636
20637
20638
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20636

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20634
20635
20636
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20634

def value
  @value
end

Class Method Details

.apply(value) ⇒ Object

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



20641
20642
20643
20644
20645
20646
20647
20648
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20641

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_adminObject

Can fully administrate a channel



20696
20697
20698
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20696

def FlowRole.channel_admin
  @@_channel_admin ||= FlowRole.new('channel_admin')
end

.channel_organization_adminObject

Can fully administrate a channel organization



20701
20702
20703
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20701

def FlowRole.channel_organization_admin
  @@_channel_organization_admin ||= FlowRole.new('channel_organization_admin')
end

.flow_operationsObject

Can access Flow internal functions.



20691
20692
20693
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20691

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



20651
20652
20653
20654
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20651

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

.organization_adminObject

Can fully administrate a merchant organization.



20661
20662
20663
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20661

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

.organization_customer_serviceObject

Can access customer service functions and retreive relevant data.



20671
20672
20673
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20671

def FlowRole.organization_customer_service
  @@_organization_customer_service ||= FlowRole.new('organization_customer_service')
end

.organization_financeObject

Can access billing and reconcilliation functions and retreive relevant data.



20686
20687
20688
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20686

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

.organization_fulfillmentObject

Can access fulfillment functions and retreive relevant data.



20676
20677
20678
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20676

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

.organization_marketingObject

Can access marketing functions and retreive relevant data.



20681
20682
20683
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20681

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

.organization_merchantObject

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



20666
20667
20668
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20666

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

Instance Method Details

#to_hashObject



20705
20706
20707
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20705

def to_hash
  value
end