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.



27524
27525
27526
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27524

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



27522
27523
27524
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27522

def value
  @value
end

Class Method Details

.ALLObject



27544
27545
27546
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27544

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



27529
27530
27531
27532
27533
27534
27535
27536
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27529

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



27539
27540
27541
27542
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27539

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.



27569
27570
27571
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27569

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

.smallObject

600x400



27564
27565
27566
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27564

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

.x_smallObject

500x600



27559
27560
27561
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27559

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

.xx_smallObject

390x400



27554
27555
27556
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27554

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

.xxx_smallObject

250x400



27549
27550
27551
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27549

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

Instance Method Details

#to_hashObject



27573
27574
27575
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27573

def to_hash
  value
end