encode<V> static method

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

Implementation

static V encode<V>(
  IssuingCardGooglePay instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeBool(
    'eligible',
    instance.eligible,
  );
  if (instance.ineligibleReason != null) {
    IssuingCardApplePayIneligibleReason.encode(
      instance.ineligibleReason!,
      container.nestedSingleValueContainer('ineligible_reason').encoder,
    );
  }
  return container.value;
}