Class: Io::Flow::V0::Models::ShopifySyncCheck

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

Returns a new instance of ShopifySyncCheck.



26705
26706
26707
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26705

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



26703
26704
26705
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26703

def value
  @value
end

Class Method Details

.ALLObject



26725
26726
26727
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26725

def ShopifySyncCheck.ALL
  @@all ||= [ShopifySyncCheck.localized_variants, ShopifySyncCheck.flow_variant_metafields]
end

.apply(value) ⇒ Object

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



26710
26711
26712
26713
26714
26715
26716
26717
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26710

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

.flow_variant_metafieldsObject

Provides status check of Flow variant metafields sync to Shopify



26735
26736
26737
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26735

def ShopifySyncCheck.flow_variant_metafields
  @@_flow_variant_metafields ||= ShopifySyncCheck.new('flow_variant_metafields')
end

.from_string(value) ⇒ Object

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



26720
26721
26722
26723
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26720

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

.localized_variantsObject

Provides status check of localized variant metafields sync to Shopify



26730
26731
26732
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26730

def ShopifySyncCheck.localized_variants
  @@_localized_variants ||= ShopifySyncCheck.new('localized_variants')
end

Instance Method Details

#to_hashObject



26739
26740
26741
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26739

def to_hash
  value
end