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.



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

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20756
20757
20758
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20756

def value
  @value
end

Class Method Details

.ALLObject



20778
20779
20780
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20778

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



20763
20764
20765
20766
20767
20768
20769
20770
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20763

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



20773
20774
20775
20776
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20773

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.



20803
20804
20805
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20803

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

.smallObject

600x400



20798
20799
20800
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20798

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

.x_smallObject

500x600



20793
20794
20795
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20793

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

.xx_smallObject

390x400



20788
20789
20790
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20788

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

.xxx_smallObject

250x400



20783
20784
20785
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20783

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

Instance Method Details

#to_hashObject



20807
20808
20809
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20807

def to_hash
  value
end