encode<V> static method

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

Implementation

static V encode<V>(
  PaymentIntentNextActionDisplayOxxoDetails instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.expiresAfter != null) {
    container.encodeDateTime(
      'expires_after',
      instance.expiresAfter!,
    );
  }
  if (instance.hostedVoucherUrl != null) {
    container.encodeString(
      'hosted_voucher_url',
      instance.hostedVoucherUrl!,
    );
  }
  if (instance.number != null) {
    container.encodeString(
      'number',
      instance.number!,
    );
  }
  return container.value;
}