bling_api 0.1.9 → 0.1.10

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: d87c68853e2d722c08795ca6f7f3b6656bd4b5cfa0a7919b4a72c7c4120d378b
4
- data.tar.gz: 3c535eac756de72762583b440526ee44ce0094eea2aacd6cb37d4a0c3be75c50
3
+ metadata.gz: c5dad8664c1cea2e83b0d3807d8d14ad0188e90d053c63f2291a15af4847bae4
4
+ data.tar.gz: 2c27f55e297086b3735e6bccb6990955e34f8bdf09f3367e3194d11e10ce92b4
5
5
  SHA512:
6
- metadata.gz: 720c746b5f398c061f485b6884e5488acdcd63680656d19bc1d30e90f778788c07875c132e3e8929ea9b201768b24b7fa473e42a377732026e98252a9ce0b5e2
7
- data.tar.gz: 991608ed1b122c1a3f333da359426a8e652e268d3081a99cee5635b97287e6ee83a6fef83310e9927e9d27a3fa3ca111623f9ba826f5ff45ead3b553a5e048ff
6
+ metadata.gz: 2dc2ee22ce8fd0e42f48cb5ce50caad0c42f3ad72dd57ae6a83494fd45417ebb920a18e8b1a826b57c963ff4e5427443034e06b04fe46bf973c6de82a5b9d5f6
7
+ data.tar.gz: 18969ce77fb1377c02f2c3f57b81e28a38db9dea9866162de0dd9d6fc713f57c30ec0b9ef9177e308abff67cebbc2bf052d014d78563f0896fccd4c727642a3f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bling_api (0.1.9)
4
+ bling_api (0.1.10)
5
5
  ac
6
6
  base64
7
7
 
@@ -14,8 +14,8 @@ module BlingApi
14
14
  new(**build_hash(contact))
15
15
  end
16
16
 
17
- attr_reader :nome, :pessoa_juridica, :telefone, :numero_documento, :id, :email, :endereco, :endereco_cobranca
18
- def initialize(nome:, pessoa_juridica:, numero_documento:, id:nil, telefone:nil, email:nil, endereco:nil, endereco_cobranca:nil)
17
+ attr_reader :nome, :pessoa_juridica, :telefone, :numero_documento, :id, :email, :endereco, :endereco_cobranca, :cod_contribuinte
18
+ def initialize(nome:, pessoa_juridica:, numero_documento:, id:nil, telefone:nil, email:nil, endereco:nil, endereco_cobranca:nil, cod_contribuinte:nil)
19
19
  @id = id
20
20
  @nome = nome
21
21
  @pessoa_juridica = pessoa_juridica
@@ -24,6 +24,7 @@ module BlingApi
24
24
  @email = email
25
25
  @endereco = endereco&.with_indifferent_access
26
26
  @endereco_cobranca = endereco_cobranca&.with_indifferent_access
27
+ @cod_contribuinte = cod_contribuinte
27
28
  end
28
29
 
29
30
  def build_json
@@ -31,6 +32,7 @@ module BlingApi
31
32
  "nome": nome,
32
33
  "telefone": telefone,
33
34
  "tipo": pessoa_juridica ? "J" : "F",
35
+ "indicadorIe": cod_contribuinte,
34
36
  "numeroDocumento": numero_documento,
35
37
  "email": email,
36
38
  "endereco": {
@@ -84,6 +86,7 @@ module BlingApi
84
86
  telefone: json_response["telefone"],
85
87
  pessoa_juridica: json_response["tipo"] == "J",
86
88
  numero_documento: json_response["numeroDocumento"],
89
+ cod_contribuinte: json_response["indicadorIe"],
87
90
  email: json_response["email"],
88
91
  endereco: json_response["endereco"]["geral"],
89
92
  endereco_cobranca: json_response["endereco"]["cobranca"]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BlingApi
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bling_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - caio