encode<V> static method

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

Implementation

static V encode<V>(
  IssuingTransactionPurchaseDetailsFuel instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeString(
    'type',
    instance.type,
  );
  container.encodeString(
    'unit',
    instance.unit,
  );
  container.encodeString(
    'unit_cost_decimal',
    instance.unitCostDecimal,
  );
  if (instance.volumeDecimal != null) {
    container.encodeString(
      'volume_decimal',
      instance.volumeDecimal!,
    );
  }
  return container.value;
}