Module: ShopifyAPI::Metafields
- Included in:
- Article, Blog, CustomCollection, Customer, DraftOrder, Order, Page, Product, SmartCollection, Variant
- Defined in:
- lib/shopify_api/metafields.rb
Instance Method Summary collapse
Instance Method Details
#add_metafield(metafield) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/shopify_api/metafields.rb', line 7 def () raise ArgumentError, "You can only add metafields to resource that has been saved" if new? . = { :resource => self.class.collection_name, :resource_id => id } .save end |