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.



15306
15307
15308
15309
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15306

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.



15304
15305
15306
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15304

def value
  @value
end

Class Method Details

.ALLObject



15327
15328
15329
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15327

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



15312
15313
15314
15315
15316
15317
15318
15319
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15312

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.



15362
15363
15364
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15362

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



15322
15323
15324
15325
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15322

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.



15332
15333
15334
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15332

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

.organization_financeObject

Can access billing and reconcilliation functions and retreive relevant data.



15357
15358
15359
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15357

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

.organization_fulfillmentObject

Can access fulfillment functions and retreive relevant data.



15347
15348
15349
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15347

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

.organization_marketingObject

Can access marketing functions and retreive relevant data.



15352
15353
15354
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15352

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

.organization_merchantObject

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



15337
15338
15339
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15337

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

.organization_operationsObject

Can access customer service functions and retreive relevant data.



15342
15343
15344
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15342

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

Instance Method Details

#subtype_to_hashObject



15366
15367
15368
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15366

def subtype_to_hash
  value
end