Skip to content

Commit

Permalink
Merge pull request #67 from iamport/feat/PPD-443/support-period-param
Browse files Browse the repository at this point in the history
feat : 이니시스 정기결제 제공기간 파라미터 추가
  • Loading branch information
kjh5833 authored Dec 2, 2022
2 parents f91c12b + 70f9948 commit c77ff6c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
15 changes: 14 additions & 1 deletion sdk/src/main/java/com/iamport/sdk/data/sdk/IamPortRequest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ data class IamPortRequest(

val confirm_url: String? = null, // 컨펌프로세스
val card: Card? = null, // 카드사 다이렉트 호출
val period: Period? = null, // 이니시스 정기결제 제공기간

) : Parcelable {

Expand Down Expand Up @@ -131,6 +132,8 @@ data class IamPortRequest(
var naverInterface: NaverInterface? = null

var confirm_url: String? = null
var card: Card? = null
var period: Period? = null

fun pg(pg: String) = apply {
this.pg = pg
Expand Down Expand Up @@ -264,6 +267,14 @@ data class IamPortRequest(
this.confirm_url = confirm_url
}

fun card(card: Card) = apply {
this.card = card
}

fun period(period: Period) = apply {
this.period = period
}


fun build() = IamPortRequest(
pg = pg,
Expand Down Expand Up @@ -297,7 +308,9 @@ data class IamPortRequest(
naverActionType = naverActionType,
cultureBenefit = cultureBenefit,
naverInterface = naverInterface,
confirm_url = confirm_url
confirm_url = confirm_url,
card = card,
period = period
)
}
}
Expand Down
16 changes: 16 additions & 0 deletions sdk/src/main/java/com/iamport/sdk/data/sdk/Period.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.iamport.sdk.data.sdk

import android.os.Parcelable
import kotlinx.parcelize.Parcelize

/**
* for 이니시스 정기결제 제공기간
* 이니시스 정기결제 제공기간 옵션
* 참조 : https://guide.iamport.kr/32498112-82c4-44cb-a23a-ef5b896ee548
*/

@Parcelize
data class Period(
val from: String, // YYYYMMDD
val to: String // YYYYMMDD
) : Parcelable

0 comments on commit c77ff6c

Please sign in to comment.