bb_payments 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/MIT-LICENSE.txt +20 -0
- data/README.md +4 -0
- data/bb_payments-0.1.4.gem +0 -0
- data/bb_payments.gemspec +1 -1
- data/lib/bb_payments/api/payments.rb +79 -11
- data/lib/bb_payments/api/transfers.rb +70 -0
- data/lib/bb_payments/api/transfers_pix.rb +20 -4
- data/lib/bb_payments/models/devolution.rb +33 -0
- data/lib/bb_payments/models/find_payment_pix_response.rb +50 -0
- data/lib/bb_payments/models/find_payment_response.rb +83 -0
- data/lib/bb_payments/models/find_releases_response.rb +35 -0
- data/lib/bb_payments/models/release.rb +89 -0
- data/lib/bb_payments/version.rb +1 -1
- data/lib/bb_payments.rb +5 -0
- metadata +33 -27
- data/bb_payments-0.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44ccdf37cbe8db95b0e07f6ba99a4979a5626e5720f71f5b47dd990cb23ab053
|
4
|
+
data.tar.gz: 7e4db9adaef3eec55509e7e9eda32416fd479bbc4aa3ebeea0807840f9f0ec4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: debe4a258e5b3a45afd39fa33c8ba8af088e38c36966492fe809810d0b31071e861c1cfa570632b9cb1e36b01eac5f48d8e57da64508d768d412e20130b8041c
|
7
|
+
data.tar.gz: b782469dcb15e849d8948aa14b3861d4d1645c3ed47b261f03d5b3a734f445eea8f5465c31dfb5ef161d75d3a2c0388a2c235068d9ce07bbe05eb4f65ef9f6e9
|
data/MIT-LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2012-2023 Hent
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
Binary file
|
data/bb_payments.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.homepage = "https://github.com/ruby-banco-brasil/bb-payments"
|
12
12
|
s.summary = "A ruby wrapper for Banco do Brasil VPN Payments"
|
13
13
|
s.description = "This gem maps to the BB Payments API"
|
14
|
-
s.license = "
|
14
|
+
s.license = "MIT"
|
15
15
|
s.required_ruby_version = ">= 1.9"
|
16
16
|
|
17
17
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
@@ -70,8 +70,7 @@ module BancoBrasilPayments::Payments
|
|
70
70
|
# inclusive pagamentos e transferências relacionados ao PIX. Detre as informações consulatas estão o
|
71
71
|
# motivo e valores devolvidos.
|
72
72
|
def consult_payments(start_date, end_date, opts = {})
|
73
|
-
validations(api_client: api_client,
|
74
|
-
required_params: { start_date: start_date, end_date: end_date })
|
73
|
+
validations(api_client: api_client, required_params: { start_date: start_date, end_date: end_date })
|
75
74
|
|
76
75
|
client_opts = build_client_opts(api_client: api_client,
|
77
76
|
gw_app_key: gw_app_key,
|
@@ -80,22 +79,58 @@ module BancoBrasilPayments::Payments
|
|
80
79
|
# query parameters
|
81
80
|
query_params = client_opts[:query_params]
|
82
81
|
query_params[@api_client.config.app_key_name.to_sym] = gw_app_key
|
83
|
-
query_params[:
|
84
|
-
query_params[:
|
85
|
-
query_params[:
|
86
|
-
query_params[:
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
82
|
+
query_params[:dataInicio] = start_date.strftime('%d%m%Y').to_i
|
83
|
+
query_params[:dataFim] = end_date.strftime('%d%m%Y').to_i
|
84
|
+
query_params[:agenciaDebito] = opts[:debit_branch_office] unless opts[:debit_branch_office].nil?
|
85
|
+
query_params[:contaCorrenteDebito] = opts[:debit_current_account] unless opts[:debit_current_account].nil?
|
86
|
+
unless opts[:check_digits_debit_current_account].nil?
|
87
|
+
query_params[:digitoVerificadorContaCorrente] =
|
88
|
+
opts[:check_digits_debit_current_account]
|
89
|
+
end
|
90
|
+
query_params[:numeroContratoPagamento] = opts[:payment_contract] unless opts[:payment_contract].nil?
|
91
|
+
query_params[:estadoPagamento] = opts[:payment_state] unless opts[:payment_state].nil?
|
92
|
+
query_params[:index] = opts[:index] unless opts[:index].nil?
|
91
93
|
|
92
94
|
call_api_client(api_client: api_client,
|
93
|
-
http_method: :
|
95
|
+
http_method: :GET,
|
94
96
|
path: '/pagamentos',
|
95
97
|
data_only: opts.fetch(:data_only, true),
|
96
98
|
client_opts: client_opts)
|
97
99
|
end
|
98
100
|
|
101
|
+
# GET /lancamentos-periodo Consultar Lancamentos
|
102
|
+
def consult_entries(debit_branch_office, debit_current_account, check_digits_debit_current_account, start_date,
|
103
|
+
opts = {})
|
104
|
+
validations(api_client: api_client, required_params:
|
105
|
+
{ debit_branch_office: debit_branch_office,
|
106
|
+
debit_current_account: debit_current_account,
|
107
|
+
check_digits_debit_current_account: check_digits_debit_current_account,
|
108
|
+
start_date: start_date })
|
109
|
+
|
110
|
+
client_opts = build_client_opts(api_client: api_client,
|
111
|
+
gw_app_key: gw_app_key,
|
112
|
+
opts: opts,
|
113
|
+
return_type: 'FindReleasesResponse')
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = client_opts[:query_params]
|
117
|
+
query_params[@api_client.config.app_key_name.to_sym] = gw_app_key
|
118
|
+
query_params[:numeroAgenciaDebito] = debit_branch_office
|
119
|
+
query_params[:numeroContaCorrenteDebito] = debit_current_account
|
120
|
+
query_params[:digitoVerificadorContaCorrenteDebito] = check_digits_debit_current_account
|
121
|
+
query_params[:dataInicialdeEnviodaRequisição] = start_date.strftime('%d%m%Y').to_i
|
122
|
+
query_params[:dataFinaldeEnviodaRequisição] = opts[:end_date].strftime('%d%m%Y').to_i unless opts[:end_date].nil?
|
123
|
+
query_params[:codigodoEstadodoPagamento] = opts[:payment_state_code].to_i unless opts[:payment_state_code].nil?
|
124
|
+
query_params[:codigoProduto] = opts[:product_code].to_i unless opts[:product_code].nil?
|
125
|
+
query_params[:numeroDaPosicaoDePesquisa] = opts[:index].to_i unless opts[:index].nil?
|
126
|
+
|
127
|
+
call_api_client(api_client: api_client,
|
128
|
+
http_method: :GET,
|
129
|
+
path: '/lancamentos-periodo',
|
130
|
+
data_only: opts.fetch(:data_only, true),
|
131
|
+
client_opts: client_opts)
|
132
|
+
end
|
133
|
+
|
99
134
|
# GET /{id}
|
100
135
|
# Consulta um lote de pagamentos.
|
101
136
|
def find_batch_payments(id, opts = {})
|
@@ -112,4 +147,37 @@ module BancoBrasilPayments::Payments
|
|
112
147
|
data_only: opts.fetch(:data_only, true),
|
113
148
|
client_opts: client_opts)
|
114
149
|
end
|
150
|
+
|
151
|
+
# GET /transferencias/{id}
|
152
|
+
# Consultar um Pagamento Específico de um Lote de Transferências.
|
153
|
+
def find_payment(id, opts = {})
|
154
|
+
validations(api_client: api_client, required_params: { id: id })
|
155
|
+
|
156
|
+
client_opts = build_client_opts(api_client: api_client,
|
157
|
+
gw_app_key: gw_app_key,
|
158
|
+
opts: opts,
|
159
|
+
return_type: 'FindPaymentResponse')
|
160
|
+
|
161
|
+
call_api_client(api_client: api_client,
|
162
|
+
http_method: :GET,
|
163
|
+
path: "/transferencias/#{id}",
|
164
|
+
data_only: opts.fetch(:data_only, true),
|
165
|
+
client_opts: client_opts)
|
166
|
+
end
|
167
|
+
|
168
|
+
# GET /{id}/solicitacao
|
169
|
+
# Consulta sobre uma solicitação de requisição para efetuar um lote de pagamentos via transferência e os pagamentos deste lote.
|
170
|
+
def find_batch_transfer(id, opts = {})
|
171
|
+
validations(api_client: api_client, required_params: { id: id })
|
172
|
+
|
173
|
+
client_opts = build_client_opts(api_client: api_client,
|
174
|
+
gw_app_key: gw_app_key,
|
175
|
+
opts: opts)
|
176
|
+
|
177
|
+
call_api_client(api_client: api_client,
|
178
|
+
http_method: :GET,
|
179
|
+
path: "/#{id}/solicitacao",
|
180
|
+
data_only: opts.fetch(:data_only, true),
|
181
|
+
client_opts: client_opts)
|
182
|
+
end
|
115
183
|
end
|
@@ -30,4 +30,74 @@ module BancoBrasilPayments::Transfers
|
|
30
30
|
data_only: data_only,
|
31
31
|
client_opts: client_opts)
|
32
32
|
end
|
33
|
+
|
34
|
+
# GET /lotes-transferencias
|
35
|
+
# Realiza consulta a um Lote de Pagamentos realizados via Tranferência Bancária
|
36
|
+
def consult_batch_transfers(opts = {})
|
37
|
+
validations(api_client: api_client)
|
38
|
+
|
39
|
+
client_opts = build_client_opts(api_client: api_client,
|
40
|
+
gw_app_key: gw_app_key,
|
41
|
+
opts: opts)
|
42
|
+
|
43
|
+
query_params = client_opts[:query_params]
|
44
|
+
query_params[api_client.config.app_key_name.to_sym] = gw_app_key
|
45
|
+
query_params[:numeroContratoPagamento] = opts[:payment_contract] unless opts[:payment_contract].nil?
|
46
|
+
query_params[:agenciaDebito] = opts[:debit_branch_office] unless opts[:debit_branch_office].nil?
|
47
|
+
query_params[:contaCorrenteDebito] = opts[:debit_current_account] unless opts[:debit_current_account].nil?
|
48
|
+
unless opts[:check_digits_debit_current_account].nil?
|
49
|
+
query_params[:digitoVerificadorContaCorrente] =
|
50
|
+
opts[:check_digits_debit_current_account]
|
51
|
+
end
|
52
|
+
query_params[:dataInicio] = opts[:start_date].strftime('%d%m%Y').to_i unless opts[:start_date].nil?
|
53
|
+
query_params[:dataFim] = opts[:end_date].strftime('%d%m%Y').to_i unless opts[:end_date].nil?
|
54
|
+
query_params[:tipoPagamento] = opts[:payment_type] unless opts[:payment_type].nil?
|
55
|
+
query_params[:estadoRequisicao] = opts[:request_state] unless opts[:request_state].nil?
|
56
|
+
query_params[:index] = opts[:index] unless opts[:index].nil?
|
57
|
+
|
58
|
+
call_api_client(api_client: api_client,
|
59
|
+
http_method: :GET,
|
60
|
+
path: '/lotes-transferencias',
|
61
|
+
data_only: opts.fetch(:data_only, true),
|
62
|
+
client_opts: client_opts)
|
63
|
+
end
|
64
|
+
|
65
|
+
# GET /beneficiarios/{id}/transferencias
|
66
|
+
# Consultar Tranferências Bancárias realizadas por Beneficiário
|
67
|
+
def consult_beneficiary_transfers(id, index, beneficiary_kind, start_date, end_date)
|
68
|
+
validations(api_client: api_client)
|
69
|
+
|
70
|
+
client_opts = build_client_opts(api_client: api_client,
|
71
|
+
gw_app_key: gw_app_key,
|
72
|
+
opts: opts)
|
73
|
+
|
74
|
+
query_params = client_opts[:query_params]
|
75
|
+
query_params[api_client.config.app_key_name.to_sym] = gw_app_key
|
76
|
+
query_params[:indice] = index
|
77
|
+
query_params[:tipoBeneficiario] = beneficiary_kind
|
78
|
+
query_params[:dataInicio] = start_date
|
79
|
+
query_params[:dataFim] = end_date
|
80
|
+
query_params[:agenciaDebito] = opts[:debit_branch_office] unless opts[:debit_branch_office].nil?
|
81
|
+
query_params[:contaCorrenteDebito] = opts[:debit_current_account] unless opts[:debit_current_account].nil?
|
82
|
+
unless opts[:check_digits_debit_current_account].nil?
|
83
|
+
query_params[:digitoVerificadorContaCorrente] =
|
84
|
+
opts[:check_digits_debit_current_account]
|
85
|
+
end
|
86
|
+
query_params[:tipoPagamento] = opts[:payment_type] unless opts[:payment_type].nil?
|
87
|
+
query_params[:numeroCOMPE] = opts[:clearinghouse_code] unless opts[:clearinghouse_code].nil?
|
88
|
+
query_params[:numeroISPB] = opts[:ispb_code] unless opts[:ispb_code].nil?
|
89
|
+
query_params[:agenciaCredito] = opts[:credit_branch_office] unless opts[:credit_branch_office].nil?
|
90
|
+
query_params[:contaCorrenteCredito] = opts[:credit_current_account] unless opts[:credit_current_account].nil?
|
91
|
+
unless opts[:check_digits_credit_current_account].nil?
|
92
|
+
query_params[:digitoVerificadorContaCorrenteCredito] =
|
93
|
+
opts[:check_digits_credit_current_account]
|
94
|
+
end
|
95
|
+
query_params[:contaPagamentoCredito] = opts[:credit_paymen_account] unless opts[:credit_paymen_account].nil?
|
96
|
+
|
97
|
+
call_api_client(api_client: api_client,
|
98
|
+
http_method: :GET,
|
99
|
+
path: "/beneficiarios/#{id}/transferencias",
|
100
|
+
data_only: opts.fetch(:data_only, true),
|
101
|
+
client_opts: client_opts)
|
102
|
+
end
|
33
103
|
end
|
@@ -35,18 +35,34 @@ module BancoBrasilPayments::TransfersPix
|
|
35
35
|
# GET /lotes-transferencias-pix/{id}/solicitacao
|
36
36
|
# # Consultar Solicitação de Transferências PIX
|
37
37
|
def find_batch_transfer_pix(id, opts = {})
|
38
|
-
validations(api_client: api_client,
|
38
|
+
validations(api_client: api_client, required_params: { id: id })
|
39
39
|
|
40
40
|
client_opts = build_client_opts(api_client: api_client,
|
41
41
|
gw_app_key: gw_app_key,
|
42
|
-
opts: opts
|
43
|
-
body: @api_client.object_to_http_body(body))
|
42
|
+
opts: opts)
|
44
43
|
client_opts[:query_params][:'index'] = opts[:'index'] if !opts[:'index'].nil?
|
45
44
|
|
46
45
|
call_api_client(api_client: api_client,
|
47
|
-
http_method: :
|
46
|
+
http_method: :GET,
|
48
47
|
path: "/lotes-transferencias-pix/#{id}/solicitacao",
|
49
48
|
data_only: opts.fetch(:data_only, true),
|
50
49
|
client_opts: client_opts)
|
51
50
|
end
|
51
|
+
|
52
|
+
# GET /pix/{id}
|
53
|
+
# # Detalha todos os dados de um pagamento efetuado na modalidade PIX.
|
54
|
+
def find_payment_pix(id, opts = {})
|
55
|
+
validations(api_client: api_client, body: body, validate_body: true, required_params: { id: id })
|
56
|
+
|
57
|
+
client_opts = build_client_opts(api_client: api_client,
|
58
|
+
gw_app_key: gw_app_key,
|
59
|
+
opts: opts,
|
60
|
+
return_type: 'FindPaymentPixResponse')
|
61
|
+
|
62
|
+
call_api_client(api_client: api_client,
|
63
|
+
http_method: :GET,
|
64
|
+
path: "/pix/#{id}",
|
65
|
+
data_only: opts.fetch(:data_only, true),
|
66
|
+
client_opts: client_opts)
|
67
|
+
end
|
52
68
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module BancoBrasilPayments
|
2
|
+
# Objeto de Requisição quando consulta transferencia.
|
3
|
+
class Devolution < BaseModel
|
4
|
+
# Quando o pagamento estiver na situação:
|
5
|
+
# Inconsistente ou Rejeitado - Detalha os motivos da rejeição do lançamento.
|
6
|
+
# Devolvido - Detalha os motivos da devolução informada pelo Beneficiario do pagamento devolvido.
|
7
|
+
attr_accessor :reason_code # codigoMotivo | integer($int64)
|
8
|
+
|
9
|
+
# Data em que deverá ser efetuado o pagamento ao favorecido.
|
10
|
+
attr_accessor :devolution_date # dataDevolucao | string
|
11
|
+
|
12
|
+
# Valor do Pagamento que deverá ser efetuada a crédito do favorecido.
|
13
|
+
attr_accessor :devolution_value # valorDevolucao | number($double) | example: 4000.75
|
14
|
+
|
15
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
16
|
+
def self.attribute_map
|
17
|
+
{
|
18
|
+
reason_code: :codigoMotivo,
|
19
|
+
devolution_date: :dataDevolucao,
|
20
|
+
devolution_value: :valorDevolucao,
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# Attribute type mapping.
|
25
|
+
def self.openapi_types
|
26
|
+
{
|
27
|
+
reason_code: :Integer,
|
28
|
+
devolution_date: :NumberDate,
|
29
|
+
devolution_value: :Float
|
30
|
+
}
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module BancoBrasilPayments
|
2
|
+
# Objeto de Requisição quando da solicitação para efetuar pagamentos em lote via Transferência PIX.
|
3
|
+
class FindPaymentPixResponse < BaseModel
|
4
|
+
# Descrição da situação do pagamento:
|
5
|
+
# DOMÍNIOS:
|
6
|
+
# Agendado - Pagamento aguardando a data para efetivação do crédito;
|
7
|
+
# Cancelado - Pagamento cancelado pelo Cliente Conveniado antes da data do crédito;
|
8
|
+
# Consistente - Dados recebidos pelo Banco sem ocorrências quanto ao formato. Aguardando validação dos dados para liberação/efetivação dos pagamentos;
|
9
|
+
# Devolvido - Pagamento efetuado e posteriormente recusado pelo recebedor. O valor é devolvida para a Conta corrente onde ocorreu o débito da requisição;
|
10
|
+
# Inconsistente - Dados recebidos pelo Banco com ocorrências quanto ao formato. A situação será alterada para rejeitado;
|
11
|
+
# Pago - Pagamento efetuado;
|
12
|
+
# Pendente - Falta autorização para o débito do pagamento na conta do cliente conveniado;
|
13
|
+
# Rejeitado - Dados do pagamento não passaram na validações físicas e/ou lógicas. Ex: agência e conta não existem, conta não pertence ao CPF informado;
|
14
|
+
# Vencido - Pagamento não efetuado na data indicada por falta de saldo ou falta de autorização para débito do pagamento na conta do cliente conveniado."
|
15
|
+
attr_accessor :payment_state # estadoPagamento || string
|
16
|
+
|
17
|
+
attr_accessor :id # id || integer($int64)
|
18
|
+
|
19
|
+
# Data em que o cliente enviou ao Banco a requisição de pagamento em lote.
|
20
|
+
attr_accessor :payment_date # dataPagamento | string
|
21
|
+
|
22
|
+
# Valor total dos Pagamentos.
|
23
|
+
attr_accessor :payment_value # valorPagamento | number($double)
|
24
|
+
|
25
|
+
# Lista de pagamentos a serem processados em lote. Não permitido mais de 500 registros.
|
26
|
+
attr_accessor :payment_description # descricaoPagamento | string
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
id: :id,
|
32
|
+
payment_date: :dataPagamento,
|
33
|
+
payment_value: :valorPagamento,
|
34
|
+
payment_description: :descricaoPagamento,
|
35
|
+
payment_state: :estadoPagamento
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.openapi_types
|
41
|
+
{
|
42
|
+
id: :Integer,
|
43
|
+
payment_date: :NumberDate,
|
44
|
+
payment_value: :Float,
|
45
|
+
payment_description: :String,
|
46
|
+
payment_state: :String
|
47
|
+
}
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Objeto de Requisição quando da solicitação para efetuar pagamentos em lote via Transferência PIX.
|
2
|
+
module BancoBrasilPayments
|
3
|
+
class FindPaymentResponse < BaseModel
|
4
|
+
attr_accessor :id, :debit_branch_office, :debit_current_account, :check_digits_debit_current_account # id || integer($int64)
|
5
|
+
|
6
|
+
# Descrição da situação do pagamento:
|
7
|
+
# DOMÍNIOS:
|
8
|
+
# Agendado - Pagamento aguardando a data para efetivação do crédito;
|
9
|
+
# Cancelado - Pagamento cancelado pelo Cliente Conveniado antes da data do crédito;
|
10
|
+
# Consistente - Dados recebidos pelo Banco sem ocorrências quanto ao formato. Aguardando validação dos dados para liberação/efetivação dos pagamentos;
|
11
|
+
# Devolvido - Pagamento efetuado e posteriormente recusado pelo recebedor. O valor é devolvida para a Conta corrente onde ocorreu o débito da requisição;
|
12
|
+
# Inconsistente - Dados recebidos pelo Banco com ocorrências quanto ao formato. A situação será alterada para rejeitado;
|
13
|
+
# Pago - Pagamento efetuado;
|
14
|
+
# Pendente - Falta autorização para o débito do pagamento na conta do cliente conveniado;
|
15
|
+
# Rejeitado - Dados do pagamento não passaram na validações físicas e/ou lógicas. Ex: agência e conta não existem, conta não pertence ao CPF informado;
|
16
|
+
# Vencido - Pagamento não efetuado na data indicada por falta de saldo ou falta de autorização para débito do pagamento na conta do cliente conveniado."
|
17
|
+
attr_accessor :payment_state # estadoPagamento || string
|
18
|
+
|
19
|
+
# Tipo de pagamento consultado.
|
20
|
+
# DOMÍNIOS:
|
21
|
+
# 1 - CRÉDITO EM CONTA 3 - DOC ou TED 5 - CRÉDITO EM POUPANCA 13 - GUIA COM CÓDIGO DE BARRA 21 - GUIA SEM CÓDIGO DE BARRA 30 - BOLETO BANCO DO BRASIL 31 - BOLETO OUTROS BANCOS 45 - PIX 71 - DEPÓSITO JUDICIAL
|
22
|
+
attr_accessor :credit_type # tipoCredito | integer($int32) # agenciaDebito | integer($int32) # contaCorrenteDebito | integer($int32) # digitoVerificadorContaCorrente | string
|
23
|
+
|
24
|
+
# Numero do documento de debito exibido no extrato do pagador.
|
25
|
+
attr_accessor :debit_document # documentoDebito | integer
|
26
|
+
|
27
|
+
# Código de autenticação do pagamento.
|
28
|
+
attr_accessor :payment_auth_code # codigoAutenticacaoPagamento | string
|
29
|
+
|
30
|
+
# Número do depósito judicial informado como favorecido do crédito. Disponível para efetivação de Depósito Judicial no BB.
|
31
|
+
attr_accessor :deposit_in_court_identifier # numeroDepositoJudicial | string
|
32
|
+
|
33
|
+
# Código adotado pela FEBRABAN informado para identificação da finalidade do DOC.
|
34
|
+
attr_accessor :credit_order_purpose_code # codigoFinalidadeDOC | string
|
35
|
+
|
36
|
+
# Codigo adotado pelo Banco Central informado para identificar a finalidade da TED.
|
37
|
+
attr_accessor :wire_transfer_purpose_code # codigoFinalidadeTED | string
|
38
|
+
|
39
|
+
# Data em que o cliente enviou ao Banco a requisição de pagamento em lote.
|
40
|
+
attr_accessor :payment_date # dataPagamento | string
|
41
|
+
|
42
|
+
# Valor total dos Pagamentos.
|
43
|
+
attr_accessor :payment_value # valorPagamento | number($double)
|
44
|
+
|
45
|
+
# TODO
|
46
|
+
# atributo listaPagamentos (Tipo ligeiramente diferente do TransferBase e TrasferPixBase)
|
47
|
+
|
48
|
+
# Lista de pagamentos a serem processados em lote. Não permitido mais de 500 registros.
|
49
|
+
attr_accessor :devolution_list # listaDevolucao | array
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
id: :id,
|
55
|
+
payment_state: :estadoPagamento,
|
56
|
+
credit_type: :tipoCredito,
|
57
|
+
payment_date: :dataPagamento,
|
58
|
+
payment_value: :valorPagamento,
|
59
|
+
devolution_list: :listaDevolucao,
|
60
|
+
debit_branch_office: :agenciaDebito,
|
61
|
+
debit_current_account: :contaCorrenteDebito,
|
62
|
+
check_digits_debit_current_account: :digitoVerificadorContaCorrente,
|
63
|
+
debit_document: :documentoDebito,
|
64
|
+
payment_auth_code: :codigoAutenticacaoPagamento,
|
65
|
+
deposit_in_court_identifier: :numeroDepositoJudicial,
|
66
|
+
credit_order_purpose_code: :codigoFinalidadeDOC,
|
67
|
+
wire_transfer_purpose_code: :codigoFinalidadeTED
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
# Attribute type mapping.
|
72
|
+
def self.openapi_types
|
73
|
+
{
|
74
|
+
id: :Integer,
|
75
|
+
payment_state: :String,
|
76
|
+
credit_type: :Integer,
|
77
|
+
payment_date: :NumberDate,
|
78
|
+
payment_value: :Float,
|
79
|
+
devolution_list: 'Array<Devolution>'
|
80
|
+
}
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module BancoBrasilPayments
|
2
|
+
# Objeto de Requisição quando da solicitação para consultar lançamentos por período.
|
3
|
+
class FindReleasesResponse < BaseModel
|
4
|
+
# Posição do índice. Cada resposta tem um limite de 500 ocorrências na lista release_list,
|
5
|
+
# iniciada a partir do valor do índice fornecido. Para todas as ocorrências, itere sobre esse recurso.
|
6
|
+
attr_accessor :next_index # numeroDaposicaoDePesquisa || integer($int32)
|
7
|
+
|
8
|
+
attr_accessor :total_number # quantidadeOcorrenciasTotal || integer($int32)
|
9
|
+
|
10
|
+
attr_accessor :total_number_tabled # quantidadeOcorrenciasTabeladas || integer($int32)
|
11
|
+
|
12
|
+
# Lista de movimentos. Não permitido mais de 500 registros.
|
13
|
+
attr_accessor :release_list # Movimentos | array
|
14
|
+
|
15
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
16
|
+
def self.attribute_map
|
17
|
+
{
|
18
|
+
next_index: :numeroDaposicaoDePesquisa,
|
19
|
+
total_number: :quantidadeOcorrenciasTotal,
|
20
|
+
total_number_tabled: :quantidadeOcorrenciasTabeladas,
|
21
|
+
release_list: :listaMovimento
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.openapi_types
|
27
|
+
{
|
28
|
+
next_index: :Integer,
|
29
|
+
total_number: :Integer,
|
30
|
+
total_number_tabled: :Integer,
|
31
|
+
release_list: 'Array<Release>'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
module BancoBrasilPayments
|
2
|
+
# Objeto de Requisição quando da solicitação para efetuar pagamentos em lote via Transferência PIX.
|
3
|
+
class Release < BaseModel
|
4
|
+
# Número da requisição de transferências de valores.
|
5
|
+
attr_accessor :payment_request_number # numeroRequisicaoPagamento | integer($int32)
|
6
|
+
|
7
|
+
# Descrição da situação do pagamento.
|
8
|
+
# Enum: [ Consistente, Inconsistente, Pendente, Agendado, Pago, Rejeitado, Devolvido, Cancelado, Debitado, Bloqueado, Aguardando Saldo ]
|
9
|
+
attr_accessor :payment_state # textoEstadoPagamento | string
|
10
|
+
|
11
|
+
# Número identificador do pagamento. Equivale ao número do protocolo do evento.
|
12
|
+
attr_accessor :payment_id # codigoIdentificadorDoPagamento | integer($int64)
|
13
|
+
|
14
|
+
# Nome do favorecido.
|
15
|
+
attr_accessor :beneficiary_name # nomeDoFavorecido | string
|
16
|
+
|
17
|
+
# Tipo de pessoa do Beneficiário (1 - Física, 2 - Jurídica).
|
18
|
+
attr_accessor :beneficiary_kind # tipoBeneficiario | integer($int32)
|
19
|
+
|
20
|
+
# Número do CPF ou CNPJ do favorecido do pagamento.
|
21
|
+
attr_accessor :tax_number # numeroCPFouCNPJ | integer($int64)
|
22
|
+
|
23
|
+
# Data do pagamento.
|
24
|
+
attr_accessor :payment_date # dataPagamento | integer($int32) | example: 17042020
|
25
|
+
|
26
|
+
# Valor do Pagamento que deverá ser efetuada a crédito do favorecido.
|
27
|
+
attr_accessor :payment_value # valorPagamento | number($double) | example: 4000.75
|
28
|
+
|
29
|
+
# Numero do documento de débito informado pelo pagador para apresentação no extrato do favorecido.
|
30
|
+
attr_accessor :debit_document_number # numeroDocumentoDebito | integer($int64)
|
31
|
+
|
32
|
+
# Numero do documento de crédito informado pelo pagador para apresentação no extrato do favorecido.
|
33
|
+
attr_accessor :credit_document_number # numeroDocumentoCredito | integer($int64)
|
34
|
+
|
35
|
+
# Código da forma de crédito.
|
36
|
+
# Enum [ 1, 3, 5, 13, 21, 30, 47, 71 ]
|
37
|
+
attr_accessor :credit_form_code # codigoFormaCredito | integer($int32)
|
38
|
+
|
39
|
+
# Código de autenticação do pagamento.
|
40
|
+
attr_accessor :payment_auth_code # codigoAutenticacaoPagamento | string
|
41
|
+
|
42
|
+
# Data do débito.
|
43
|
+
attr_accessor :debit_date # dataDebito | integer($int32)
|
44
|
+
|
45
|
+
# Código atribuído pelo sistema PRD ao produto a ser comercializado pelo BB (ativo/passivo/prestação de serviços).
|
46
|
+
# Podendo ser: 126=Pagamento a Fornecedores; 127=Pagamento de Salários; 128=Pagamentos Diversos.
|
47
|
+
attr_accessor :payment_type # codigoTipoPagamento | integer($int32)
|
48
|
+
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
50
|
+
def self.attribute_map
|
51
|
+
{
|
52
|
+
payment_request_number: :numeroRequisicaoPagamento,
|
53
|
+
payment_state: :textoEstadoPagamento,
|
54
|
+
payment_id: :codigoIdentificadorDoPagamento,
|
55
|
+
beneficiary_name: :nomeBeneficiario,
|
56
|
+
beneficiary_kind: :tipoBeneficiario,
|
57
|
+
tax_number: :numeroCPFouCNPJ,
|
58
|
+
payment_date: :dataPagamento,
|
59
|
+
payment_value: :valorPagamento,
|
60
|
+
debit_document_number: :numeroDocumentoDebito,
|
61
|
+
credit_document_number: :numeroDocumentoCredito,
|
62
|
+
credit_form_code: :codigoFormaCredito,
|
63
|
+
payment_auth_code: :codigoAutenticacaoPagamento,
|
64
|
+
debit_date: :dataDebito,
|
65
|
+
payment_type: :codigoTipoPagamento
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute type mapping.
|
70
|
+
def self.openapi_types
|
71
|
+
{
|
72
|
+
payment_request_number: :Integer,
|
73
|
+
payment_state: :String,
|
74
|
+
payment_id: :Integer,
|
75
|
+
beneficiary_name: :String,
|
76
|
+
beneficiary_kind: :Integer,
|
77
|
+
tax_number: :Integer,
|
78
|
+
payment_date: :NumberDate,
|
79
|
+
payment_value: :Float,
|
80
|
+
debit_document_number: :Integer,
|
81
|
+
credit_document_number: :Integer,
|
82
|
+
credit_form_code: :Integer,
|
83
|
+
payment_auth_code: :String,
|
84
|
+
debit_date: :NumberDate,
|
85
|
+
payment_type: :Integer
|
86
|
+
}
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
data/lib/bb_payments/version.rb
CHANGED
data/lib/bb_payments.rb
CHANGED
@@ -25,9 +25,14 @@ require 'bb_payments/models/transfer_pix'
|
|
25
25
|
require 'bb_payments/models/batch_pix_response'
|
26
26
|
require 'bb_payments/models/batch_transfers_body'
|
27
27
|
require 'bb_payments/models/batch_transfers_response'
|
28
|
+
require 'bb_payments/models/devolution.rb'
|
28
29
|
require 'bb_payments/models/transfer_base'
|
29
30
|
require 'bb_payments/models/find_batch_payment.rb'
|
30
31
|
require 'bb_payments/models/find_batch_response.rb'
|
32
|
+
require 'bb_payments/models/find_payment_response.rb'
|
33
|
+
require 'bb_payments/models/find_payment_pix_response.rb'
|
34
|
+
require 'bb_payments/models/find_releases_response.rb'
|
35
|
+
require 'bb_payments/models/release.rb'
|
31
36
|
require 'bb_payments/models/error'
|
32
37
|
require 'bb_payments/models/error_errors'
|
33
38
|
require 'bb_payments/models/error_o_auth_unauthorized'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bb_payments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roque
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-06
|
12
|
+
date: 2023-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: typhoeus
|
@@ -95,9 +95,10 @@ extra_rdoc_files: []
|
|
95
95
|
files:
|
96
96
|
- Gemfile
|
97
97
|
- Gemfile.lock
|
98
|
+
- MIT-LICENSE.txt
|
98
99
|
- README.md
|
99
100
|
- Rakefile
|
100
|
-
- bb_payments-0.1.
|
101
|
+
- bb_payments-0.1.4.gem
|
101
102
|
- bb_payments.gemspec
|
102
103
|
- docs/BankSlipsApi.md
|
103
104
|
- docs/BarcodeCollectionFormsIDResponseObject.md
|
@@ -160,12 +161,16 @@ files:
|
|
160
161
|
- lib/bb_payments/models/batchtransfers_payments_list.rb
|
161
162
|
- lib/bb_payments/models/batchtransferscancel_payment_ids.rb
|
162
163
|
- lib/bb_payments/models/body.rb
|
164
|
+
- lib/bb_payments/models/devolution.rb
|
163
165
|
- lib/bb_payments/models/error.rb
|
164
166
|
- lib/bb_payments/models/error_errors.rb
|
165
167
|
- lib/bb_payments/models/error_o_auth_unauthorized.rb
|
166
168
|
- lib/bb_payments/models/error_o_auth_unauthorized_attributes.rb
|
167
169
|
- lib/bb_payments/models/find_batch_payment.rb
|
168
170
|
- lib/bb_payments/models/find_batch_response.rb
|
171
|
+
- lib/bb_payments/models/find_payment_pix_response.rb
|
172
|
+
- lib/bb_payments/models/find_payment_response.rb
|
173
|
+
- lib/bb_payments/models/find_releases_response.rb
|
169
174
|
- lib/bb_payments/models/inline_response_200.rb
|
170
175
|
- lib/bb_payments/models/inline_response_200_1.rb
|
171
176
|
- lib/bb_payments/models/inline_response_200_1_ocurrences_list.rb
|
@@ -181,6 +186,7 @@ files:
|
|
181
186
|
- lib/bb_payments/models/inline_response_201_payments_list.rb
|
182
187
|
- lib/bb_payments/models/inline_response_400.rb
|
183
188
|
- lib/bb_payments/models/inline_response_401.rb
|
189
|
+
- lib/bb_payments/models/release.rb
|
184
190
|
- lib/bb_payments/models/root_type_for_bank_slip_list.rb
|
185
191
|
- lib/bb_payments/models/root_type_for_bank_slips_batch_payment.rb
|
186
192
|
- lib/bb_payments/models/root_type_for_bank_slips_batch_payment_response_object.rb
|
@@ -234,7 +240,7 @@ files:
|
|
234
240
|
- spec/spec_helper.rb
|
235
241
|
homepage: https://github.com/ruby-banco-brasil/bb-payments
|
236
242
|
licenses:
|
237
|
-
-
|
243
|
+
- MIT
|
238
244
|
metadata:
|
239
245
|
source_code_uri: https://github.com/ruby-banco-brasil/bb-payments
|
240
246
|
post_install_message:
|
@@ -252,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
258
|
- !ruby/object:Gem::Version
|
253
259
|
version: '0'
|
254
260
|
requirements: []
|
255
|
-
rubygems_version: 3.
|
261
|
+
rubygems_version: 3.1.6
|
256
262
|
signing_key:
|
257
263
|
specification_version: 4
|
258
264
|
summary: A ruby wrapper for Banco do Brasil VPN Payments
|
@@ -261,35 +267,35 @@ test_files:
|
|
261
267
|
- spec/api_client_spec.rb
|
262
268
|
- spec/base_object_spec.rb
|
263
269
|
- spec/configuration_spec.rb
|
264
|
-
- spec/models/
|
265
|
-
- spec/models/
|
266
|
-
- spec/models/
|
267
|
-
- spec/models/
|
268
|
-
- spec/models/inline_response_400_spec.rb
|
270
|
+
- spec/models/root_type_for_slips_details_object_spec.rb
|
271
|
+
- spec/models/error_o_auth_unauthorized_attributes_spec.rb
|
272
|
+
- spec/models/root_type_for_returned_payments_response_object_spec.rb
|
273
|
+
- spec/models/inline_response_200_payments_list_spec.rb
|
269
274
|
- spec/models/root_type_for_batch_transfers_cancel_request_object_spec.rb
|
270
|
-
- spec/models/
|
271
|
-
- spec/models/
|
275
|
+
- spec/models/body_spec.rb
|
276
|
+
- spec/models/error_o_auth_unauthorized_spec.rb
|
277
|
+
- spec/models/inline_response_200_spec.rb
|
278
|
+
- spec/models/inline_response_200_1_ocurrences_list_spec.rb
|
272
279
|
- spec/models/root_type_for_batch_transfers_cancel_response_object_spec.rb
|
273
|
-
- spec/models/inline_response_200_payments_list_spec.rb
|
274
280
|
- spec/models/root_type_for_bank_slip_list_spec.rb
|
275
281
|
- spec/models/root_type_for_bank_slips_batch_payment_spec.rb
|
276
|
-
- spec/models/error_o_auth_unauthorized_attributes_spec.rb
|
277
|
-
- spec/models/root_type_for_batch_transfer_get_response_object_spec.rb
|
278
|
-
- spec/models/body_spec.rb
|
279
|
-
- spec/models/inline_response_200_spec.rb
|
280
|
-
- spec/models/inline_response_201_1_spec.rb
|
281
282
|
- spec/models/inline_response_200_2_spec.rb
|
282
|
-
- spec/models/
|
283
|
+
- spec/models/error_errors_spec.rb
|
283
284
|
- spec/models/inline_response_200_3_lista_boleto_spec.rb
|
284
|
-
- spec/models/
|
285
|
-
- spec/models/
|
285
|
+
- spec/models/inline_response_201_spec.rb
|
286
|
+
- spec/models/inline_response_200_3_lista_devolucao_spec.rb
|
287
|
+
- spec/models/error_spec.rb
|
288
|
+
- spec/models/inline_response_201_1_spec.rb
|
286
289
|
- spec/models/inline_response_200_3_spec.rb
|
290
|
+
- spec/models/inline_response_200_1_spec.rb
|
287
291
|
- spec/models/inline_response_200_2_payments_list_spec.rb
|
288
|
-
- spec/models/error_o_auth_unauthorized_spec.rb
|
289
|
-
- spec/models/root_type_for_slips_details_object_spec.rb
|
290
|
-
- spec/models/error_spec.rb
|
291
292
|
- spec/models/root_type_for_returned_payments_details_spec.rb
|
292
|
-
- spec/models/
|
293
|
-
- spec/models/
|
294
|
-
- spec/models/
|
293
|
+
- spec/models/root_type_for_batch_transfers_cancel_payments_list_object_spec.rb
|
294
|
+
- spec/models/root_type_for_bank_slips_batch_payment_response_object_spec.rb
|
295
|
+
- spec/models/inline_response_400_spec.rb
|
296
|
+
- spec/models/inline_response_201_1_payments_list_spec.rb
|
297
|
+
- spec/models/root_type_for_batch_transfer_get_response_object_spec.rb
|
298
|
+
- spec/models/inline_response_401_spec.rb
|
299
|
+
- spec/models/inline_response_201_payments_list_spec.rb
|
300
|
+
- spec/models/root_type_for_batch_transfer_payments_list_get_spec.rb
|
295
301
|
- spec/spec_helper.rb
|
data/bb_payments-0.1.0.gem
DELETED
Binary file
|