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.



19238
19239
19240
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19238

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



19236
19237
19238
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19236

def value
  @value
end

Class Method Details

.ALLObject



19258
19259
19260
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19258

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

.apply(value) ⇒ Object

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



19243
19244
19245
19246
19247
19248
19249
19250
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19243

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



19253
19254
19255
19256
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19253

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

.fullscreenObject

Full Screen.



19283
19284
19285
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19283

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

.responsiveObject

Responsive layout, fits into whatever size the container is.



19288
19289
19290
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19288

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

.smallObject

600x400



19278
19279
19280
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19278

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

.x_smallObject

500x600



19273
19274
19275
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19273

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

.xx_smallObject

390x400



19268
19269
19270
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19268

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

.xxx_smallObject

250x400



19263
19264
19265
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19263

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

Instance Method Details

#to_hashObject



19292
19293
19294
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19292

def to_hash
  value
end