Skip to content

Commit 18fe18f

Browse files
committed
[bcc-kz] make public
1 parent d732d99 commit 18fe18f

21 files changed

+4503
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<provider>
3+
<id>bcc-kz</id>
4+
<version>1.0</version>
5+
<build>1</build>
6+
<company>15361</company>
7+
<modular>true</modular>
8+
<codeRequired>false</codeRequired>
9+
<files>
10+
<js>index.js</js>
11+
<preferences>preferences.xml</preferences>
12+
</files>
13+
<description></description>
14+
</provider>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import { convertAccounts } from '../../../converters'
2+
3+
describe('convertAccounts', () => {
4+
it.each([
5+
[
6+
[
7+
{
8+
id: 2457439,
9+
account20: '1025604853',
10+
currency: 'KZT',
11+
module: '63',
12+
note: '',
13+
iin: '751101400945',
14+
access_level: 2,
15+
visible: true,
16+
balance: '6840.14',
17+
structType: 'broker'
18+
}
19+
],
20+
[
21+
{
22+
product: {
23+
productId: '2457439',
24+
productType: 'investment'
25+
},
26+
accounts: [
27+
{
28+
balance: 6840.14,
29+
id: '2457439',
30+
instrument: 'KZT',
31+
syncIds: [
32+
'1025604853'
33+
],
34+
title: 'Брокерский счёт',
35+
type: 'investment'
36+
}
37+
]
38+
}
39+
]
40+
],
41+
[
42+
[
43+
{
44+
id: 2457439,
45+
account20: '1025604853',
46+
currency: 'KZT',
47+
module: '63',
48+
note: '',
49+
iin: '751101400945',
50+
access_level: 2,
51+
visible: true,
52+
balance: 'Нет данных',
53+
structType: 'broker'
54+
}
55+
],
56+
[
57+
{
58+
product: {
59+
productId: '2457439',
60+
productType: 'investment'
61+
},
62+
accounts: [
63+
{
64+
id: '2457439',
65+
type: 'investment',
66+
title: 'Брокерский счёт',
67+
instrument: 'KZT',
68+
syncIds: ['1025604853'],
69+
balance: null
70+
}
71+
]
72+
}
73+
]
74+
]
75+
])('converts broker account', (apiAccounts, accounts) => {
76+
expect(convertAccounts(apiAccounts)).toEqual(accounts)
77+
})
78+
})
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
import { convertAccounts } from '../../../converters'
2+
3+
describe('convertAccounts', () => {
4+
it.each([
5+
[
6+
[
7+
{
8+
id: 3849913,
9+
acc_id: 'I/210330/1/988',
10+
type: 'Visa_Gold_Reward.png',
11+
account20: 'KZ688562204112187559',
12+
card_num: '489993******2773',
13+
note: '#картакарта',
14+
module: '10',
15+
currency: 'KZT',
16+
holder: '',
17+
exp_date: '03.2026',
18+
psys: 'VISA',
19+
branch: 'Отделение №2202',
20+
product_code: '0.300.1500.8',
21+
reissue: false,
22+
credit_limit: 40000,
23+
is_with_deposit: false,
24+
gained: 0,
25+
visible: true,
26+
virtual: false,
27+
social: false,
28+
junior: false,
29+
direct_credit: false,
30+
card_group: 'GROUP_5',
31+
has_applepay: true,
32+
has_installment: true,
33+
own_balance: 0.36,
34+
card_type: 'credit',
35+
allow_db: 1,
36+
allow_cr: 1,
37+
main_card: 1,
38+
card_design: 'group_5_kartakarta.png',
39+
card_color_text: 'ffffff',
40+
ext_conversion: true,
41+
bccpay: 0,
42+
multicard: false,
43+
access_level: 2,
44+
repay_amount: 0,
45+
cr_int_pay: 0,
46+
cr_exp_pay: 0,
47+
l_contract: 'AA3/2021/F/S/045919',
48+
l_procent: 22.99,
49+
l_start_date: '27.05.2021',
50+
l_end_date: '27.11.2024',
51+
lastdea: '27.11.2024',
52+
paydate: '27.09.2021',
53+
l_limit: 40000,
54+
l_available_limit: 40000,
55+
l_debt_sum: 0,
56+
l_percent_sum: 0,
57+
l_over_debt: 0,
58+
l_fine: 0,
59+
l_grace: 0,
60+
l_mandatory_pay: 0,
61+
debt_status: 'no_debt',
62+
limit: '40000',
63+
blocked: '0',
64+
balance: '40000.36',
65+
card_status: '00',
66+
percent: '',
67+
close_date: '',
68+
structType: 'card',
69+
details: {
70+
id: 3849913,
71+
iban: 'KZ688562204112187559',
72+
installment_enabled: false,
73+
categories_selected: 0,
74+
categories_chose: false,
75+
debt_info: {
76+
credit_line: {
77+
acc_name: 'AA3/2021/F/S/045919',
78+
pay_amount: 0,
79+
prc_amount: 0,
80+
cms_amount: 0,
81+
min_amount: 0
82+
},
83+
fine_amount: 0,
84+
over_debt_amount: 0,
85+
total_cms_amount: 0,
86+
total_prc_amount: 0,
87+
total_min_amount: 0,
88+
grace_amount: 0,
89+
total_debt_amount: 0,
90+
full_amount: 0,
91+
status: 'no_debt'
92+
}
93+
}
94+
}
95+
],
96+
[
97+
{
98+
product: {
99+
productId: '3849913',
100+
productType: 'ccard'
101+
},
102+
accounts: [
103+
{
104+
available: 40000.36,
105+
creditLimit: 40000,
106+
gracePeriodEndDate: new Date('2021-09-27T00:00:00.000+06:00'),
107+
id: '3849913',
108+
instrument: 'KZT',
109+
savings: false,
110+
syncIds: [
111+
'KZ688562204112187559',
112+
'489993******2773'
113+
],
114+
title: '#картакарта',
115+
totalAmountDue: 0,
116+
type: 'ccard'
117+
}
118+
]
119+
}
120+
]
121+
]
122+
])('converts creditCard', (apiAccounts, accounts) => {
123+
expect(convertAccounts(apiAccounts)).toEqual(accounts)
124+
})
125+
})
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
import { convertAccounts } from '../../../converters'
2+
3+
describe('convertAccounts', () => {
4+
it.each([
5+
[
6+
[
7+
{
8+
id: 2389652,
9+
type: 'CURRENT',
10+
account20: 'KZ778562204108223880',
11+
product: 'Специальный текущий счет (для пособий и социальных выплат без начисления вознаграждения)',
12+
open_date: '24.04.2020',
13+
accPTPSum: 0,
14+
visible: true,
15+
direct_credit: false,
16+
allow_db: 1,
17+
allow_cr: 0,
18+
can_close: true,
19+
is_epv: false,
20+
is_zhv: false,
21+
note: 'Специальный текущий счет (для пособий и социальных выплат без начисления вознаграждения)',
22+
acc_status: 'Рабочий',
23+
module: '01',
24+
currency: 'KZT',
25+
access_level: 2,
26+
for_credit: 'FALSE',
27+
balance: '0',
28+
blocked: '0',
29+
structType: 'current'
30+
},
31+
{
32+
id: 3788239,
33+
type: 'CURRENT',
34+
account20: 'KZ248562204112013751',
35+
product: 'Текущий счет физического лица',
36+
open_date: '13.05.2021',
37+
accPTPSum: 0,
38+
visible: true,
39+
direct_credit: false,
40+
allow_db: 1,
41+
allow_cr: 1,
42+
can_close: true,
43+
is_epv: false,
44+
is_zhv: false,
45+
note: 'Текущий счет',
46+
acc_status: 'Рабочий',
47+
module: '01',
48+
currency: 'KZT',
49+
access_level: 2,
50+
for_credit: 'FALSE',
51+
balance: '0',
52+
blocked: '0',
53+
structType: 'current'
54+
}
55+
],
56+
[
57+
{
58+
product: {
59+
productId: '2389652',
60+
productType: 'checking'
61+
},
62+
accounts: [
63+
{
64+
balance: 0,
65+
id: '2389652',
66+
instrument: 'KZT',
67+
savings: false,
68+
syncIds: [
69+
'KZ778562204108223880'
70+
],
71+
title: 'Специальный текущий счет (для пособий и социальных выплат без начисления вознаграждения)',
72+
type: 'checking'
73+
}
74+
]
75+
},
76+
{
77+
product: {
78+
productId: '3788239',
79+
productType: 'checking'
80+
},
81+
accounts: [
82+
{
83+
balance: 0,
84+
id: '3788239',
85+
instrument: 'KZT',
86+
savings: false,
87+
syncIds: [
88+
'KZ248562204112013751'
89+
],
90+
title: 'Текущий счет',
91+
type: 'checking'
92+
}
93+
]
94+
}
95+
]
96+
]
97+
])('converts current', (apiAccounts, accounts) => {
98+
expect(convertAccounts(apiAccounts)).toEqual(accounts)
99+
})
100+
})

0 commit comments

Comments
 (0)