class Io::Flow::V0::Models::AuthenticationTechnique

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 16855
def AuthenticationTechnique.ALL
  @@all ||= [AuthenticationTechnique.anonymous, AuthenticationTechnique.session, AuthenticationTechnique.token, AuthenticationTechnique.partner_token, AuthenticationTechnique.user]
end
anonymous() click to toggle source

No authentication necessary.

# File lib/flow_commerce/flow_api_v0_client.rb, line 16860
def AuthenticationTechnique.anonymous
  @@_anonymous ||= AuthenticationTechnique.new('anonymous')
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 16840
def AuthenticationTechnique.apply(value)
  if value.instance_of?(AuthenticationTechnique)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || AuthenticationTechnique.new(value))
  end
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 16850
def AuthenticationTechnique.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  AuthenticationTechnique.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 16835
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
partner_token() click to toggle source

A partner token. Partner Tokens can only access anonymous endpoints and the endpoints of the partner api.

# File lib/flow_commerce/flow_api_v0_client.rb, line 16878
def AuthenticationTechnique.partner_token
  @@_partner_token ||= AuthenticationTechnique.new('partner_token')
end
session() click to toggle source

A browser has been assigned an identifier by Flow to track their use of our service for an organization.

# File lib/flow_commerce/flow_api_v0_client.rb, line 16866
def AuthenticationTechnique.session
  @@_session ||= AuthenticationTechnique.new('session')
end
token() click to toggle source

A token. Tokens carry the same permissions as the user who originally created them.

# File lib/flow_commerce/flow_api_v0_client.rb, line 16872
def AuthenticationTechnique.token
  @@_token ||= AuthenticationTechnique.new('token')
end
user() click to toggle source

A user logs into Flow.

# File lib/flow_commerce/flow_api_v0_client.rb, line 16883
def AuthenticationTechnique.user
  @@_user ||= AuthenticationTechnique.new('user')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 16887
def to_hash
  value
end