encode<V> static method

V encode<V>(
  1. CustomerDiscountDeletedEvent instance,
  2. Encoder<V> encoder
)
override

Implementation

static V encode<V>(
  CustomerDiscountDeletedEvent instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  Discount.encode(
    instance.object,
    container.nestedSingleValueContainer('object').encoder,
  );
  container.encodeString(
    'type',
    'customer.discount.deleted',
  );
  return container.value;
}