summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions/churn_buster/subscription_customer_serializer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/solidus_subscriptions/churn_buster/subscription_customer_serializer.rb')
-rw-r--r--lib/solidus_subscriptions/churn_buster/subscription_customer_serializer.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/solidus_subscriptions/churn_buster/subscription_customer_serializer.rb b/lib/solidus_subscriptions/churn_buster/subscription_customer_serializer.rb
new file mode 100644
index 0000000..700c1c6
--- /dev/null
+++ b/lib/solidus_subscriptions/churn_buster/subscription_customer_serializer.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module SolidusSubscriptions
+ module ChurnBuster
+ class SubscriptionCustomerSerializer < Serializer
+ def to_h
+ {
+ source: 'in_house',
+ source_id: object.id,
+ email: object.user.email,
+ properties: {
+ first_name: object.shipping_address_to_use.firstname,
+ last_name: object.shipping_address_to_use.lastname,
+ },
+ }
+ end
+ end
+ end
+end