encode<V> static method

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

Implementation

static V encode<V>(
  InvoiceMandateOptionsCard instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.amount != null) {
    container.encodeInt(
      'amount',
      instance.amount!,
    );
  }
  if (instance.amountType != null) {
    container.encodeString(
      'amount_type',
      instance.amountType!,
    );
  }
  if (instance.description != null) {
    container.encodeString(
      'description',
      instance.description!,
    );
  }
  return container.value;
}