Sha256: f53982d0c621b55fd51a728aab505c65f81f0f54003adeb07d3b39d8ea76ddbe
Contents?: true
Size: 501 Bytes
Versions: 29
Compression:
Stored size: 501 Bytes
Contents
module ShopifyAPI module Metafields def metafields(**options) options.merge! resource: self.class.collection_name, resource_id: id Metafield.find :all, params: options end def add_metafield(metafield) raise ArgumentError, "You can only add metafields to resource that has been saved" if new? metafield.prefix_options = { :resource => self.class.collection_name, :resource_id => id } metafield.save metafield end end end
Version data entries
29 entries across 29 versions & 1 rubygems