-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert Wallet models to Kotlin (#1589)
- Loading branch information
1 parent
06bebb7
commit 6849ef0
Showing
17 changed files
with
777 additions
and
821 deletions.
There are no files selected for viewing
42 changes: 0 additions & 42 deletions
42
stripe/src/main/java/com/stripe/android/model/wallets/AmexExpressCheckoutWallet.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
stripe/src/main/java/com/stripe/android/model/wallets/AmexExpressCheckoutWallet.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,34 @@ | ||
package com.stripe.android.model.wallets | ||
|
||
import android.os.Parcel | ||
import android.os.Parcelable | ||
|
||
class AmexExpressCheckoutWallet : Wallet { | ||
private constructor(builder: Builder) : super(Type.AmexExpressCheckout, builder) | ||
|
||
private constructor(parcel: Parcel) : super(parcel) | ||
|
||
internal class Builder : Wallet.Builder<AmexExpressCheckoutWallet>() { | ||
override fun build(): AmexExpressCheckoutWallet { | ||
return AmexExpressCheckoutWallet(this) | ||
} | ||
} | ||
|
||
companion object { | ||
internal fun fromJson(): Builder { | ||
return Builder() | ||
} | ||
|
||
@JvmField | ||
val CREATOR: Parcelable.Creator<AmexExpressCheckoutWallet> = | ||
object : Parcelable.Creator<AmexExpressCheckoutWallet> { | ||
override fun createFromParcel(parcel: Parcel): AmexExpressCheckoutWallet { | ||
return AmexExpressCheckoutWallet(parcel) | ||
} | ||
|
||
override fun newArray(size: Int): Array<AmexExpressCheckoutWallet?> { | ||
return arrayOfNulls(size) | ||
} | ||
} | ||
} | ||
} |
42 changes: 0 additions & 42 deletions
42
stripe/src/main/java/com/stripe/android/model/wallets/ApplePayWallet.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
stripe/src/main/java/com/stripe/android/model/wallets/ApplePayWallet.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,34 @@ | ||
package com.stripe.android.model.wallets | ||
|
||
import android.os.Parcel | ||
import android.os.Parcelable | ||
|
||
class ApplePayWallet : Wallet { | ||
private constructor(builder: Builder) : super(Type.ApplePay, builder) | ||
|
||
private constructor(parcel: Parcel) : super(parcel) | ||
|
||
internal class Builder : Wallet.Builder<ApplePayWallet>() { | ||
override fun build(): ApplePayWallet { | ||
return ApplePayWallet(this) | ||
} | ||
} | ||
|
||
companion object { | ||
internal fun fromJson(): Builder { | ||
return Builder() | ||
} | ||
|
||
@JvmField | ||
val CREATOR: Parcelable.Creator<ApplePayWallet> = | ||
object : Parcelable.Creator<ApplePayWallet> { | ||
override fun createFromParcel(parcel: Parcel): ApplePayWallet { | ||
return ApplePayWallet(parcel) | ||
} | ||
|
||
override fun newArray(size: Int): Array<ApplePayWallet?> { | ||
return arrayOfNulls(size) | ||
} | ||
} | ||
} | ||
} |
42 changes: 0 additions & 42 deletions
42
stripe/src/main/java/com/stripe/android/model/wallets/GooglePayWallet.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
stripe/src/main/java/com/stripe/android/model/wallets/GooglePayWallet.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,34 @@ | ||
package com.stripe.android.model.wallets | ||
|
||
import android.os.Parcel | ||
import android.os.Parcelable | ||
|
||
class GooglePayWallet : Wallet { | ||
private constructor(builder: Builder) : super(Type.GooglePay, builder) | ||
|
||
private constructor(parcel: Parcel) : super(parcel) | ||
|
||
internal class Builder : Wallet.Builder<GooglePayWallet>() { | ||
override fun build(): GooglePayWallet { | ||
return GooglePayWallet(this) | ||
} | ||
} | ||
|
||
companion object { | ||
internal fun fromJson(): Builder { | ||
return Builder() | ||
} | ||
|
||
@JvmField | ||
val CREATOR: Parcelable.Creator<GooglePayWallet> = | ||
object : Parcelable.Creator<GooglePayWallet> { | ||
override fun createFromParcel(parcel: Parcel): GooglePayWallet { | ||
return GooglePayWallet(parcel) | ||
} | ||
|
||
override fun newArray(size: Int): Array<GooglePayWallet?> { | ||
return arrayOfNulls(size) | ||
} | ||
} | ||
} | ||
} |
126 changes: 0 additions & 126 deletions
126
stripe/src/main/java/com/stripe/android/model/wallets/MasterpassWallet.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.