Skip to content

Commit 1b4132b

Browse files
committed
fix: move response type outside of headers
1 parent 9fb6701 commit 1b4132b

File tree

3 files changed

+23
-17
lines changed

3 files changed

+23
-17
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

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

5+
# [3.13.24] - 16-11-2023
6+
7+
### Changes
8+
9+
- Updated `InPlayer.Payment.getBillingReceipt` response type to be blob moved outside of headers
10+
511
# [3.13.23] - 16-11-2023
612

713
### Changes

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@inplayer-org/inplayer.js",
3-
"version": "3.13.23",
3+
"version": "3.13.24",
44
"author": "InPlayer",
55
"license": "MIT",
66
"description": "A Javascript SDK for Inplayer's RESTful API",

src/endpoints/payment.ts

+16-16
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Payment extends BaseExtend {
5858
*/
5959
async getPaymentMethods(): Promise<
6060
AxiosResponse<Array<MerchantPaymentMethod>>
61-
> {
61+
> {
6262
const tokenObject = await this.request.getToken();
6363

6464
return this.request.authenticatedGet(API.getPaymentMethods, {
@@ -226,7 +226,7 @@ class Payment extends BaseExtend {
226226
* ```
227227
*/
228228
async createDonationPayment(
229-
data: CreateDonationPaymentData
229+
data: CreateDonationPaymentData,
230230
): Promise<AxiosResponse<CreateDonationPaymentData>> {
231231
const body: CreateDonationPaymentRequestBody = {
232232
number: data.number,
@@ -254,7 +254,7 @@ class Payment extends BaseExtend {
254254
Authorization: `Bearer ${tokenObject.token}`,
255255
'Content-Type': 'application/x-www-form-urlencoded',
256256
},
257-
}
257+
},
258258
);
259259
}
260260

@@ -280,7 +280,7 @@ class Payment extends BaseExtend {
280280
* ```
281281
*/
282282
async confirmPayment(
283-
paymentIntentId: string
283+
paymentIntentId: string,
284284
): Promise<AxiosResponse<CommonResponse>> {
285285
if (!paymentIntentId) {
286286
const response: CustomErrorResponse = {
@@ -375,7 +375,7 @@ class Payment extends BaseExtend {
375375
Authorization: `Bearer ${tokenObject.token}`,
376376
'Content-Type': 'application/x-www-form-urlencoded',
377377
},
378-
}
378+
},
379379
);
380380
}
381381

@@ -496,7 +496,7 @@ class Payment extends BaseExtend {
496496
async getPurchaseHistory(
497497
status = 'active',
498498
page = 0,
499-
limit = 5
499+
limit = 5,
500500
): Promise<AxiosResponse<GetPurchaseHistoryResponse>> {
501501
const tokenObject = await this.request.getToken();
502502

@@ -506,7 +506,7 @@ class Payment extends BaseExtend {
506506
headers: {
507507
Authorization: `Bearer ${tokenObject.token}`,
508508
},
509-
}
509+
},
510510
);
511511
}
512512

@@ -572,8 +572,8 @@ class Payment extends BaseExtend {
572572
const tokenObject = await this.request.getToken();
573573

574574
return this.request.authenticatedGet(API.getBillingReceipt(trxToken), {
575+
responseType: 'blob',
575576
headers: {
576-
responseType: 'blob',
577577
Authorization: `Bearer ${tokenObject.token}`,
578578
},
579579
});
@@ -672,7 +672,7 @@ class Payment extends BaseExtend {
672672
Authorization: `Bearer ${tokenObject.token}`,
673673
'Content-Type': 'application/x-www-form-urlencoded',
674674
},
675-
}
675+
},
676676
);
677677
}
678678

@@ -703,7 +703,7 @@ class Payment extends BaseExtend {
703703
*/
704704
async getDirectDebitMandate(): Promise<
705705
AxiosResponse<DirectDebitMandateResponse>
706-
> {
706+
> {
707707
const tokenObject = await this.request.getToken();
708708

709709
return this.request.authenticatedGet(API.getDirectDebitMandate, {
@@ -777,7 +777,7 @@ class Payment extends BaseExtend {
777777
Authorization: `Bearer ${tokenObject.token}`,
778778
'Content-Type': 'application/x-www-form-urlencoded',
779779
},
780-
}
780+
},
781781
);
782782
}
783783

@@ -839,7 +839,7 @@ class Payment extends BaseExtend {
839839
Authorization: `Bearer ${tokenObject.token}`,
840840
'Content-Type': 'application/x-www-form-urlencoded',
841841
},
842-
}
842+
},
843843
);
844844
}
845845

@@ -979,7 +979,7 @@ class Payment extends BaseExtend {
979979
Authorization: `Bearer ${tokenObject.token}`,
980980
'Content-Type': 'application/x-www-form-urlencoded',
981981
},
982-
}
982+
},
983983
);
984984
}
985985

@@ -1121,7 +1121,7 @@ class Payment extends BaseExtend {
11211121
Authorization: `Bearer ${tokenObject.token}`,
11221122
'Content-Type': 'application/x-www-form-urlencoded',
11231123
},
1124-
}
1124+
},
11251125
);
11261126
}
11271127

@@ -1183,7 +1183,7 @@ class Payment extends BaseExtend {
11831183
Authorization: `Bearer ${tokenObject.token}`,
11841184
'Content-Type': 'application/x-www-form-urlencoded',
11851185
},
1186-
}
1186+
},
11871187
);
11881188
}
11891189

@@ -1249,7 +1249,7 @@ class Payment extends BaseExtend {
12491249
Authorization: `Bearer ${tokenObject.token}`,
12501250
'Content-Type': 'application/x-www-form-urlencoded',
12511251
},
1252-
}
1252+
},
12531253
);
12541254
}
12551255
}

0 commit comments

Comments
 (0)