Skip to content

Commit

Permalink
Convert Wallet models to Kotlin (#1589)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshafrir-stripe authored Sep 19, 2019
1 parent 06bebb7 commit 6849ef0
Show file tree
Hide file tree
Showing 17 changed files with 777 additions and 821 deletions.

This file was deleted.

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)
}
}
}
}

This file was deleted.

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)
}
}
}
}

This file was deleted.

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)
}
}
}
}

This file was deleted.

Loading

0 comments on commit 6849ef0

Please sign in to comment.