encode<V> static method

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

Implementation

static V encode<V>(
  PaymentMethodDetailsAfterpayClearpay instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.orderId != null) {
    container.encodeString(
      'order_id',
      instance.orderId!,
    );
  }
  if (instance.reference != null) {
    container.encodeString(
      'reference',
      instance.reference!,
    );
  }
  return container.value;
}