Skip to content

Commit

Permalink
fix : UserData 클래스 nullable 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
kjh5833 committed Aug 6, 2021
1 parent 0df5084 commit aedf152
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package com.iamport.sdk.data.chai.response

import com.iamport.sdk.data.sdk.PG

// PG정보가 없어도(회원가입 후 즉시 or PG 를 API 방식으로만 이용하는 경우 or 본인인증만 이용하는 경우) 에도
// pg_id 가 null 로 해당 데이터가 하나는 무조건 있으므로 다 nullable 처리한다 ㅠ
data class UserData(
val pg_provider: String?, // TODO: 2020-12-15 015 nullable 로 오는데.. 확인필요..
val pg_id: String,
val pg_provider: String?,
val pg_id: String?,
val sandbox: Boolean?,
val type: String,
val type: String?,
)
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ class MainViewModel(private val bus: NativeLiveDataEventBus, private val reposit

d("$this")
when (first) {
JudgeStrategy.JudgeKinds.CHAI -> second?.let { repository.chaiStrategy.doWork(it.pg_id, third) }
JudgeStrategy.JudgeKinds.CHAI -> second?.let {
it.pg_id?.let { pgId ->
repository.chaiStrategy.doWork(pgId, third)
}
}
JudgeStrategy.JudgeKinds.WEB,
JudgeStrategy.JudgeKinds.CERT -> bus.webViewActivityPayment.postValue(Event(third))
else -> Logger.e("판단불가 $third")
Expand Down

0 comments on commit aedf152

Please sign in to comment.