encode<V> static method

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

Implementation

static V encode<V>(
  TerminalConfigurationConfigurationResourceTipping instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.aud != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.aud!,
      container.nestedSingleValueContainer('aud').encoder,
    );
  }
  if (instance.cad != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.cad!,
      container.nestedSingleValueContainer('cad').encoder,
    );
  }
  if (instance.chf != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.chf!,
      container.nestedSingleValueContainer('chf').encoder,
    );
  }
  if (instance.czk != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.czk!,
      container.nestedSingleValueContainer('czk').encoder,
    );
  }
  if (instance.dkk != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.dkk!,
      container.nestedSingleValueContainer('dkk').encoder,
    );
  }
  if (instance.eur != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.eur!,
      container.nestedSingleValueContainer('eur').encoder,
    );
  }
  if (instance.gbp != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.gbp!,
      container.nestedSingleValueContainer('gbp').encoder,
    );
  }
  if (instance.hkd != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.hkd!,
      container.nestedSingleValueContainer('hkd').encoder,
    );
  }
  if (instance.myr != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.myr!,
      container.nestedSingleValueContainer('myr').encoder,
    );
  }
  if (instance.nok != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.nok!,
      container.nestedSingleValueContainer('nok').encoder,
    );
  }
  if (instance.nzd != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.nzd!,
      container.nestedSingleValueContainer('nzd').encoder,
    );
  }
  if (instance.sek != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.sek!,
      container.nestedSingleValueContainer('sek').encoder,
    );
  }
  if (instance.sgd != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.sgd!,
      container.nestedSingleValueContainer('sgd').encoder,
    );
  }
  if (instance.usd != null) {
    TerminalConfigurationConfigurationResourceCurrencySpecificConfig.encode(
      instance.usd!,
      container.nestedSingleValueContainer('usd').encoder,
    );
  }
  return container.value;
}