Skip to content

Commit

Permalink
Remove deprecated method since v4 assumes breaking changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
caiofaustino committed Nov 3, 2020
1 parent f91d1e7 commit 732da13
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,6 @@ public static CardType getByBrandName(@NonNull String brand) {
return MAPPED_BY_NAME.get(brand);
}

/**
* Get CardType from txVariant.
*
* @deprecated Renamed to {@link #getByBrandName(String)}
*/
@Deprecated
@Nullable
public static CardType getCardTypeByTxVariant(@NonNull String txVariant) {
return getByBrandName(txVariant);
}

CardType(@NonNull String txVariant, @NonNull Pattern pattern) {
mTxVariant = txVariant;
mPattern = pattern;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public CardComponent(@NonNull StoredPaymentMethod paymentMethod, @NonNull CardCo
mStoredPaymentInputData.setExpiryDate(ExpiryDate.EMPTY_DATE);
}

final CardType cardType = CardType.getCardTypeByTxVariant(paymentMethod.getBrand());
final CardType cardType = CardType.getByBrandName(paymentMethod.getBrand());
if (cardType != null) {
final List<CardType> storedCardType = new ArrayList<>();
storedCardType.add(cardType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private CardConfiguration checkSupportedCardTypes(@NonNull PaymentMethod payment
if (brands != null && !brands.isEmpty()) {
supportedCardTypes = new ArrayList<>();
for (String brand : brands) {
final CardType brandType = CardType.getCardTypeByTxVariant(brand);
final CardType brandType = CardType.getByBrandName(brand);
if (brandType != null) {
supportedCardTypes.add(brandType);
} else {
Expand Down

0 comments on commit 732da13

Please sign in to comment.