Skip to content

Commit

Permalink
Update links to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGL committed Feb 7, 2023
1 parent 97c24a0 commit 95d60a2
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 40 deletions.
12 changes: 6 additions & 6 deletions lib/payments/directbilling.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DirectBilling {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-listy-uslug
https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-uslug
*/
getServices() {
return __awaiter(this, void 0, void 0, function* () {
Expand Down Expand Up @@ -59,7 +59,7 @@ class DirectBilling {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-informacji-o-usludze
https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-usludze
*/
getService(id) {
return __awaiter(this, void 0, void 0, function* () {
Expand All @@ -74,15 +74,15 @@ class DirectBilling {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#directbilling-kalkulacja-prowizji
https://docs.simpay.pl/pl/typescript/?typescript#directbilling-kalkulacja-prowizji
*/
calculateCommission(serviceId, amount) {
return __awaiter(this, void 0, void 0, function* () {
return (yield this.client.get(`/${serviceId}/calculate?amount=${amount}`)).data.data;
});
}
/*
https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-listy-transakcji
https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-transakcji
*/
getTransactions(serviceId) {
return __awaiter(this, void 0, void 0, function* () {
Expand Down Expand Up @@ -118,7 +118,7 @@ class DirectBilling {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji
https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji
*/
getTransaction(serviceId, transactionId) {
return __awaiter(this, void 0, void 0, function* () {
Expand All @@ -129,7 +129,7 @@ class DirectBilling {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#directbilling-generowanie-transakcji
https://docs.simpay.pl/pl/typescript/?typescript#directbilling-generowanie-transakcji
*/
createTransaction(serviceId, key, request) {
return __awaiter(this, void 0, void 0, function* () {
Expand Down
18 changes: 9 additions & 9 deletions lib/payments/sms.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Sms {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-listy-uslug
https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-uslug
*/
getServices() {
return __awaiter(this, void 0, void 0, function* () {
Expand Down Expand Up @@ -58,7 +58,7 @@ class Sms {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-informacji-o-usludze
https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-usludze
*/
getService(id) {
return __awaiter(this, void 0, void 0, function* () {
Expand All @@ -68,7 +68,7 @@ class Sms {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-listy-transakcji
https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-transakcji
*/
getTransactions(serviceId) {
return __awaiter(this, void 0, void 0, function* () {
Expand Down Expand Up @@ -102,7 +102,7 @@ class Sms {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-informacji-o-transakcji
https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-transakcji
*/
getTransaction(serviceId, transactionId) {
return __awaiter(this, void 0, void 0, function* () {
Expand All @@ -112,7 +112,7 @@ class Sms {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-dostepnych-numerow-dla-uslugi
https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-dostepnych-numerow-dla-uslugi
*/
getServiceNumbers(serviceId) {
return __awaiter(this, void 0, void 0, function* () {
Expand All @@ -138,15 +138,15 @@ class Sms {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#sms-informacji-o-pojedynczym-numerze-uslugi
https://docs.simpay.pl/pl/typescript/?typescript#sms-informacji-o-pojedynczym-numerze-uslugi
*/
getServiceNumber(serviceId, number) {
return __awaiter(this, void 0, void 0, function* () {
return (yield this.client.get(`/${serviceId}/numbers/${number}`)).data.data;
});
}
/*
https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-wszystkich-dostepnych-numerow
https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-wszystkich-dostepnych-numerow
*/
getNumbers() {
return __awaiter(this, void 0, void 0, function* () {
Expand All @@ -172,15 +172,15 @@ class Sms {
});
}
/*
https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-pojedynczego-numeru-sms
https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-pojedynczego-numeru-sms
*/
getNumber(number) {
return __awaiter(this, void 0, void 0, function* () {
return (yield this.client.get(`/numbers/${number}`)).data.data;
});
}
/*
https://docs.simpay.pl/typescript/?typescript#sms-weryfikacja-poprawnosci-kodu
https://docs.simpay.pl/pl/typescript/?typescript#sms-weryfikacja-poprawnosci-kodu
*/
verifySmsCode(serviceId, code, number) {
return __awaiter(this, void 0, void 0, function* () {
Expand Down
8 changes: 4 additions & 4 deletions lib/payments/sms.xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class SmsXml {
this.apiKey = apiKey;
}
/*
https://docs.simpay.pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms
https://docs.simpay.pl/pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms
*/
checkParameters(map) {
for (const param of SmsXml.params) {
Expand All @@ -17,7 +17,7 @@ class SmsXml {
return map.sign === this.sign(map);
}
/*
https://docs.simpay.pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms
https://docs.simpay.pl/pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms
*/
generateCode() {
let result = '';
Expand All @@ -27,13 +27,13 @@ class SmsXml {
return result;
}
/*
https://docs.simpay.pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms
https://docs.simpay.pl/pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms
*/
getSmsValue(phone) {
return SmsXml.codes[phone];
}
/*
https://docs.simpay.pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms
https://docs.simpay.pl/pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms
*/
generateXml(text) {
return `<?xml version="1.0" encoding="UTF-8"?><sms-response>${text.normalize('NFKD')}<sms-text></sms-text></sms-response>`;
Expand Down
12 changes: 6 additions & 6 deletions lib/tests/directbilling.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ const directbilling_1 = require("../payments/directbilling");
const amount_type_1 = require("../models/amount.type");
const run = () => __awaiter(void 0, void 0, void 0, function* () {
const db = new directbilling_1.DirectBilling('0b4dca15', '3eea38f407073ff0abff956b57d71783');
// https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-listy-uslug
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-uslug
console.log(yield db.getServices());
console.log(yield db.getServicesPaginated(1, 100));
// https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-informacji-o-usludze
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-usludze
console.log(yield db.getService(158));
// https://docs.simpay.pl/typescript/?typescript#directbilling-kalkulacja-prowizji
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-kalkulacja-prowizji
console.log(yield db.calculateCommission(158, 10.00));
// https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-listy-transakcji
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-transakcji
console.log(yield db.getTransactions(158));
console.log(yield db.getTransactionsPaginated(158, 1, 100));
// https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji
console.log(yield db.getTransaction(158, '559911'));
// https://docs.simpay.pl/typescript/?typescript#directbilling-generowanie-transakcji
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-generowanie-transakcji
console.log(yield db.createTransaction(158, 'key', {
amount: 10.00,
amountType: amount_type_1.AmountType.GROSS,
Expand Down
18 changes: 9 additions & 9 deletions lib/tests/sms.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
const sms_1 = require("../payments/sms");
const run = () => __awaiter(void 0, void 0, void 0, function* () {
const sms = new sms_1.Sms('0b4dca15', '3eea38f407073ff0abff956b57d71783');
// https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-listy-uslug
// https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-uslug
console.log(yield sms.getServices());
console.log(yield sms.getServicesPaginated(1, 100));
// https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-informacji-o-usludze
// https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-usludze
console.log(yield sms.getService(3549));
// https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-listy-transakcji
// https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-transakcji
console.log(yield sms.getTransactions(3549));
console.log(yield sms.getTransactionsPaginated(3549, 1, 100));
// https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-informacji-o-transakcji
// https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-transakcji
console.log(yield sms.getTransaction(3549, 2216609));
// https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-dostepnych-numerow-dla-uslugi
// https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-dostepnych-numerow-dla-uslugi
console.log(yield sms.getServiceNumbers(3549));
console.log(yield sms.getServiceNumbersPaginated(3549, 1, 100));
// https://docs.simpay.pl/typescript/?typescript#sms-informacji-o-pojedynczym-numerze-uslugi
// https://docs.simpay.pl/pl/typescript/?typescript#sms-informacji-o-pojedynczym-numerze-uslugi
console.log(yield sms.getServiceNumber(3549, 7055));
// https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-wszystkich-dostepnych-numerow
// https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-wszystkich-dostepnych-numerow
console.log(yield sms.getNumbers());
console.log(yield sms.getNumbersPaginated(1, 100));
// https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-pojedynczego-numeru-sms
// https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-pojedynczego-numeru-sms
console.log(yield sms.getNumber(7055));
// https://docs.simpay.pl/typescript/?typescript#sms-weryfikacja-poprawnosci-kodu
// https://docs.simpay.pl/pl/typescript/?typescript#sms-weryfikacja-poprawnosci-kodu
console.log(yield sms.verifySmsCode(3549, '81FFC5', 7055));
console.log(yield sms.verifySmsCode(3549, '81FFC5'));
});
Expand Down
12 changes: 6 additions & 6 deletions src/tests/directbilling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ import {AmountType} from '../models/amount.type';
const run = async () => {
const db = new DirectBilling('0b4dca15', '3eea38f407073ff0abff956b57d71783');

// https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-listy-uslug
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-uslug
console.log( await db.getServices() );
console.log( await db.getServicesPaginated(1, 100) );

// https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-informacji-o-usludze
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-usludze
console.log( await db.getService(158) );

// https://docs.simpay.pl/typescript/?typescript#directbilling-kalkulacja-prowizji
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-kalkulacja-prowizji
console.log( await db.calculateCommission(158, 10.00) );

// https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-listy-transakcji
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-transakcji
const transactionsList = await db.getTransactions(158);

console.log( transactionsList );

console.log( await db.getTransactionsPaginated(158, 1, 100) );

// https://docs.simpay.pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji
console.log( await db.getTransaction(158, transactionsList?.[ 0 ].id) );

// https://docs.simpay.pl/typescript/?typescript#directbilling-generowanie-transakcji
// https://docs.simpay.pl/pl/typescript/?typescript#directbilling-generowanie-transakcji
console.log( await db.createTransaction(158, 'key', {
amount: 10.00,
amountType: AmountType.GROSS,
Expand Down

0 comments on commit 95d60a2

Please sign in to comment.