mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Add missing full_name bind to subscriptions serializer
This commit is contained in:
committed by
Maikel Linke
parent
23776c7a3e
commit
836a60a6c7
@@ -4,9 +4,9 @@ module Api
|
||||
module Admin
|
||||
class SubscriptionSerializer < ActiveModel::Serializer
|
||||
attributes :id, :shop_id, :customer_id, :schedule_id, :payment_method_id, :shipping_method_id,
|
||||
:begins_at, :ends_at,
|
||||
:customer_email, :customer_first_name, :customer_last_name, :schedule_name, :edit_path, :canceled_at,
|
||||
:paused_at, :state, :shipping_fee_estimate, :payment_fee_estimate
|
||||
:begins_at, :ends_at, :customer_email, :customer_first_name, :customer_last_name,
|
||||
:customer_full_name, :schedule_name, :edit_path, :canceled_at, :paused_at, :state,
|
||||
:shipping_fee_estimate, :payment_fee_estimate
|
||||
|
||||
has_many :subscription_line_items, serializer: Api::Admin::SubscriptionLineItemSerializer
|
||||
has_many :closed_proxy_orders, serializer: Api::Admin::ProxyOrderSerializer
|
||||
@@ -42,6 +42,10 @@ module Api
|
||||
object.customer&.last_name
|
||||
end
|
||||
|
||||
def customer_full_name
|
||||
object.customer&.full_name
|
||||
end
|
||||
|
||||
def schedule_name
|
||||
object.schedule&.name
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user