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 +4 -4
- data/lib/bfocus/resources/customers.rb +11 -2
- data/lib/bfocus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f93ce899d6f0b828abbb48251c0b2899e21203806e65ca1596c69494eaf89db
|
|
4
|
+
data.tar.gz: 75d630e82fce06c4fdfb1ba296bd08793387de045e8eb9ca3a0ba82c96bacbc9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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,
|
|
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, "
|
|
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)
|
data/lib/bfocus/version.rb
CHANGED