Class: Io::Flow::V0::Models::ThreedsTwoChallengeViewport

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

Returns a new instance of ThreedsTwoChallengeViewport.



21125
21126
21127
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21125

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



21123
21124
21125
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21123

def value
  @value
end

Class Method Details

.ALLObject



21145
21146
21147
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21145

def ThreedsTwoChallengeViewport.ALL
  @@all ||= [ThreedsTwoChallengeViewport.xxx_small, ThreedsTwoChallengeViewport.xx_small, ThreedsTwoChallengeViewport.x_small, ThreedsTwoChallengeViewport.small, ThreedsTwoChallengeViewport.fullscreen]
end

.apply(value) ⇒ Object

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



21130
21131
21132
21133
21134
21135
21136
21137
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21130

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

.from_string(value) ⇒ Object

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



21140
21141
21142
21143
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21140

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

.fullscreenObject

Full Screen. Not recommended for mobile devices at this time.



21170
21171
21172
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21170

def ThreedsTwoChallengeViewport.fullscreen
  @@_fullscreen ||= ThreedsTwoChallengeViewport.new('fullscreen')
end

.smallObject

600x400



21165
21166
21167
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21165

def ThreedsTwoChallengeViewport.small
  @@_small ||= ThreedsTwoChallengeViewport.new('small')
end

.x_smallObject

500x600



21160
21161
21162
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21160

def ThreedsTwoChallengeViewport.x_small
  @@_x_small ||= ThreedsTwoChallengeViewport.new('x_small')
end

.xx_smallObject

390x400



21155
21156
21157
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21155

def ThreedsTwoChallengeViewport.xx_small
  @@_xx_small ||= ThreedsTwoChallengeViewport.new('xx_small')
end

.xxx_smallObject

250x400



21150
21151
21152
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21150

def ThreedsTwoChallengeViewport.xxx_small
  @@_xxx_small ||= ThreedsTwoChallengeViewport.new('xxx_small')
end

Instance Method Details

#to_hashObject



21174
21175
21176
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21174

def to_hash
  value
end