Sha256: 5ed88b06bbe6cdce071e5e8b22adb46b9461507097b1ac9e927a45ae30ffaeb1

Contents?: true

Size: 346 Bytes

Versions: 8

Compression:

Stored size: 346 Bytes

Contents

# frozen_string_literal: true
module ShopifyAPI
  class Metafield < Base
    include DisablePrefixCheck

    conditional_prefix :resource, true
    early_july_pagination_release!

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

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
ruby_shopify_api-1.2.0 lib/ruby_shopify_api/resources/metafield.rb
ruby_shopify_api-1.1.0 lib/shopify_api/resources/metafield.rb
ruby_shopify_api-1.0.0 lib/shopify_api/resources/metafield.rb
shopify_api-9.5.1 lib/shopify_api/resources/metafield.rb
shopify_api-9.5 lib/shopify_api/resources/metafield.rb
shopify_api-9.4.1 lib/shopify_api/resources/metafield.rb
shopify_api-9.4.0 lib/shopify_api/resources/metafield.rb
shopify_api-9.3.0 lib/shopify_api/resources/metafield.rb