Class: Io::Flow::V0::Models::AuthorizationResultActionType

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

Returns a new instance of AuthorizationResultActionType.



17048
17049
17050
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17048

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



17046
17047
17048
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17046

def value
  @value
end

Class Method Details

.ALLObject



17068
17069
17070
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17068

def AuthorizationResultActionType.ALL
  @@all ||= [AuthorizationResultActionType.native, AuthorizationResultActionType.redirect, AuthorizationResultActionType.wait]
end

.apply(value) ⇒ Object

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



17053
17054
17055
17056
17057
17058
17059
17060
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17053

def AuthorizationResultActionType.apply(value)
  if value.instance_of?(AuthorizationResultActionType)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || AuthorizationResultActionType.new(value))
  end
end

.from_string(value) ⇒ Object

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



17063
17064
17065
17066
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17063

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

.nativeObject

Indicates an authorization action should be presented to the user natively in the browser via an sdk or other mechanism.



17074
17075
17076
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17074

def AuthorizationResultActionType.native
  @@_native ||= AuthorizationResultActionType.new('native')
end

.redirectObject

Indicates that the user should be redirected to the provided URL.



17079
17080
17081
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17079

def AuthorizationResultActionType.redirect
  @@_redirect ||= AuthorizationResultActionType.new('redirect')
end

.waitObject

Indicates that more time is needed before the authorization result is known. In the case of 3D Secure, this means the authorization status should be polled until it is no longer pending.



17086
17087
17088
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17086

def AuthorizationResultActionType.wait
  @@_wait ||= AuthorizationResultActionType.new('wait')
end

Instance Method Details

#to_hashObject



17090
17091
17092
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17090

def to_hash
  value
end