encode<V> static method

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

Implementation

static V encode<V>(
  TerminalReaderReaderResourceProcessPaymentIntentAction instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  PaymentIntentOrId.encode(
    instance.paymentIntent,
    container.nestedSingleValueContainer('payment_intent').encoder,
  );
  if (instance.processConfig != null) {
    TerminalReaderReaderResourceProcessConfig.encode(
      instance.processConfig!,
      container.nestedSingleValueContainer('process_config').encoder,
    );
  }
  return container.value;
}