Skip to content

Commit

Permalink
Move PosDeferPaymentRefundParams to the right module (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
djoksimo authored Mar 25, 2024
1 parent e163cdb commit ee6bedc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,22 +166,3 @@ data class DeferPaymentCaptureParams(
val foragePinEditText: ForagePINEditText,
val paymentRef: String
)

/**
* A model that represents the parameters that Forage requires to collect a card PIN and defer
* the refund of the payment to the server.
* [PosDeferPaymentRefundParams] are passed to the
* [deferPaymentRefund][com.joinforage.forage.android.pos.ForageTerminalSDK.deferPaymentRefund] method.
*
* @property foragePinEditText A reference to a [ForagePINEditText] instance.
* [setForageConfig][com.joinforage.forage.android.ui.ForageElement.setForageConfig] must
* be called on the instance before it can be passed.
* @property paymentRef A unique string identifier for a previously created
* [`Payment`](https://docs.joinforage.app/reference/payments) in Forage's
* database, returned by the
* [Create a `Payment`](https://docs.joinforage.app/reference/create-a-payment) endpoint.
*/
data class PosDeferPaymentRefundParams(
val foragePinEditText: ForagePINEditText,
val paymentRef: String
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import com.joinforage.forage.android.DeferPaymentCaptureParams
import com.joinforage.forage.android.ForageConfigNotSetException
import com.joinforage.forage.android.ForageSDK
import com.joinforage.forage.android.ForageSDKInterface
import com.joinforage.forage.android.PosDeferPaymentRefundParams
import com.joinforage.forage.android.TokenizeEBTCardParams
import com.joinforage.forage.android.VaultType
import com.joinforage.forage.android.core.telemetry.CustomerPerceivedResponseMonitor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ data class PosTokenizeCardParams(
val reusable: Boolean = true
)

/**
* A model that represents the parameters that Forage requires to collect a card PIN and defer
* the refund of the payment to the server.
* [PosDeferPaymentRefundParams] are passed to the
* [deferPaymentRefund][com.joinforage.forage.android.pos.ForageTerminalSDK.deferPaymentRefund] method.
*
* @property foragePinEditText A reference to a [ForagePINEditText] instance.
* [setPosForageConfig][com.joinforage.forage.android.ui.ForageElement.setPosForageConfig] must
* be called on the instance before it can be passed.
* @property paymentRef A unique string identifier for a previously created
* [`Payment`](https://docs.joinforage.app/reference/payments) in Forage's
* database, returned by the
* [Create a `Payment`](https://docs.joinforage.app/reference/create-a-payment) endpoint.
*/
data class PosDeferPaymentRefundParams(
val foragePinEditText: ForagePINEditText,
val paymentRef: String
)

/**
* A model that represents the parameters that [ForageTerminalSDK] requires to refund a Payment.
* [PosRefundPaymentParams] are passed to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.joinforage.forage.android.CapturePaymentParams
import com.joinforage.forage.android.CheckBalanceParams
import com.joinforage.forage.android.DeferPaymentCaptureParams
import com.joinforage.forage.android.ForageSDK
import com.joinforage.forage.android.PosDeferPaymentRefundParams
import com.joinforage.forage.android.TokenizeEBTCardParams
import com.joinforage.forage.android.VaultType
import com.joinforage.forage.android.core.telemetry.Log
Expand Down

0 comments on commit ee6bedc

Please sign in to comment.