Skip to content

Commit c9388c0

Browse files
committed
Updated package version and refactored constructors
1 parent 6bb04f9 commit c9388c0

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "simpay-typescript-api",
33
"author": "Rafał Więcek",
4-
"version": "3.0.1",
4+
"version": "3.0.2",
55
"description": "SimPay.pl API wrapper",
66
"main": "dist/index.js",
77
"types": "dist/index.d.ts",

src/payments/directbilling.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ import type { PartialDbTransaction } from '../models/directbilling/transaction/p
1111
import type { PaginatedResponse } from '../models/response/paginated.response.js';
1212

1313
export class DirectBilling {
14-
private readonly key: string;
15-
private readonly password: string;
1614
private readonly client: AxiosInstance;
1715

18-
constructor(key: string, password: string) {
16+
constructor(
17+
private readonly key: string,
18+
private readonly password: string,
19+
) {
1920
this.key = key;
2021
this.password = password;
2122

@@ -24,7 +25,7 @@ export class DirectBilling {
2425
headers: {
2526
'X-SIM-KEY': this.key,
2627
'X-SIM-PASSWORD': this.password,
27-
'X-SIM-VERSION': '2.2.2',
28+
'X-SIM-VERSION': '3.0.2',
2829
'X-SIM-PLATFORM': 'TYPESCRIPT',
2930
},
3031
});

src/payments/sms.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,18 @@ import type { SmsTransaction } from '../models/sms/transaction/sms.transaction.j
66
import type { VerificationResponse } from '../models/sms/verification.response.js';
77

88
export class Sms {
9-
private readonly key: string;
10-
private readonly password: string;
119
private readonly client: AxiosInstance;
1210

13-
constructor(key: string, password: string) {
14-
this.key = key;
15-
this.password = password;
16-
11+
constructor(
12+
private readonly key: string,
13+
private readonly password: string,
14+
) {
1715
this.client = axios.create({
1816
baseURL: 'https://api.simpay.pl/sms',
1917
headers: {
2018
'X-SIM-KEY': this.key,
2119
'X-SIM-PASSWORD': this.password,
22-
'X-SIM-VERSION': '2.2.2',
20+
'X-SIM-VERSION': '3.0.2',
2321
'X-SIM-PLATFORM': 'TYPESCRIPT',
2422
},
2523
});

0 commit comments

Comments
 (0)