This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Public release 1.3.0
- Loading branch information
Showing
267 changed files
with
7,677 additions
and
18,811 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
.../VGSCheckoutSDK/Core/Checkout/Models/CheckoutPaymentMethod/VGSCheckoutPaymentMethod.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// | ||
// VGSCheckoutPaymentMethod.swift | ||
// VGSCheckoutSDK | ||
// | ||
|
||
import Foundation | ||
|
||
/// Describes selected payment method. | ||
internal enum VGSCheckoutPaymentMethod { | ||
|
||
/** | ||
User paid with saved card option provided in saved payment methods. | ||
- Parameters: | ||
- cardInfo: `VGSCheckoutPaymentCardInfo` object, contains information about selected card used for payment. | ||
*/ | ||
//case savedCard(_ cardInfo: VGSCheckoutPaymentCardInfo) | ||
|
||
/** | ||
User paid with new card. | ||
- Parameters: | ||
- cardInfo: `VGSCheckoutNewPaymentCardInfo` object, contains information about new saved card payment. | ||
*/ | ||
case newCard(_ cardInfo: VGSCheckoutNewPaymentCardInfo) | ||
|
||
/// Initializer. | ||
/// - Parameter paymentOption: `VGSPaymentOption` object, payment option. | ||
internal init(paymentOption: VGSPaymentOption) { | ||
switch paymentOption { | ||
case .savedCard(let card): | ||
fatalError("not implemented!") | ||
// self = .savedCard(VGSCheckoutPaymentCardInfo(id: card.id)) | ||
// return | ||
case .newCard: | ||
self = .newCard(VGSCheckoutNewPaymentCardInfo(shouldSave: false)) | ||
return | ||
} | ||
} | ||
} | ||
|
||
/// Holds additional information for payment method when user paid with selected card from provided saved cards. | ||
internal struct VGSCheckoutPaymentCardInfo { | ||
public let id: String | ||
} | ||
|
||
/// Holds additional information for payment method when user paid with new card. | ||
internal struct VGSCheckoutNewPaymentCardInfo { | ||
|
||
/// `true` if user selected `Save card for future payments options`, will be`nil` when `isSaveCardOptionEnabled` is set to `false`. | ||
internal let shouldSave: Bool? | ||
|
||
/// no:doc | ||
internal init(shouldSave: Bool?) { | ||
self.shouldSave = shouldSave | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
.../Checkout/UseCase/AddCard/DataWorkers/AddCardDataWorkers/VGSAddCardAPIWorkerFactory.swift
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
...ddCard/DataWorkers/AddCardDataWorkers/VGSAddCreditCardPaymentOrchestrationAPIWorker.swift
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.