encode<V> static method

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

Implementation

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