Sha256: 8f19094b6072d04b51ced2f07648611d808fb0e89c219d4e37d4eff73b2194ae
Contents?: true
Size: 1.16 KB
Versions: 37
Compression:
Stored size: 1.16 KB
Contents
module Actions module Candlepin module Product class Update < Candlepin::Abstract def plan(product) product.deleted_content.each do |product_content| plan_action(::Actions::Candlepin::Product::ContentRemove, :product_id => product.cp_id, :content_id => product_content.content.id) plan_action(::Actions::Candlepin::Product::ContentDestroy, :content_id => product_content.content.id) end product.added_content.each do |pc| content_create = plan_action(::Actions::Candlepin::Product::ContentCreate, :name => pc.content.name, :type => pc.content.type, :label => pc.content.label, :content_url => pc.content.contentUrl) plan_action(::Actions::Candlepin::Product::ContentAdd, :product_id => product.cp_id, :content_id => content_create.output[:response][:id]) end end end end end end
Version data entries
37 entries across 37 versions & 1 rubygems