Skip to content

Commit

Permalink
change API
Browse files Browse the repository at this point in the history
  • Loading branch information
kasvith committed Jan 18, 2021
1 parent 4df9ae3 commit 6aae1ad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/p24/P24.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,14 @@ export class P24 {
* Handle refund
*
* @param {RefundRequest} refundRequest
* @returns {Promise<SuccessResponse<RefundResult[]>>}
* @returns {Promise<RefundResult[]>}
* @memberof P24
*/
public async refund (refundRequest: RefundRequest): Promise<SuccessResponse<RefundResult[]>> {
public async refund (refundRequest: RefundRequest): Promise<RefundResult[]> {
try {
const { data } = await this.client.post(EndpointRefund, refundRequest)
return <SuccessResponse<RefundResult[]>>data
const resp = <SuccessResponse<RefundResult[]>>data
return resp.data
} catch (error) {
if (error.response && error.response.data) {
if (error.response.data.code === 409) {
Expand Down

0 comments on commit 6aae1ad

Please sign in to comment.