Sha256: e6cc10f80cb3796360b501928bf3dd908fc68873aca8427f9ade1d51537d5e24
Contents?: true
Size: 312 Bytes
Versions: 12
Compression:
Stored size: 312 Bytes
Contents
Spree::Order.class_eval do def self.build_from_api(user, params) order = create params[:line_items_attributes].each do |line_item| order.add_variant(Spree::Variant.find(line_item[:variant_id]), line_item[:quantity]) end order.user = user order.email = user.email order end end
Version data entries
12 entries across 12 versions & 1 rubygems