Skip to content

Rename CardType to CardBrand for public alignment#2602

Merged
erenbesel merged 4 commits into
developfrom
chore/binlookup_rename_cardtype
Jun 19, 2026
Merged

Rename CardType to CardBrand for public alignment#2602
erenbesel merged 4 commits into
developfrom
chore/binlookup_rename_cardtype

Conversation

@erenbesel

@erenbesel erenbesel commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary [Required]

Followup of aligning public API for card, binlookup related classes. CardType renamed to CardBrand.

Ticket [Optional]

COSDK-1243

Checklist [Required]

  • Tested changes locally
  • Added/updated unit tests
  • Verified against acceptance criteria
  • Aligned public API changes with other platforms (if applicable)

@erenbesel erenbesel added the chore a pull request that has chore changes that shouldn't be in the release notes label Jun 18, 2026
github-actions[bot]
github-actions Bot previously approved these changes Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

ℹ️ No baseline data found for 'develop'.

Framework Size
AdyenComponents.framework 2509 KB
AdyenActions.framework 2364 KB
AdyenDropIn.framework 1390 KB
AdyenDelegatedAuthentication.framework 158 KB
AdyenAuthentication.framework 347 KB
AdyenWeChatPay.framework 274 KB
AdyenUI.framework 3272 KB
AdyenCardScanner.framework 689 KB
AdyenEncryption.framework 506 KB
AdyenSession.framework 674 KB
AdyenTwint.framework 263 KB
AdyenWeChatPayInternal.framework 4135 KB
AdyenCheckout.framework 2397 KB
AdyenCashAppPay.framework 1764 KB
AdyenCard.framework 1727 KB
TwintSDK.framework 97 KB
Adyen3DS2.framework 919 KB
Adyen.framework 5169 KB
total 28654 KB

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request performs a comprehensive renaming of CardType to CardBrand across the codebase to resolve naming conflicts and clarify the domain model. The feedback highlights several documentation and parameter description comments that still refer to 'card type' instead of 'card brand' (specifically in FormCardNumberContainerItem.swift, CardSecurityCodeValidator.swift, CardSecurityCodeFormatter.swift, and InstallmentOptions.swift), as well as swapped documentation comments for types(forCardNumber:) and type(forCardNumber:) in CardBrandDetector.swift.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread AdyenCard/Form/FormCardNumberContainerItem.swift Outdated
Comment thread AdyenCard/Validators/CardSecurityCodeValidator.swift Outdated
Comment thread AdyenCard/Formatters/CardSecurityCodeFormatter.swift Outdated
Comment thread Adyen/Core/Components/Installment/InstallmentOptions.swift Outdated
Comment thread AdyenCard/Utilities/CardBrand/CardBrandDetector.swift
Base automatically changed from chore/binlookup_rename_cardbrand to develop June 19, 2026 08:14
@erenbesel erenbesel dismissed github-actions[bot]’s stale review June 19, 2026 08:14

The base branch was changed.

@erenbesel erenbesel requested a review from OscarSpruit June 19, 2026 08:22
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ 16 public changes detected ⚠️

Comparing chore/binlookup_rename_cardtype to develop
Platform: iOS

❇️2 Additions
🔀12 Modifications
2 Removals

Adyen

❇️ Added

public enum CardBrand: Swift.Codable, Swift.Equatable, Swift.Hashable, Swift.RawRepresentable {
  case accel
  case alphaBankBonusMasterCard
  case alphaBankBonusVISA
  case americanExpress
  case argencard
  case bcmc
  case bijenkorfCard
  case cabal
  case carteBancaire
  case cencosud
  case chequeDejeneur
  case chinaUnionPay
  case codensa
  case creditUnion24
  case dankort
  case dankortVISA
  case diners
  case discover
  case elo
  case forbrugsforeningen
  case hiper
  case hipercard
  case jcb
  case karenMillen
  case kcp
  case koreanLocalCard
  case laser
  case maestro
  case maestroUK
  case masterCard
  case mir
  case naranja
  case netplus
  case nyce
  case oasis
  case other(named: Swift.String)
  case pulse
  case shopping
  case solo
  case star
  case troy
  case uatp
  case visa
  case warehouse
  public init(rawValue: Swift.String)
  public typealias RawValue = Swift.String
  public var rawValue: Swift.String { get }
}

❌ Removed

public enum CardType: Swift.Codable, Swift.Equatable, Swift.Hashable, Swift.RawRepresentable {
  case accel
  case alphaBankBonusMasterCard
  case alphaBankBonusVISA
  case americanExpress
  case argencard
  case bcmc
  case bijenkorfCard
  case cabal
  case carteBancaire
  case cencosud
  case chequeDejeneur
  case chinaUnionPay
  case codensa
  case creditUnion24
  case dankort
  case dankortVISA
  case diners
  case discover
  case elo
  case forbrugsforeningen
  case hiper
  case hipercard
  case jcb
  case karenMillen
  case kcp
  case koreanLocalCard
  case laser
  case maestro
  case maestroUK
  case masterCard
  case mir
  case naranja
  case netplus
  case nyce
  case oasis
  case other(named: Swift.String)
  case pulse
  case shopping
  case solo
  case star
  case troy
  case uatp
  case visa
  case warehouse
  public init(rawValue: Swift.String)
  public typealias RawValue = Swift.String
  public var rawValue: Swift.String { get }
}

AnyCardPaymentMethod

🔀 Modified

// From
var brands: [Adyen.CardType] { get }

// To
var brands: [Adyen.CardBrand] { get }

/**
Changes:
- Modified type from `[Adyen.CardType]` to `[Adyen.CardBrand]`
*/

BCMCPaymentMethod

🔀 Modified

// From
public var brands: [Adyen.CardType] { get }

// To
public var brands: [Adyen.CardBrand] { get }

/**
Changes:
- Modified type from `[Adyen.CardType]` to `[Adyen.CardBrand]`
*/

CardPaymentMethod

🔀 Modified

// From
public let brands: [Adyen.CardType] { get }

// To
public let brands: [Adyen.CardBrand] { get }

/**
Changes:
- Modified type from `[Adyen.CardType]` to `[Adyen.CardBrand]`
*/

InstallmentConfiguration

🔀 Modified

// From
public init(
  cardBasedOptions: [Adyen.CardType : Adyen.InstallmentOptions],
  defaultOptions: Adyen.InstallmentOptions,
  showInstallmentAmount: Swift.Bool = false
)

// To
public init(
  cardBasedOptions: [Adyen.CardBrand : Adyen.InstallmentOptions],
  defaultOptions: Adyen.InstallmentOptions,
  showInstallmentAmount: Swift.Bool = false
)

/**
Changes:
- Modified parameter `cardBasedOptions`: Changed type from `[Adyen.CardType : Adyen.InstallmentOptions]` to `[Adyen.CardBrand : Adyen.InstallmentOptions]`
*/
// From
public init(
  cardBasedOptions: [Adyen.CardType : Adyen.InstallmentOptions],
  showInstallmentAmount: Swift.Bool = false
)

// To
public init(
  cardBasedOptions: [Adyen.CardBrand : Adyen.InstallmentOptions],
  showInstallmentAmount: Swift.Bool = false
)

/**
Changes:
- Modified parameter `cardBasedOptions`: Changed type from `[Adyen.CardType : Adyen.InstallmentOptions]` to `[Adyen.CardBrand : Adyen.InstallmentOptions]`
*/

StoredCardPaymentMethod

🔀 Modified

// From
public let brand: Adyen.CardType { get }

// To
public let brand: Adyen.CardBrand { get }

/**
Changes:
- Modified type from `Adyen.CardType` to `Adyen.CardBrand`
*/
// From
public var brands: [Adyen.CardType] { get }

// To
public var brands: [Adyen.CardBrand] { get }

/**
Changes:
- Modified type from `[Adyen.CardType]` to `[Adyen.CardBrand]`
*/

AdyenCard

CardConfiguration

🔀 Modified

// From
public func supportedCardBrands(_ supportedCardBrands: [Adyen.CardType]?) -> AdyenCard.CardConfiguration

// To
public func supportedCardBrands(_ supportedCardBrands: [Adyen.CardBrand]?) -> AdyenCard.CardConfiguration

/**
Changes:
- Modified parameter `_`: Changed type from `[Adyen.CardType]?` to `[Adyen.CardBrand]?`
*/

CardNumberFormatter

❇️ Added

final public var cardBrand: Adyen.CardBrand?

❌ Removed

final public var cardType: Adyen.CardType?

CardSecurityCodeFormatter

🔀 Modified

// From
public init(cardType: Adyen.CardType)

// To
public init(cardBrand: Adyen.CardBrand)

/**
Changes:
- Added parameter `cardBrand: Adyen.CardBrand`
- Removed parameter `cardType: Adyen.CardType`
*/
// From
public init(publisher: Adyen.AdyenObservable<Adyen.CardType?>)

// To
public init(publisher: Adyen.AdyenObservable<Adyen.CardBrand?>)

/**
Changes:
- Modified parameter `publisher`: Changed type from `Adyen.AdyenObservable<Adyen.CardType?>` to `Adyen.AdyenObservable<Adyen.CardBrand?>`
*/

CardSecurityCodeValidator

🔀 Modified

// From
public init(cardType: Adyen.CardType)

// To
public init(cardBrand: Adyen.CardBrand)

/**
Changes:
- Added parameter `cardBrand: Adyen.CardBrand`
- Removed parameter `cardType: Adyen.CardType`
*/
// From
public init(publisher: Adyen.AdyenObservable<Adyen.CardType?>)

// To
public init(publisher: Adyen.AdyenObservable<Adyen.CardBrand?>)

/**
Changes:
- Modified parameter `publisher`: Changed type from `Adyen.AdyenObservable<Adyen.CardType?>` to `Adyen.AdyenObservable<Adyen.CardBrand?>`
*/

Analyzed targets: Adyen, AdyenActions, AdyenCard, AdyenCardScanner, AdyenCashAppPay, AdyenCheckout, AdyenComponents, AdyenDelegatedAuthentication, AdyenDropIn, AdyenEncryption, AdyenSession, AdyenSwiftUI, AdyenTwint, AdyenUI, AdyenWeChatPay

@erenbesel erenbesel merged commit 8b8549b into develop Jun 19, 2026
16 of 19 checks passed
@erenbesel erenbesel deleted the chore/binlookup_rename_cardtype branch June 19, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore a pull request that has chore changes that shouldn't be in the release notes size:large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants