Sha256: 938fa83d0a75e89923fb8f0405474c4cfa3bea339c65e450682ace97dede3007

Contents?: true

Size: 281 Bytes

Versions: 56

Compression:

Stored size: 281 Bytes

Contents

module ShopifyAPI
  class Metafield < Base
    include DisablePrefixCheck

    conditional_prefix :resource, true

    def value
      return if attributes["value"].nil?
      attributes["value_type"] == "integer" ? attributes["value"].to_i : attributes["value"]
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
shopify_api-4.0.5 lib/shopify_api/resources/metafield.rb
shopify_api-4.0.4 lib/shopify_api/resources/metafield.rb
shopify_api-4.0.3 lib/shopify_api/resources/metafield.rb
shopify_api-4.0.2 lib/shopify_api/resources/metafield.rb
shopify_api-4.0.1 lib/shopify_api/resources/metafield.rb
shopify_api-4.0.0 lib/shopify_api/resources/metafield.rb
shopify_api-3.2.7 lib/shopify_api/resources/metafield.rb
shopify_api-3.2.6 lib/shopify_api/resources/metafield.rb
shopify_api-3.2.5 lib/shopify_api/resources/metafield.rb
shopify_api-3.2.4 lib/shopify_api/resources/metafield.rb
shopify_api-3.2.3 lib/shopify_api/resources/metafield.rb
shopify_api-3.2.2 lib/shopify_api/resources/metafield.rb
shopify_api-3.2.1 lib/shopify_api/resources/metafield.rb
shopify_api-3.2.0 lib/shopify_api/resources/metafield.rb
shopify_api-3.1.8 lib/shopify_api/resources/metafield.rb
shopify_api-3.1.7 lib/shopify_api/resources/metafield.rb