bling_api 2.1.4 → 2.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25741ecf7cea9c207e525f9f35174651205989829141c97e352e4ad412a3c10e
4
- data.tar.gz: 7b6aef0b376c2fdcc363825dab219ad9c3348523c56147444cb92b9620e62378
3
+ metadata.gz: a7e762dd1956efeec3161dc2b678aacdbc9a6a11d546fcc9c48f468f17215cba
4
+ data.tar.gz: 69a4d33099ae1f0ea2143f6b40ef66be7bbbf3243e859774a3ff78c65ef14d92
5
5
  SHA512:
6
- metadata.gz: 64fb8b38143510b510b3b39a9e31b57e39af9c34de5a27b6069535d0c3a0b23ed9f44c398bc116dcc576ba2bca32d5c5190c1355908e88b2c834b6354e13ab0e
7
- data.tar.gz: 3d06ebf9831edcb47a64dc3be60c4956eaf3e9ea18fbb575d63699093e22727d7d2ab93cb014d4d79f8029bf893c12ccb2c8f6ec38b30cee7854cc1ae06cfbbc
6
+ metadata.gz: e097a731673c4b7fed358ade047fd46d9420158ed3a61829fdae4177ab0ffcc295dc11659a3f8f407238569659c347140b2da848cd8aaf2519f24ae1b11e5819
7
+ data.tar.gz: d0cff173f877a3eb97dcc679ca8cbbcfaf64b95d17aafabdfc6eb2fff89e801ba1b596431fb2f78d436e1c8b812687dc14d8a01706681e255fd5598a33d8cf49
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bling_api (2.1.2)
4
+ bling_api (2.3.0)
5
5
  ac
6
6
  base64
7
7
  uri
@@ -9,19 +9,48 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- ac (0.2.0)
12
+ ac (1.1.0)
13
+ activesupport
13
14
  typhoeus
15
+ activesupport (7.1.6)
16
+ base64
17
+ benchmark (>= 0.3)
18
+ bigdecimal
19
+ concurrent-ruby (~> 1.0, >= 1.0.2)
20
+ connection_pool (>= 2.2.5)
21
+ drb
22
+ i18n (>= 1.6, < 2)
23
+ logger (>= 1.4.2)
24
+ minitest (>= 5.1)
25
+ mutex_m
26
+ securerandom (>= 0.3)
27
+ tzinfo (~> 2.0)
14
28
  attr_extras (7.1.0)
15
29
  base64 (0.2.0)
30
+ benchmark (0.5.0)
31
+ bigdecimal (4.1.2)
16
32
  concurrent-ruby (1.2.2)
33
+ connection_pool (3.0.2)
17
34
  diff-lcs (1.5.0)
18
- ethon (0.16.0)
35
+ drb (2.2.3)
36
+ ethon (0.18.0)
19
37
  ffi (>= 1.15.0)
20
- ffi (1.16.3)
38
+ logger
39
+ ffi (1.17.4-arm64-darwin)
40
+ ffi (1.17.4-x86_64-linux-gnu)
41
+ i18n (1.14.8)
42
+ concurrent-ruby (~> 1.0)
43
+ logger (1.7.0)
44
+ minitest (6.0.6)
45
+ drb (~> 2.0)
46
+ prism (~> 1.5)
47
+ mutex_m (0.3.0)
21
48
  optimist (3.1.0)
22
49
  patience_diff (1.2.0)
23
50
  optimist (~> 3.0)
51
+ prism (1.9.0)
24
52
  rake (13.1.0)
53
+ securerandom (0.4.1)
25
54
  super_diff (0.10.0)
26
55
  attr_extras (>= 6.2.4)
27
56
  diff-lcs
@@ -29,8 +58,10 @@ GEM
29
58
  tldr (0.9.5)
30
59
  concurrent-ruby (~> 1.2)
31
60
  super_diff (~> 0.10)
32
- typhoeus (1.4.0)
33
- ethon (>= 0.9.0)
61
+ typhoeus (1.6.0)
62
+ ethon (>= 0.18.0)
63
+ tzinfo (2.0.6)
64
+ concurrent-ruby (~> 1.0)
34
65
  uri (1.1.1)
35
66
 
36
67
  PLATFORMS
@@ -11,6 +11,14 @@ module BlingApi
11
11
  @token_expires_at = token_expires_at
12
12
  end
13
13
 
14
+ def default_options
15
+ super.deep_merge({
16
+ headers: {
17
+ "enable-jwt" => "1"
18
+ }
19
+ })
20
+ end
21
+
14
22
  def refresh_token
15
23
  headers = {
16
24
  "Content-Type" => "application/x-www-form-urlencoded",
@@ -421,6 +429,49 @@ module BlingApi
421
429
  post("/nfe", body: body, timeout: 30)
422
430
  end
423
431
 
432
+ def create_payments_to_receivable(
433
+ vencimento:,
434
+ valor:,
435
+ contato_id:,
436
+ forma_pagamento_id:,
437
+ data_emissao:,
438
+ numero_documento:,
439
+ competencia:,
440
+ historico:,
441
+ portador_id:,
442
+ categoria_id:,
443
+ vendedor_id:,
444
+ tipo_ocorrencia:
445
+ )
446
+ body = {
447
+ vencimento: vencimento,
448
+ valor: valor,
449
+ contato: {
450
+ id: contato_id
451
+ },
452
+ formaPagamento: {
453
+ id: forma_pagamento_id
454
+ },
455
+ dataEmissao: data_emissao,
456
+ numeroDocumento: numero_documento,
457
+ competencia: competencia,
458
+ historico: historico,
459
+ portador: {
460
+ id: portador_id
461
+ },
462
+ categoria: {
463
+ id: categoria_id
464
+ },
465
+ vendedor: {
466
+ id: vendedor_id
467
+ },
468
+ ocorrencia: {
469
+ tipo: tipo_ocorrencia
470
+ }
471
+ }
472
+ post("/contas/receber", body: body, timeout: 30) { _1.data }
473
+ end
474
+
424
475
  private
425
476
 
426
477
  def build_query(params = {}, array_params = {})
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BlingApi
4
- VERSION = "2.1.4"
4
+ VERSION = "2.3.0"
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bling_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - caio
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-05-19 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: ac
@@ -51,6 +52,7 @@ dependencies:
51
52
  - - ">="
52
53
  - !ruby/object:Gem::Version
53
54
  version: '0'
55
+ description:
54
56
  email:
55
57
  - caioif4@gmail.com
56
58
  executables: []
@@ -80,6 +82,7 @@ licenses:
80
82
  metadata:
81
83
  homepage_uri: https://github.com/CaioGarcia1
82
84
  source_code_uri: https://github.com/CaioGarcia1
85
+ post_install_message:
83
86
  rdoc_options: []
84
87
  require_paths:
85
88
  - lib
@@ -94,7 +97,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
97
  - !ruby/object:Gem::Version
95
98
  version: '0'
96
99
  requirements: []
97
- rubygems_version: 3.6.7
100
+ rubygems_version: 3.5.3
101
+ signing_key:
98
102
  specification_version: 4
99
103
  summary: ''
100
104
  test_files: []