bfocus 0.2.2 → 0.2.3

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: cde8597ee9adbdde78b052fc3527eb19ed6a5045f73829424d835f696dcd95c9
4
- data.tar.gz: 867ddf4b2644cbe30252ac5ca6d482e6a4a5216049a4469e6f5f2d5ed4f5757b
3
+ metadata.gz: 7f93ce899d6f0b828abbb48251c0b2899e21203806e65ca1596c69494eaf89db
4
+ data.tar.gz: 75d630e82fce06c4fdfb1ba296bd08793387de045e8eb9ca3a0ba82c96bacbc9
5
5
  SHA512:
6
- metadata.gz: 7a5abc2452240b5f164b164e72bb4e2d895cd70e4ff6479f64d7ba39fa34ecbf0af48e32d75c3c5fe97642f566edf0007e23ab3ec0c8ea921140bbc62614ecda
7
- data.tar.gz: 91a342991a7a3859e6664b94bd73282fe1d3892226de023372243325bb3a2f738c580575126e0fda360298b310b8b36eed00118165540331f24c9591450add7f
6
+ metadata.gz: 535a2dc1a6212586ad0e2132598f4f941fb1dfd038d9f177c0e653cbc45aed3b1032f275debfaafd1fc7ccf26f5ae8261e7fdbf802014c5662b57a8b7f21f9d9
7
+ data.tar.gz: d364b663c8a226ae81c7ec76215bb83314d48c9959097c886a6b87afca55792f45502033a6c813d803c3c10b39886c6041a2a726eb2eee4779d96d51830ab7b4
@@ -158,12 +158,21 @@ module Bfocus
158
158
  #
159
159
  # Só os campos informados mudam; `nil` limpa. `custom_fields` (lista de
160
160
  # `{key:, label:, type:, value:, options:}`), quando enviado, **substitui** a lista inteira.
161
+ #
162
+ # `kind` é o tipo do CONTRATANTE: `"pj"` (empresa) ou `"pf"` (pessoa física). Não enviando,
163
+ # o bFocus deduz do documento. `legal_name` (razão social), `state_registration` e
164
+ # `municipal_registration` são de PJ; `id_document` (RG), de PF.
161
165
  # @return [Hash] o cliente.
162
- def upsert(external_id, name: UNSET, document: UNSET, email: UNSET, phone: UNSET,
166
+ def upsert(external_id, name: UNSET, document: UNSET, kind: UNSET, legal_name: UNSET,
167
+ state_registration: UNSET, municipal_registration: UNSET, id_document: UNSET,
168
+ email: UNSET, phone: UNSET,
163
169
  website: UNSET, notes: UNSET, custom_fields: UNSET, idempotency_key: nil, timeout: nil)
164
170
  ext = segment(external_id, "external_id")
165
171
  body = compact(
166
- "name" => name, "document" => document, "email" => email, "phone" => phone,
172
+ "name" => name, "document" => document, "kind" => kind, "legal_name" => legal_name,
173
+ "state_registration" => state_registration,
174
+ "municipal_registration" => municipal_registration, "id_document" => id_document,
175
+ "email" => email, "phone" => phone,
167
176
  "website" => website, "notes" => notes, "custom_fields" => custom_fields
168
177
  )
169
178
  call("PUT", "/customers/#{ext}", body: body, idempotency_key: idempotency_key, timeout: timeout)
@@ -3,5 +3,5 @@
3
3
  module Bfocus
4
4
  # Versão da gem. O `scripts/release-sdks.sh` do monorepo bumpa esta linha por regex e o
5
5
  # `bfocus.gemspec` lê daqui — mantenha o formato exato `VERSION = "X.Y.Z"`.
6
- VERSION = "0.2.2"
6
+ VERSION = "0.2.3"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bfocus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Berni Software