I think you should take a step back and remember that an entity is supposed to represent an object, because it doesn't really seem like that's what you're doing here. So you should have one entity representing your codebase's concept of an Order object (AsSeller sounds like a visibility restriction, not an object), and use with_options
to restrict what is or is not exposed.
module Entities
class Order < Grape::Entity
expose :name
with_options(if: { visibility: :seller }) do
expose :note
end
end
end
order = { name: 'Relax', note: "Don't do it" }
# Standard order representation
Entities::Order.represent(order).serializable_hash
=> {:name=>"Relax"}
# Order represented with visibility: :seller
Entities::Order.represent(order, visibility: :seller).serializable_hash
=> {:name=>"Relax", :note=>"Don't do it"}
Alternatively, if it's just a matter of conditionally exposing an attribute that only exists on certain descendants of the order model, you should be able to do something like this:
expose :note, if: ->(order, _) { order.respond_to?(:note) }
If you really need to include a subset of attributes defined elsewhere, you could write a Concern and include it in another entity, but from the context available to me in your question and the naming you've used, it doesn't seem like that's a good solution here.