Class: Io::Flow::V0::Models::EcommercePlatformType

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

Returns a new instance of EcommercePlatformType.



19085
19086
19087
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19085

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



19083
19084
19085
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19083

def value
  @value
end

Class Method Details

.ALLObject



19105
19106
19107
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19105

def EcommercePlatformType.ALL
  @@all ||= [EcommercePlatformType.commercetools, EcommercePlatformType.custom, EcommercePlatformType.hybris, EcommercePlatformType.magento, EcommercePlatformType.shopify, EcommercePlatformType.shopify_markets, EcommercePlatformType.sfcc, EcommercePlatformType.solidus, EcommercePlatformType.workarea]
end

.apply(value) ⇒ Object

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



19090
19091
19092
19093
19094
19095
19096
19097
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19090

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

.commercetoolsObject



19109
19110
19111
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19109

def EcommercePlatformType.commercetools
  @@_commercetools ||= EcommercePlatformType.new('commercetools')
end

.customObject



19113
19114
19115
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19113

def EcommercePlatformType.custom
  @@_custom ||= EcommercePlatformType.new('custom')
end

.from_string(value) ⇒ Object

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



19100
19101
19102
19103
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19100

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

.hybrisObject



19117
19118
19119
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19117

def EcommercePlatformType.hybris
  @@_hybris ||= EcommercePlatformType.new('hybris')
end

.magentoObject



19121
19122
19123
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19121

def EcommercePlatformType.magento
  @@_magento ||= EcommercePlatformType.new('magento')
end

.sfccObject



19135
19136
19137
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19135

def EcommercePlatformType.sfcc
  @@_sfcc ||= EcommercePlatformType.new('sfcc')
end

.shopifyObject



19125
19126
19127
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19125

def EcommercePlatformType.shopify
  @@_shopify ||= EcommercePlatformType.new('shopify')
end

.shopify_marketsObject

Indicates that the organization is participating in the Shopify Markets channel - See



19131
19132
19133
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19131

def EcommercePlatformType.shopify_markets
  @@_shopify_markets ||= EcommercePlatformType.new('shopify_markets')
end

.solidusObject



19139
19140
19141
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19139

def EcommercePlatformType.solidus
  @@_solidus ||= EcommercePlatformType.new('solidus')
end

.workareaObject



19143
19144
19145
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19143

def EcommercePlatformType.workarea
  @@_workarea ||= EcommercePlatformType.new('workarea')
end

Instance Method Details

#to_hashObject



19147
19148
19149
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19147

def to_hash
  value
end