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.

Added Payment Source serializers

Damian Legawiecc742df1c1262
diff --git a/api/app/serializers/spree/api/v2/platform/payment_source_serializer.rb b/api/app/serializers/spree/api/v2/platform/payment_source_serializer.rb
new file mode 100644
index 0000000000..665418bf68
--- /dev/null
+++ b/api/app/serializers/spree/api/v2/platform/payment_source_serializer.rb
@@ -0,0 +1,12 @@
+module Spree
+ module Api
+ module V2
+ module Platform
+ class PaymentSourceSerializer < BaseSerializer
+ belongs_to :payment_method
+ belongs_to :user
+ end
+ end
+ end
+ end
+end
diff --git a/api/app/serializers/spree/v2/storefront/payment_source_serializer.rb b/api/app/serializers/spree/v2/storefront/payment_source_serializer.rb
new file mode 100644
index 0000000000..d9550490b0
--- /dev/null
+++ b/api/app/serializers/spree/v2/storefront/payment_source_serializer.rb
@@ -0,0 +1,10 @@
+module Spree
+ module V2
+ module Storefront
+ class PaymentSourceSerializer < BaseSerializer
+ belongs_to :payment_method
+ belongs_to :user
+ end
+ end
+ end
+end