createCreditCard function

CreditCard createCreditCard (
  1. String displayName,
  2. String id,
  3. {List<Promotion> promos,
  4. String officialUrl}
)

Implementation

CreditCard createCreditCard(String displayName, String id,
    {List<Promotion> promos, String officialUrl}) {
  CreditCard card = CreditCard.create();
  card.displayName = displayName;
  card.id = id;
  if (officialUrl != null) {
    card.officialUrl = officialUrl;
  }
  if (promos != null) {
    card.promotions.addAll(promos);
  }
  return card;
}