-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(POM-447): (Dynamic Checkout) Delete saved payment methods (#255)
- Loading branch information
1 parent
f6b3177
commit 7b33eb9
Showing
82 changed files
with
2,488 additions
and
520 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
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
37 changes: 37 additions & 0 deletions
37
sdk/src/main/kotlin/com/processout/sdk/api/model/event/POSavedPaymentMethodsEvent.kt
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,37 @@ | ||
package com.processout.sdk.api.model.event | ||
|
||
import com.processout.sdk.core.ProcessOutResult | ||
import com.processout.sdk.core.annotation.ProcessOutInternalApi | ||
|
||
/** | ||
* Defines saved payment methods lifecycle events. | ||
*/ | ||
/** @suppress */ | ||
@ProcessOutInternalApi | ||
sealed class POSavedPaymentMethodsEvent { | ||
|
||
/** | ||
* Initial event that is sent prior any other event. | ||
*/ | ||
data object WillStart : POSavedPaymentMethodsEvent() | ||
|
||
/** | ||
* Event indicates that initialization is complete. | ||
*/ | ||
data object DidStart : POSavedPaymentMethodsEvent() | ||
|
||
/** | ||
* Event is sent when customer token has been deleted. | ||
*/ | ||
data class DidDeleteCustomerToken( | ||
val customerId: String, | ||
val tokenId: String | ||
) : POSavedPaymentMethodsEvent() | ||
|
||
/** | ||
* Event is sent when unretryable error occurs. This is a final event. | ||
*/ | ||
data class DidFail( | ||
val failure: ProcessOutResult.Failure | ||
) : POSavedPaymentMethodsEvent() | ||
} |
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
14 changes: 14 additions & 0 deletions
14
sdk/src/main/kotlin/com/processout/sdk/api/model/request/PODeleteCustomerTokenRequest.kt
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,14 @@ | ||
package com.processout.sdk.api.model.request | ||
|
||
/** | ||
* Request to delete a customer token. | ||
* | ||
* @param[customerId] ID of the customer. | ||
* @param[tokenId] Token ID that belong to the customer. | ||
* @param[clientSecret] Client secret is a value of __X-ProcessOut-Client-Secret__ header of the invoice. | ||
*/ | ||
data class PODeleteCustomerTokenRequest( | ||
val customerId: String, | ||
val tokenId: String, | ||
val clientSecret: String | ||
) |
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
5 changes: 5 additions & 0 deletions
5
sdk/src/main/kotlin/com/processout/sdk/api/network/HeaderConstants.kt
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,5 @@ | ||
package com.processout.sdk.api.network | ||
|
||
internal object HeaderConstants { | ||
const val CLIENT_SECRET = "X-ProcessOut-Client-Secret" | ||
} |
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
Oops, something went wrong.