encode<V> static method

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

Implementation

static V encode<V>(
  TaxProductResourceTaxRateDetails instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.country != null) {
    container.encodeString(
      'country',
      instance.country!,
    );
  }
  container.encodeString(
    'percentage_decimal',
    instance.percentageDecimal,
  );
  if (instance.state != null) {
    container.encodeString(
      'state',
      instance.state!,
    );
  }
  if (instance.taxType != null) {
    container.encodeString(
      'tax_type',
      instance.taxType!,
    );
  }
  return container.value;
}