code: void setCustomerSource(@NonNull CustomerSource customerSource) {
          Source source = customerSource.asSource();
          if (source != null
                  && source.getSourceTypeModel() != null
                  && Source.CARD.equals(source.getType())
                  && source.getSourceTypeModel() instanceof SourceCardData) {
              SourceCardData sourceCardData = (SourceCardData) source.getSourceTypeModel();
              setSourceCardData(sourceCardData);
              return;
          }
  
          Card card = customerSource.asCard();
          if (card != null) {
              setCard(card);
          }
      }
docs: Set the card data displayed using a {@link CustomerSource} object. If the object
  is not a {@link Source} object that represents a card and the object returns {@code null}
  from its {@link CustomerSource#asCard()} method, then no values will be set on this control.
  
  @param customerSource the {@link CustomerSource} to be partially displayed