Skip to content

Commit

Permalink
Merge pull request #807 from inplayer-org/fix/add-response-type-blob
Browse files Browse the repository at this point in the history
Fix / add response type blob
  • Loading branch information
kiremitrov123 authored Nov 16, 2023
2 parents 10ef8bf + c0cf09c commit 9fb6701
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

# [3.13.23] - 16-11-2023

### Changes

- Updated `InPlayer.Payment.getBillingReceipt` response type to be blob

# [3.13.22] - 15-11-2023

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inplayer-org/inplayer.js",
"version": "3.13.22",
"version": "3.13.23",
"author": "InPlayer",
"license": "MIT",
"description": "A Javascript SDK for Inplayer's RESTful API",
Expand Down
31 changes: 16 additions & 15 deletions src/endpoints/payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Payment extends BaseExtend {
*/
async getPaymentMethods(): Promise<
AxiosResponse<Array<MerchantPaymentMethod>>
> {
> {
const tokenObject = await this.request.getToken();

return this.request.authenticatedGet(API.getPaymentMethods, {
Expand Down Expand Up @@ -226,7 +226,7 @@ class Payment extends BaseExtend {
* ```
*/
async createDonationPayment(
data: CreateDonationPaymentData,
data: CreateDonationPaymentData
): Promise<AxiosResponse<CreateDonationPaymentData>> {
const body: CreateDonationPaymentRequestBody = {
number: data.number,
Expand Down Expand Up @@ -254,7 +254,7 @@ class Payment extends BaseExtend {
Authorization: `Bearer ${tokenObject.token}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
},
}
);
}

Expand All @@ -280,7 +280,7 @@ class Payment extends BaseExtend {
* ```
*/
async confirmPayment(
paymentIntentId: string,
paymentIntentId: string
): Promise<AxiosResponse<CommonResponse>> {
if (!paymentIntentId) {
const response: CustomErrorResponse = {
Expand Down Expand Up @@ -375,7 +375,7 @@ class Payment extends BaseExtend {
Authorization: `Bearer ${tokenObject.token}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
},
}
);
}

Expand Down Expand Up @@ -496,7 +496,7 @@ class Payment extends BaseExtend {
async getPurchaseHistory(
status = 'active',
page = 0,
limit = 5,
limit = 5
): Promise<AxiosResponse<GetPurchaseHistoryResponse>> {
const tokenObject = await this.request.getToken();

Expand All @@ -506,7 +506,7 @@ class Payment extends BaseExtend {
headers: {
Authorization: `Bearer ${tokenObject.token}`,
},
},
}
);
}

Expand Down Expand Up @@ -573,6 +573,7 @@ class Payment extends BaseExtend {

return this.request.authenticatedGet(API.getBillingReceipt(trxToken), {
headers: {
responseType: 'blob',
Authorization: `Bearer ${tokenObject.token}`,
},
});
Expand Down Expand Up @@ -671,7 +672,7 @@ class Payment extends BaseExtend {
Authorization: `Bearer ${tokenObject.token}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
},
}
);
}

Expand Down Expand Up @@ -702,7 +703,7 @@ class Payment extends BaseExtend {
*/
async getDirectDebitMandate(): Promise<
AxiosResponse<DirectDebitMandateResponse>
> {
> {
const tokenObject = await this.request.getToken();

return this.request.authenticatedGet(API.getDirectDebitMandate, {
Expand Down Expand Up @@ -776,7 +777,7 @@ class Payment extends BaseExtend {
Authorization: `Bearer ${tokenObject.token}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
},
}
);
}

Expand Down Expand Up @@ -838,7 +839,7 @@ class Payment extends BaseExtend {
Authorization: `Bearer ${tokenObject.token}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
},
}
);
}

Expand Down Expand Up @@ -978,7 +979,7 @@ class Payment extends BaseExtend {
Authorization: `Bearer ${tokenObject.token}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
},
}
);
}

Expand Down Expand Up @@ -1120,7 +1121,7 @@ class Payment extends BaseExtend {
Authorization: `Bearer ${tokenObject.token}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
},
}
);
}

Expand Down Expand Up @@ -1182,7 +1183,7 @@ class Payment extends BaseExtend {
Authorization: `Bearer ${tokenObject.token}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
},
}
);
}

Expand Down Expand Up @@ -1248,7 +1249,7 @@ class Payment extends BaseExtend {
Authorization: `Bearer ${tokenObject.token}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
},
}
);
}
}
Expand Down

0 comments on commit 9fb6701

Please sign in to comment.