encode<V> static method

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

Implementation

static V encode<V>(
  ConfirmationTokensResourceMandateDataResourceCustomerAcceptance instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.online != null) {
    ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceOnline
        .encode(
      instance.online!,
      container.nestedSingleValueContainer('online').encoder,
    );
  }
  container.encodeString(
    'type',
    instance.type,
  );
  return container.value;
}