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.



20709
20710
20711
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20709

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20707
20708
20709
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20707

def value
  @value
end

Class Method Details

.ALLObject



20729
20730
20731
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20729

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



20714
20715
20716
20717
20718
20719
20720
20721
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20714

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



20724
20725
20726
20727
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20724

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.



20754
20755
20756
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20754

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

.smallObject

600x400



20749
20750
20751
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20749

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

.x_smallObject

500x600



20744
20745
20746
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20744

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

.xx_smallObject

390x400



20739
20740
20741
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20739

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

.xxx_smallObject

250x400



20734
20735
20736
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20734

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

Instance Method Details

#to_hashObject



20758
20759
20760
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20758

def to_hash
  value
end