encode<V> static method

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

Implementation

static V encode<V>(
  CardIssuingAccountTermsOfService instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.date != null) {
    container.encodeInt(
      'date',
      instance.date!,
    );
  }
  if (instance.ip != null) {
    container.encodeString(
      'ip',
      instance.ip!,
    );
  }
  if (instance.userAgent != null) {
    container.encodeString(
      'user_agent',
      instance.userAgent!,
    );
  }
  return container.value;
}