bs2_api 1.0.3 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1121a339962d5ccf01e2e82d2cac9c26326b0cb5f07bb58af18cd2aaf8502009
4
- data.tar.gz: 5ca659be8a6422c8c620b4304769822bd78d64835a6ed6f8e2b4612f0e3cea07
3
+ metadata.gz: 9948a13c43ca94bde1a63346d90ba910307f6d9c4c99a3b41e805fdb898f9f05
4
+ data.tar.gz: 4d79fa7141f7b6a045890a56c1daec6f9d4553449eccefc0dcb50b7a8a9f0eb3
5
5
  SHA512:
6
- metadata.gz: 2ba02bb1b9d40ea4e78d087a4cf3e89fa698adce23b1c7d50eedc4fe05808a548f7cbcb15ea98a321515b0b7faeabaf10cdccb5a80b35295cc9926758c3b26a8
7
- data.tar.gz: 864734c20782307fe3d2ba4cb86dd78ee1de72f84681a3019b9a6c48b504eae9aef08aecbb66541515b80791d9abcbb39a594d0aefb6427d5c71cdd5916376bd
6
+ metadata.gz: 7794ad1e367295affc377c9385bc0be2d5a6dc1134e4b6af9924234c2c74b56e1b8e1bc639c98843e315e1af5d0098a3eae0a590127437a7e0791ea5a10d2bcd
7
+ data.tar.gz: 0532be7d7098df9343178c5388ba032c7139a98612ef7a0b90197a3f9949327512e0d5f2e5a27fb783bcacf5fc9f907a5eeb62ba55c99f1c55b94e3c00a7d466
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## [1.1.0] - 2021-09-13
2
+ - Get payment detail
3
+
1
4
  ## [1.0.3] - 2021-07-23
2
5
  - First and Last name methods to customer
3
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bs2_api (1.0.2)
4
+ bs2_api (1.1.1)
5
5
  activesupport
6
6
  builder
7
7
  bundler
@@ -11,12 +11,11 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activesupport (6.1.4)
14
+ activesupport (7.0.0)
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
16
  i18n (>= 1.6, < 2)
17
17
  minitest (>= 5.1)
18
18
  tzinfo (~> 2.0)
19
- zeitwerk (~> 2.3)
20
19
  addressable (2.7.0)
21
20
  public_suffix (>= 2.0.2, < 5.0)
22
21
  builder (3.2.4)
@@ -31,15 +30,15 @@ GEM
31
30
  httparty (0.18.1)
32
31
  mime-types (~> 3.0)
33
32
  multi_xml (>= 0.5.2)
34
- i18n (1.8.10)
33
+ i18n (1.8.11)
35
34
  concurrent-ruby (~> 1.0)
36
35
  macaddr (1.7.2)
37
36
  systemu (~> 2.6.5)
38
37
  method_source (1.0.0)
39
- mime-types (3.3.1)
38
+ mime-types (3.4.1)
40
39
  mime-types-data (~> 3.2015)
41
- mime-types-data (3.2021.0704)
42
- minitest (5.14.4)
40
+ mime-types-data (3.2021.1115)
41
+ minitest (5.15.0)
43
42
  multi_xml (0.6.0)
44
43
  pry (0.13.1)
45
44
  coderay (~> 1.1)
@@ -48,7 +47,7 @@ GEM
48
47
  byebug (~> 11.0)
49
48
  pry (~> 0.13.0)
50
49
  public_suffix (4.0.6)
51
- rake (13.0.4)
50
+ rake (13.0.6)
52
51
  rexml (3.2.5)
53
52
  rspec (3.10.0)
54
53
  rspec-core (~> 3.10.0)
@@ -73,7 +72,6 @@ GEM
73
72
  addressable (>= 2.3.6)
74
73
  crack (>= 0.3.2)
75
74
  hashdiff (>= 0.4.0, < 2.0.0)
76
- zeitwerk (2.4.2)
77
75
 
78
76
  PLATFORMS
79
77
  ruby
@@ -89,4 +87,4 @@ DEPENDENCIES
89
87
  webmock (~> 3.13)
90
88
 
91
89
  BUNDLED WITH
92
- 2.2.18
90
+ 2.2.31
data/README.md CHANGED
@@ -12,7 +12,7 @@ TO-DO:
12
12
  - [x] Criar pagamento por Chave
13
13
  - [x] Criar pagamento Manual
14
14
  - [x] Confirmar pagamento
15
- - [ ] Consultar pagamento
15
+ - [x] Consultar pagamento
16
16
  - Recebimentos (**Recebe** dinheiro de alguém)
17
17
  - [ ] Cobrança estático
18
18
  - [ ] Cobrança dinâmico
@@ -66,12 +66,14 @@ pix_key = Bs2Api::Entities::PixKey.new(
66
66
  # Veja abaixo (Classes de errors) quais erros que podem ser lançados
67
67
  pay_key = Bs2Api::Payment::Key.new(pix_key).call
68
68
 
69
- pay_key.payment.payment_idid
69
+ pay_key.payment.payment_id
70
70
  => "96f0b3c4-4c76-4a7a-9933-9c9f86df7490" # pagamentoId gerado no BS2
71
71
 
72
72
  pay_key.payment.end_to_end_id
73
73
  => "E710278662021061618144401750781P" # endToEndId gerado no BS2
74
74
 
75
+ pay_key.payment.class
76
+ => Bs2Api::Entities::Payment
75
77
  ```
76
78
 
77
79
  ### Inicia ordem de Transferência PIX via: Manual
@@ -99,10 +101,13 @@ receiver_bank = Bs2Api::Entities::Bank.new(
99
101
  pay_manual = Bs2Api::Payment::Manual.new(receiver_bank).call
100
102
 
101
103
  pay_manual.payment.payment_id
102
- => "96f0b3c4-4c76-4a7a-9933-9c9f86df7490" # UUID gerado no BS2
104
+ => "96f0b3c4-4c76-4a7a-9933-9c9f86df7490" # Payment id no BS2
103
105
 
104
106
  pay_manual.payment.end_to_end_id
105
107
  => "E710278662021061618144401750781P" # endToEndId gerado no BS2
108
+
109
+ pay_manual.payment.class
110
+ => Bs2Api::Entities::Payment
106
111
  ```
107
112
 
108
113
  ### Confirmar ordem de transferência
@@ -127,6 +132,21 @@ raise Bs2Api::Errors::ConfirmationError
127
132
  confirmation.success?
128
133
  ```
129
134
 
135
+ ### Busca informações do pagamento
136
+ ```ruby
137
+ payment_id = "96f0b3c4-4c76-4a7a-9933-9c9f86df7490"
138
+
139
+ payment = Bs2Api::Payment::Detail.new(payment_id).call # Payment id no BS2
140
+ payment.id
141
+ => "96f0b3c4-4c76-4a7a-9933-9c9f86df7490"
142
+
143
+ payment.end_to_end_id
144
+ => "E710278662021061618144401750781P" # endToEndId gerado no BS2
145
+
146
+ payment.class
147
+ => Bs2Api::Entities::Payment
148
+ ```
149
+
130
150
  ### Classes de erros:
131
151
  ```ruby
132
152
  # Todos erros herdam de:
@@ -22,6 +22,7 @@ module Bs2Api
22
22
  end
23
23
 
24
24
  def self.from_response(hash_payload)
25
+ return if hash_payload.blank?
25
26
  hash = ActiveSupport::HashWithIndifferentAccess.new(hash_payload)
26
27
 
27
28
  Bs2Api::Entities::Bank.new(
@@ -13,21 +13,21 @@ module Bs2Api
13
13
  end
14
14
 
15
15
  def to_hash
16
- ActiveSupport::HashWithIndifferentAccess.new(
17
- {
18
- "pagamentoId": @payment_id,
19
- "endToEndId": @end_to_end_id,
20
- "recebedor": @receiver.to_hash,
21
- "pagador": @payer.to_hash
22
- }
23
- )
16
+ hash_data = {
17
+ "pagamentoId": @payment_id,
18
+ "endToEndId": @end_to_end_id
19
+ }
20
+
21
+ hash_data.merge!({ "recebedor": @receiver.to_hash } ) if @receiver.present?
22
+ hash_data.merge!({ "pagador": @payer.to_hash } ) if @payer.present?
23
+ ActiveSupport::HashWithIndifferentAccess.new(hash_data)
24
24
  end
25
25
 
26
26
  def self.from_response(hash_payload)
27
27
  hash = ActiveSupport::HashWithIndifferentAccess.new(hash_payload)
28
28
 
29
29
  Bs2Api::Entities::Payment.new(
30
- payment_id: hash["pagamentoId"],
30
+ payment_id: hash["pagamentoId"] || hash["cobranca"]["id"],
31
31
  end_to_end_id: hash["endToEndId"],
32
32
  receiver: Bs2Api::Entities::Bank.from_response(hash["recebedor"]),
33
33
  payer: Bs2Api::Entities::Bank.from_response(hash["pagador"])
@@ -0,0 +1,27 @@
1
+ module Bs2Api
2
+ module Payment
3
+ class Detail < Base
4
+ attr_reader :success
5
+
6
+ def initialize payment_id
7
+ @payment_id = payment_id
8
+ end
9
+
10
+ def call
11
+ response = detail_request
12
+ raise Bs2Api::Errors::BadRequest, ::Util::Response.parse_error(response) unless response.ok?
13
+
14
+ Bs2Api::Entities::Payment.from_response(response)
15
+ end
16
+
17
+ private
18
+ def url
19
+ "#{Bs2Api.endpoint}/pix/direto/forintegration/v1/pagamentos/#{@payment_id}"
20
+ end
21
+
22
+ def detail_request
23
+ HTTParty.get(url, headers: headers)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -7,15 +7,16 @@ module Bs2Api
7
7
  class BankService
8
8
  class << self
9
9
  def find_by_code code
10
+ code = code.to_s.strip
10
11
  bank = bank_list.find {|b| b["code"] == code }
11
- raise Bs2Api::Errors::MissingBank, 'Bank not registered into util/banks.yml file' if bank.blank?
12
+ raise Bs2Api::Errors::MissingBank, "Bank with code '#{code}' not registered into util/banks.yml file" if bank.blank?
12
13
  bank
13
14
  end
14
15
 
15
16
  def bank_list
16
- @bank_list ||= YAML.load_file(File.join(__dir__, 'banks.yml'))
17
+ YAML.load_file(File.join(__dir__, 'banks.yml'))
17
18
  end
18
19
  end
19
20
  end
20
21
  end
21
- end
22
+ end
@@ -6,16 +6,16 @@
6
6
  ispb: "28195667"
7
7
  - name: "Banco ABN AMRO"
8
8
  code: "75"
9
- ispb: "3532415"
9
+ ispb: "03532415"
10
10
  - name: "Banco ALFA"
11
11
  code: "25"
12
- ispb: "3323840"
12
+ ispb: "03323840"
13
13
  - name: "Banco ARBI"
14
14
  code: "213"
15
15
  ispb: "54403563"
16
16
  - name: "Banco AZTECA do Brasil"
17
17
  code: "19"
18
- ispb: "9391857"
18
+ ispb: "09391857"
19
19
  - name: "Banco BARCLAYS"
20
20
  code: "740"
21
21
  ispb: "61146577"
@@ -24,13 +24,13 @@
24
24
  ispb: "15114366"
25
25
  - name: "Banco BMFBOVESPA"
26
26
  code: "96"
27
- ispb: "997185"
27
+ ispb: "00997185"
28
28
  - name: "Banco BMG"
29
29
  code: "318"
30
30
  ispb: "61186680"
31
31
  - name: "Banco BNP PARIBAS Brasil"
32
32
  code: "752"
33
- ispb: "1522368"
33
+ ispb: "01522368"
34
34
  - name: "Banco BOA VISTA INTERATLANTICO"
35
35
  code: "248"
36
36
  ispb: "33485541"
@@ -42,7 +42,7 @@
42
42
  ispb: "48795256"
43
43
  - name: "Banco BRADESCARD"
44
44
  code: "63"
45
- ispb: "4184779"
45
+ ispb: "04184779"
46
46
  - name: "Banco BRADESCO"
47
47
  code: "237"
48
48
  ispb: "60746948"
@@ -54,7 +54,7 @@
54
54
  ispb: "59438325"
55
55
  - name: "Banco BRADESCO FINANCIAMENTOS"
56
56
  code: "394"
57
- ispb: "7207996"
57
+ ispb: "07207996"
58
58
  - name: "Banco BTG PACTUAL"
59
59
  code: "208"
60
60
  ispb: "30306294"
@@ -69,13 +69,13 @@
69
69
  ispb: "15173776"
70
70
  - name: "Banco CARGILL"
71
71
  code: "40"
72
- ispb: "3609817"
72
+ ispb: "03609817"
73
73
  - name: "Banco CEDULA"
74
74
  code: "266"
75
75
  ispb: "33132044"
76
76
  - name: "Banco CETELEM"
77
77
  code: "739"
78
- ispb: "558456"
78
+ ispb: "00558456"
79
79
  - name: "Banco CIFRA"
80
80
  code: "233"
81
81
  ispb: "62421979"
@@ -87,10 +87,10 @@
87
87
  ispb: "31597552"
88
88
  - name: "Banco COOPERATIVO do Brasil – Bancoob"
89
89
  code: "756"
90
- ispb: "2038232"
90
+ ispb: "02038232"
91
91
  - name: "Banco COOPERATIVO SICREDI"
92
92
  code: "748"
93
- ispb: "1181521"
93
+ ispb: "01181521"
94
94
  - name: "Banco CREDIT AGRICOLE Brasil"
95
95
  code: "222"
96
96
  ispb: "75647891"
@@ -99,7 +99,7 @@
99
99
  ispb: "32062580"
100
100
  - name: "Banco da AMAZONIA"
101
101
  code: "3"
102
- ispb: "4902979"
102
+ ispb: "04902979"
103
103
  - name: "Banco da CHINA Brasil"
104
104
  code: "83"
105
105
  ispb: "10690848"
@@ -123,19 +123,19 @@
123
123
  ispb: "61199881"
124
124
  - name: "Banco do BRASIL"
125
125
  code: "1"
126
- ispb: "0"
126
+ ispb: "00000000"
127
127
  - name: "Banco do ESTADO de SERGIPE"
128
128
  code: "47"
129
129
  ispb: "13009717"
130
130
  - name: "Banco do ESTADO do PARA"
131
131
  code: "37"
132
- ispb: "4913711"
132
+ ispb: "04913711"
133
133
  - name: "Banco do ESTADO do RIO GRANDE do SUL (BANRISUL"
134
134
  code: "41"
135
135
  ispb: "92702067"
136
136
  - name: "Banco do NORDESTE do Brasil"
137
137
  code: "4"
138
- ispb: "7237373"
138
+ ispb: "07237373"
139
139
  - name: "Banco FATOR"
140
140
  code: "265"
141
141
  ispb: "33644196"
@@ -156,7 +156,7 @@
156
156
  ispb: "31895683"
157
157
  - name: "Banco INDUSTRIAL e COMERCIAL"
158
158
  code: "320"
159
- ispb: "7450604"
159
+ ispb: "07450604"
160
160
  - name: "Banco INDUSVAL"
161
161
  code: "653"
162
162
  ispb: "61024352"
@@ -165,7 +165,7 @@
165
165
  ispb: "58497702"
166
166
  - name: "Banco INTERMEDIUM"
167
167
  code: "77"
168
- ispb: "416968"
168
+ ispb: "00416968"
169
169
  - name: "Banco INVESTCRED UNIBANCO"
170
170
  code: "249"
171
171
  ispb: "61182408"
@@ -177,7 +177,7 @@
177
177
  ispb: "60872504"
178
178
  - name: "Banco J. SAFRA"
179
179
  code: "74"
180
- ispb: "3017677"
180
+ ispb: "03017677"
181
181
  - name: "Banco J.P. MORGAN"
182
182
  code: "376"
183
183
  ispb: "33172537"
@@ -186,10 +186,10 @@
186
186
  ispb: "91884981"
187
187
  - name: "Banco KDB do Brasil"
188
188
  code: "76"
189
- ispb: "7656500"
189
+ ispb: "07656500"
190
190
  - name: "Banco KEB do Brasil"
191
191
  code: "757"
192
- ispb: "2318507"
192
+ ispb: "02318507"
193
193
  - name: "Banco LUSO BRASILEIRO"
194
194
  code: "600"
195
195
  ispb: "59118133"
@@ -207,13 +207,13 @@
207
207
  ispb: "30723886"
208
208
  - name: "Banco MORGAN STANLEY DEAN WITTER"
209
209
  code: "66"
210
- ispb: "2801938"
210
+ ispb: "02801938"
211
211
  - name: "Banco ORIGINAL"
212
212
  code: "212"
213
213
  ispb: "92894922"
214
214
  - name: "Banco ORIGINAL do Agronegócio"
215
215
  code: "79"
216
- ispb: "9516419"
216
+ ispb: "09516419"
217
217
  - name: "Banco PANAMERICANO"
218
218
  code: "623"
219
219
  ispb: "59285411"
@@ -231,10 +231,10 @@
231
231
  ispb: "62144175"
232
232
  - name: "Banco POTTENCIAL"
233
233
  code: "735"
234
- ispb: "253448"
234
+ ispb: "00253448"
235
235
  - name: "Banco RABOBANK INTERNATIONAL Brasil"
236
236
  code: "747"
237
- ispb: "1023570"
237
+ ispb: "01023570"
238
238
  - name: "Banco RANDON"
239
239
  code: "88"
240
240
  ispb: "11476673"
@@ -243,7 +243,7 @@
243
243
  ispb: "68900810"
244
244
  - name: "Banco RIBEIRAO PRETO"
245
245
  code: "741"
246
- ispb: "517645"
246
+ ispb: "00517645"
247
247
  - name: "Banco RODOBENS"
248
248
  code: "120"
249
249
  ispb: "33603457"
@@ -255,7 +255,7 @@
255
255
  ispb: "90400888"
256
256
  - name: "Banco SEMEAR"
257
257
  code: "743"
258
- ispb: "795423"
258
+ ispb: "00795423"
259
259
  - name: "Banco SOCIETE GENERALE Brasil"
260
260
  code: "366"
261
261
  ispb: "61533584"
@@ -267,7 +267,7 @@
267
267
  ispb: "60518222"
268
268
  - name: "Banco TOPAZIO"
269
269
  code: "82"
270
- ispb: "7679404"
270
+ ispb: "07679404"
271
271
  - name: "Banco TRIÂNGULO"
272
272
  code: "634"
273
273
  ispb: "17351180"
@@ -315,28 +315,28 @@
315
315
  ispb: "45246410"
316
316
  - name: "BRB – Banco de Brasília"
317
317
  code: "70"
318
- ispb: "208"
318
+ ispb: "00000208"
319
319
  - name: "BRICKELL Crédito Financiamento e Investimento"
320
320
  code: "92"
321
321
  ispb: "12865507"
322
322
  - name: "CAIXA ECONOMICA FEDERAL"
323
323
  code: "104"
324
- ispb: "360305"
324
+ ispb: "00360305"
325
325
  - name: "CC CREDICOAMO Crédito Rural Cooperativa"
326
326
  code: "10"
327
327
  ispb: "81723108"
328
328
  - name: "CC UNICRED Brasil Central"
329
329
  code: "112"
330
- ispb: "4243780"
330
+ ispb: "04243780"
331
331
  - name: "CC UNICRED do Brasil"
332
332
  code: "136"
333
- ispb: "315557"
333
+ ispb: "00315557"
334
334
  - name: "CC UNIPRIME NORTE do PARANA"
335
335
  code: "84"
336
- ispb: "2398976"
336
+ ispb: "02398976"
337
337
  - name: "CECOOPES – Central das Cooperativas de Economia e Crédito Mútuo"
338
338
  code: "114"
339
- ispb: "5790149"
339
+ ispb: "05790149"
340
340
  - name: "CITIBANK N.A."
341
341
  code: "477"
342
342
  ispb: "33042953"
@@ -345,10 +345,10 @@
345
345
  ispb: "73085573"
346
346
  - name: "Cooperativa Central de Crédito NOROESTE Brasileiro"
347
347
  code: "97"
348
- ispb: "4632856"
348
+ ispb: "04632856"
349
349
  - name: "Cooperativa Central de Crédito Urbano – CECRED"
350
350
  code: "85"
351
- ispb: "5463212"
351
+ ispb: "05463212"
352
352
  - name: "Cooperativa de Crédito Rural da Região da Mogiana"
353
353
  code: "89"
354
354
  ispb: "62109566"
@@ -360,10 +360,10 @@
360
360
  ispb: "62331228"
361
361
  - name: "HIPERCARD Banco Múltiplo"
362
362
  code: "62"
363
- ispb: "3012230"
363
+ ispb: "03012230"
364
364
  - name: "HSBC BANK Brasil – Banco Múltiplo"
365
365
  code: "399"
366
- ispb: "1701201"
366
+ ispb: "01701201"
367
367
  - name: "ICBC do Brasil Banco Múltiplo"
368
368
  code: "132"
369
369
  ispb: "17453575"
@@ -384,10 +384,10 @@
384
384
  ispb: "29030467"
385
385
  - name: "UNICRED Central RS – Central de Cooperativa de Economia e Crédito Mútuo do Estado do RS"
386
386
  code: "91"
387
- ispb: "1634601"
387
+ ispb: "01634601"
388
388
  - name: "UNICRED Central Santa Catarina"
389
389
  code: "87"
390
- ispb: "543968"
390
+ ispb: "00543968"
391
391
  - name: "UNIPRIME Central – Central Interestadual de Cooperativa de Crédito"
392
392
  code: "99"
393
- ispb: "3046391"
393
+ ispb: "03046391"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bs2Api
4
- VERSION = "1.0.3"
4
+ VERSION = "1.1.3"
5
5
  end
data/lib/bs2_api.rb CHANGED
@@ -32,6 +32,7 @@ require 'bs2_api/payment/base'
32
32
  require 'bs2_api/payment/key'
33
33
  require 'bs2_api/payment/manual'
34
34
  require 'bs2_api/payment/confirmation'
35
+ require 'bs2_api/payment/detail'
35
36
 
36
37
  require 'bs2_api/request/auth'
37
38
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bs2_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kim Pastro
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-23 00:00:00.000000000 Z
11
+ date: 2022-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -217,6 +217,7 @@ files:
217
217
  - lib/bs2_api/errors/unauthorized.rb
218
218
  - lib/bs2_api/payment/base.rb
219
219
  - lib/bs2_api/payment/confirmation.rb
220
+ - lib/bs2_api/payment/detail.rb
220
221
  - lib/bs2_api/payment/key.rb
221
222
  - lib/bs2_api/payment/manual.rb
222
223
  - lib/bs2_api/request/auth.rb
@@ -231,7 +232,7 @@ metadata:
231
232
  homepage_uri: https://github.com/latamgateway/bs2_api
232
233
  source_code_uri: https://github.com/latamgateway/bs2_api
233
234
  changelog_uri: https://github.com/latamgateway/bs2_api/blob/main/CHANGELOG.md
234
- post_install_message:
235
+ post_install_message:
235
236
  rdoc_options: []
236
237
  require_paths:
237
238
  - lib
@@ -250,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
251
  version: '0'
251
252
  requirements: []
252
253
  rubygems_version: 3.1.4
253
- signing_key:
254
+ signing_key:
254
255
  specification_version: 4
255
256
  summary: Integração com a API do BS2
256
257
  test_files: []