-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb13a51
commit bcad21d
Showing
2 changed files
with
28 additions
and
28 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ Subject: [PATCH] refine return types | |
|
||
|
||
diff --git a/io/portone/sdk/server/PortOneApi.kt b/io/portone/sdk/server/PortOneApi.kt | ||
index 59d3f5b..35af1b1 100644 | ||
index 5349dab..ad824a3 100644 | ||
--- a/io/portone/sdk/server/PortOneApi.kt | ||
+++ b/io/portone/sdk/server/PortOneApi.kt | ||
@@ -29,6 +29,7 @@ import io.portone.sdk.server.schemas.BillingKeyNotFoundException | ||
|
@@ -57,7 +57,7 @@ index 59d3f5b..35af1b1 100644 | |
import io.portone.sdk.server.schemas.WebhookNotFoundError | ||
import io.portone.sdk.server.schemas.WebhookNotFoundException | ||
import java.io.Closeable | ||
@@ -219,16 +226,15 @@ public class PortOneApi( | ||
@@ -221,16 +228,15 @@ public class PortOneApi( | ||
* 주어진 아이디에 대응되는 본인인증 내역을 조회합니다. | ||
* | ||
* @throws ForbiddenError 요청이 거절된 경우 | ||
|
@@ -76,7 +76,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.get("https://api.portone.io/identity-verifications") { | ||
url { | ||
appendPathSegments(identityVerificationId) | ||
@@ -250,8 +256,7 @@ public class PortOneApi( | ||
@@ -252,8 +258,7 @@ public class PortOneApi( | ||
} | ||
when (httpBodyDecoded) { | ||
is ForbiddenError -> throw ForbiddenException(message = httpBodyDecoded.message) | ||
|
@@ -109,7 +109,7 @@ index 59d3f5b..35af1b1 100644 | |
} | ||
catch (_: Exception) { | ||
throw UnrecognizedException("Unrecognized API response: $httpBody") | ||
@@ -577,17 +582,16 @@ public class PortOneApi( | ||
@@ -574,17 +579,16 @@ public class PortOneApi( | ||
* | ||
* 주어진 빌링키에 대응되는 빌링키 정보를 조회합니다. | ||
* | ||
|
@@ -129,7 +129,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.get("https://api.portone.io/billing-keys") { | ||
url { | ||
appendPathSegments(billingKey) | ||
@@ -608,8 +612,7 @@ public class PortOneApi( | ||
@@ -605,8 +609,7 @@ public class PortOneApi( | ||
throw UnrecognizedException("Unrecognized API error: $httpBody") | ||
} | ||
when (httpBodyDecoded) { | ||
|
@@ -139,7 +139,7 @@ index 59d3f5b..35af1b1 100644 | |
is ForbiddenError -> throw ForbiddenException(message = httpBodyDecoded.message) | ||
is InvalidRequestError -> throw InvalidRequestException(message = httpBodyDecoded.message) | ||
is UnauthorizedError -> throw UnauthorizedException(message = httpBodyDecoded.message) | ||
@@ -881,17 +884,16 @@ public class PortOneApi( | ||
@@ -873,17 +876,16 @@ public class PortOneApi( | ||
* | ||
* 주어진 결제 아이디에 대응되는 현금 영수증 내역을 조회합니다. | ||
* | ||
|
@@ -159,7 +159,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.get("https://api.portone.io/payments") { | ||
url { | ||
appendPathSegments(paymentId, "cash-receipt") | ||
@@ -912,8 +914,7 @@ public class PortOneApi( | ||
@@ -904,8 +906,7 @@ public class PortOneApi( | ||
throw UnrecognizedException("Unrecognized API error: $httpBody") | ||
} | ||
when (httpBodyDecoded) { | ||
|
@@ -169,7 +169,7 @@ index 59d3f5b..35af1b1 100644 | |
is ForbiddenError -> throw ForbiddenException(message = httpBodyDecoded.message) | ||
is InvalidRequestError -> throw InvalidRequestException(message = httpBodyDecoded.message) | ||
is UnauthorizedError -> throw UnauthorizedException(message = httpBodyDecoded.message) | ||
@@ -943,15 +944,14 @@ public class PortOneApi( | ||
@@ -934,15 +935,14 @@ public class PortOneApi( | ||
* | ||
* @throws ForbiddenError 요청이 거절된 경우 | ||
* @throws InvalidRequestError 요청된 입력 정보가 유효하지 않은 경우 - 허가되지 않은 값, 올바르지 않은 형식의 요청 등이 모두 해당됩니다. | ||
|
@@ -187,7 +187,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.get("https://api.portone.io/payments") { | ||
url { | ||
appendPathSegments(paymentId) | ||
@@ -974,7 +974,7 @@ public class PortOneApi( | ||
@@ -965,7 +965,7 @@ public class PortOneApi( | ||
when (httpBodyDecoded) { | ||
is ForbiddenError -> throw ForbiddenException(message = httpBodyDecoded.message) | ||
is InvalidRequestError -> throw InvalidRequestException(message = httpBodyDecoded.message) | ||
|
@@ -196,7 +196,7 @@ index 59d3f5b..35af1b1 100644 | |
is UnauthorizedError -> throw UnauthorizedException(message = httpBodyDecoded.message) | ||
} | ||
} | ||
@@ -1139,15 +1139,14 @@ public class PortOneApi( | ||
@@ -1126,15 +1126,14 @@ public class PortOneApi( | ||
* | ||
* @throws ForbiddenError 요청이 거절된 경우 | ||
* @throws InvalidRequestError 요청된 입력 정보가 유효하지 않은 경우 - 허가되지 않은 값, 올바르지 않은 형식의 요청 등이 모두 해당됩니다. | ||
|
@@ -214,7 +214,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.get("https://api.portone.io/payment-schedules") { | ||
url { | ||
appendPathSegments(paymentScheduleId) | ||
@@ -1170,8 +1169,7 @@ public class PortOneApi( | ||
@@ -1157,8 +1156,7 @@ public class PortOneApi( | ||
when (httpBodyDecoded) { | ||
is ForbiddenError -> throw ForbiddenException(message = httpBodyDecoded.message) | ||
is InvalidRequestError -> throw InvalidRequestException(message = httpBodyDecoded.message) | ||
|
@@ -224,7 +224,7 @@ index 59d3f5b..35af1b1 100644 | |
is UnauthorizedError -> throw UnauthorizedException(message = httpBodyDecoded.message) | ||
} | ||
} | ||
@@ -1360,14 +1358,14 @@ public class PortOneApi( | ||
@@ -1343,14 +1341,14 @@ public class PortOneApi( | ||
* @param paymentId 결제 건 아이디 | ||
* @param payment 빌링키 결제 입력 정보 | ||
* @param timeToPay 결제 예정 시점 | ||
|
@@ -241,7 +241,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.post("https://api.portone.io/payments") { | ||
url { | ||
appendPathSegments(paymentId, "schedule") | ||
@@ -1406,7 +1404,7 @@ public class PortOneApi( | ||
@@ -1389,7 +1387,7 @@ public class PortOneApi( | ||
} | ||
val httpBody = httpResponse.body<String>() | ||
return try { | ||
|
@@ -250,7 +250,7 @@ index 59d3f5b..35af1b1 100644 | |
} | ||
catch (_: Exception) { | ||
throw UnrecognizedException("Unrecognized API response: $httpBody") | ||
@@ -1457,7 +1455,7 @@ public class PortOneApi( | ||
@@ -1439,7 +1437,7 @@ public class PortOneApi( | ||
* @param currentCancellableAmount 결제 건의 취소 가능 잔액 - 본 취소 요청 이전의 취소 가능 잔액으로써, 값을 입력하면 잔액이 일치하는 경우에만 | ||
* 취소가 진행됩니다. 값을 입력하지 않으면 별도의 검증 처리를 수행하지 않습니다. | ||
* @param refundAccount 환불 계좌 - 계좌 환불일 경우 입력합니다. 계좌 환불이 필요한 경우는 가상계좌 환불, 휴대폰 익월 환불 등이 있습니다. | ||
|
@@ -259,7 +259,7 @@ index 59d3f5b..35af1b1 100644 | |
*/ | ||
@JvmName("cancelPaymentSuspend") | ||
public suspend fun cancelPayment( | ||
@@ -1469,7 +1467,7 @@ public class PortOneApi( | ||
@@ -1451,7 +1449,7 @@ public class PortOneApi( | ||
requester: CancelRequester? = null, | ||
currentCancellableAmount: Long? = null, | ||
refundAccount: CancelPaymentBodyRefundAccount? = null, | ||
|
@@ -268,7 +268,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.post("https://api.portone.io/payments") { | ||
url { | ||
appendPathSegments(paymentId, "cancel") | ||
@@ -1520,7 +1518,7 @@ public class PortOneApi( | ||
@@ -1502,7 +1500,7 @@ public class PortOneApi( | ||
} | ||
val httpBody = httpResponse.body<String>() | ||
return try { | ||
|
@@ -277,7 +277,7 @@ index 59d3f5b..35af1b1 100644 | |
} | ||
catch (_: Exception) { | ||
throw UnrecognizedException("Unrecognized API response: $httpBody") | ||
@@ -1592,7 +1590,7 @@ public class PortOneApi( | ||
@@ -1574,7 +1572,7 @@ public class PortOneApi( | ||
* @param shippingAddress 배송지 주소 | ||
* @param promotionId 해당 결제에 적용할 프로모션 아이디 | ||
* @param bypass PG사별 추가 파라미터 ("PG사별 연동 가이드" 참고) | ||
|
@@ -286,7 +286,7 @@ index 59d3f5b..35af1b1 100644 | |
*/ | ||
@JvmName("payWithBillingKeySuspend") | ||
public suspend fun payWithBillingKey( | ||
@@ -1616,7 +1614,7 @@ public class PortOneApi( | ||
@@ -1598,7 +1596,7 @@ public class PortOneApi( | ||
shippingAddress: SeparatedAddressInput? = null, | ||
promotionId: String? = null, | ||
bypass: JsonObject? = null, | ||
|
@@ -295,7 +295,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.post("https://api.portone.io/payments") { | ||
url { | ||
appendPathSegments(paymentId, "billing-key") | ||
@@ -1664,7 +1662,7 @@ public class PortOneApi( | ||
@@ -1646,7 +1644,7 @@ public class PortOneApi( | ||
} | ||
val httpBody = httpResponse.body<String>() | ||
return try { | ||
|
@@ -304,7 +304,7 @@ index 59d3f5b..35af1b1 100644 | |
} | ||
catch (_: Exception) { | ||
throw UnrecognizedException("Unrecognized API response: $httpBody") | ||
@@ -1757,7 +1755,7 @@ public class PortOneApi( | ||
@@ -1740,7 +1738,7 @@ public class PortOneApi( | ||
* @param productType 상품 유형 | ||
* @param shippingAddress 배송지 주소 | ||
* @param promotionId 해당 결제에 적용할 프로모션 아이디 | ||
|
@@ -313,7 +313,7 @@ index 59d3f5b..35af1b1 100644 | |
*/ | ||
@JvmName("payInstantlySuspend") | ||
public suspend fun payInstantly( | ||
@@ -1779,7 +1777,7 @@ public class PortOneApi( | ||
@@ -1762,7 +1760,7 @@ public class PortOneApi( | ||
productType: PaymentProductType? = null, | ||
shippingAddress: SeparatedAddressInput? = null, | ||
promotionId: String? = null, | ||
|
@@ -322,7 +322,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.post("https://api.portone.io/payments") { | ||
url { | ||
appendPathSegments(paymentId, "instant") | ||
@@ -1822,7 +1820,7 @@ public class PortOneApi( | ||
@@ -1805,7 +1803,7 @@ public class PortOneApi( | ||
} | ||
val httpBody = httpResponse.body<String>() | ||
return try { | ||
|
@@ -331,7 +331,7 @@ index 59d3f5b..35af1b1 100644 | |
} | ||
catch (_: Exception) { | ||
throw UnrecognizedException("Unrecognized API response: $httpBody") | ||
@@ -1897,7 +1895,7 @@ public class PortOneApi( | ||
@@ -1881,7 +1879,7 @@ public class PortOneApi( | ||
* @param productType 상품 유형 | ||
* @param customer 고객 정보 | ||
* @param paidAt 결제 일자 | ||
|
@@ -340,7 +340,7 @@ index 59d3f5b..35af1b1 100644 | |
*/ | ||
@JvmName("issueCashReceiptSuspend") | ||
public suspend fun issueCashReceipt( | ||
@@ -1910,7 +1908,7 @@ public class PortOneApi( | ||
@@ -1894,7 +1892,7 @@ public class PortOneApi( | ||
productType: PaymentProductType? = null, | ||
customer: IssueCashReceiptCustomerInput, | ||
paidAt: Instant? = null, | ||
|
@@ -349,7 +349,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.post("https://api.portone.io/cash-receipts") { | ||
headers { | ||
append(HttpHeaders.Authorization, "PortOne ${[email protected]}") | ||
@@ -1943,7 +1941,7 @@ public class PortOneApi( | ||
@@ -1927,7 +1925,7 @@ public class PortOneApi( | ||
} | ||
val httpBody = httpResponse.body<String>() | ||
return try { | ||
|
@@ -358,7 +358,7 @@ index 59d3f5b..35af1b1 100644 | |
} | ||
catch (_: Exception) { | ||
throw UnrecognizedException("Unrecognized API response: $httpBody") | ||
@@ -2376,11 +2374,11 @@ public class PortOneApi( | ||
@@ -2354,11 +2352,11 @@ public class PortOneApi( | ||
* | ||
* @param paymentId 결제 건 아이디 | ||
* @param webhookId 웹훅 아이디 - 입력하지 않으면 결제 건의 가장 최근 웹훅 아이디가 기본 적용됩니다 | ||
|
@@ -372,7 +372,7 @@ index 59d3f5b..35af1b1 100644 | |
val httpResponse = client.post("https://api.portone.io/payments") { | ||
url { | ||
appendPathSegments(paymentId, "resend-webhook") | ||
@@ -2411,7 +2409,7 @@ public class PortOneApi( | ||
@@ -2389,7 +2387,7 @@ public class PortOneApi( | ||
} | ||
val httpBody = httpResponse.body<String>() | ||
return try { | ||
|
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