Class: Io::Flow::V0::Models::InlineWindowViewportSize

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

Returns a new instance of InlineWindowViewportSize.



21535
21536
21537
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21535

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



21533
21534
21535
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21533

def value
  @value
end

Class Method Details

.apply(value) ⇒ Object

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



21540
21541
21542
21543
21544
21545
21546
21547
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21540

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

.from_string(value) ⇒ Object

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



21550
21551
21552
21553
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21550

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

.fullscreenObject

Full Screen.



21580
21581
21582
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21580

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

.responsiveObject

Responsive layout, fits into whatever size the container is.



21585
21586
21587
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21585

def InlineWindowViewportSize.responsive
  @@_responsive ||= InlineWindowViewportSize.new('responsive')
end

.smallObject

600x400



21575
21576
21577
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21575

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

.x_smallObject

500x600



21570
21571
21572
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21570

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

.xx_smallObject

390x400



21565
21566
21567
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21565

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

.xxx_smallObject

250x400



21560
21561
21562
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21560

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

Instance Method Details

#to_hashObject



21589
21590
21591
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21589

def to_hash
  value
end