class Io::Flow::V0::Models::ImageTag

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21246
def ImageTag.ALL
  @@all ||= [ImageTag.thumbnail, ImageTag.checkout]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 21231
def ImageTag.apply(value)
  if value.instance_of?(ImageTag)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || ImageTag.new(value))
  end
end
checkout() click to toggle source

Checkout images identify the item image to use when displaying the item in the context of a consumer checkout (e.g. cart, checkout page).

# File lib/flow_commerce/flow_api_v0_client.rb, line 21258
def ImageTag.checkout
  @@_checkout ||= ImageTag.new('checkout')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 21241
def ImageTag.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  ImageTag.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21226
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
thumbnail() click to toggle source

Thumbnail images identify the image to use when displaying products in the Flow Console.

# File lib/flow_commerce/flow_api_v0_client.rb, line 21252
def ImageTag.thumbnail
  @@_thumbnail ||= ImageTag.new('thumbnail')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21262
def to_hash
  value
end