createCreditCard function
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;
}