encode<V> static method

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

Implementation

static V encode<V>(
  IssuingCardWallets instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  IssuingCardApplePay.encode(
    instance.applePay,
    container.nestedSingleValueContainer('apple_pay').encoder,
  );
  IssuingCardGooglePay.encode(
    instance.googlePay,
    container.nestedSingleValueContainer('google_pay').encoder,
  );
  if (instance.primaryAccountIdentifier != null) {
    container.encodeString(
      'primary_account_identifier',
      instance.primaryAccountIdentifier!,
    );
  }
  return container.value;
}