diff --git a/app/serializers/api/admin/subscription_customer_serializer.rb b/app/serializers/api/admin/subscription_customer_serializer.rb index 6f8490abec..2cb10bf80a 100644 --- a/app/serializers/api/admin/subscription_customer_serializer.rb +++ b/app/serializers/api/admin/subscription_customer_serializer.rb @@ -6,13 +6,8 @@ module Api # Searches for a ship and bill addresses for the customer # where they are not already explicitly set class SubscriptionCustomerSerializer < CustomerSerializer - def bill_address - finder.bill_address - end - - def ship_address - finder.ship_address - end + delegate :bill_address, to: :finder + delegate :ship_address, to: :finder def finder @finder ||= OpenFoodNetwork::AddressFinder.new(object, object.email)