Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Updated Events Product Serializer

Damian Legawiecefd3938583f5
diff --git a/core/app/serializers/spree/events/product_serializer.rb b/core/app/serializers/spree/events/product_serializer.rb
index 2f786e6d31..49d0bad6dd 100644
--- a/core/app/serializers/spree/events/product_serializer.rb
+++ b/core/app/serializers/spree/events/product_serializer.rb
@@ -11,9 +11,10 @@ module Spree
name: resource.name,
slug: resource.slug,
status: resource.status.to_s,
+ tax_category_id: resource.tax_category_id,
+ shipping_category_id: resource.shipping_category_id,
available_on: timestamp(resource.available_on),
discontinue_on: timestamp(resource.discontinue_on),
- store_ids: resource.store_ids,
created_at: timestamp(resource.created_at),
updated_at: timestamp(resource.updated_at)
}
diff --git a/core/spec/serializers/spree/events/product_serializer_spec.rb b/core/spec/serializers/spree/events/product_serializer_spec.rb
index bbe9d87a28..b78ccbcec6 100644
--- a/core/spec/serializers/spree/events/product_serializer_spec.rb
+++ b/core/spec/serializers/spree/events/product_serializer_spec.rb
@@ -30,10 +30,6 @@ RSpec.describe Spree::Events::ProductSerializer do
expect(subject).to have_key(:discontinue_on)
end
- it 'includes store_ids' do
- expect(subject[:store_ids]).to eq([store.id])
- end
-
it 'includes timestamps' do
expect(subject[:created_at]).to be_present
expect(subject[:updated_at]).to be_present