bling_api 2.1.3 → 2.1.4
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/bling_api/client.rb +13 -13
- data/lib/bling_api/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: 25741ecf7cea9c207e525f9f35174651205989829141c97e352e4ad412a3c10e
|
|
4
|
+
data.tar.gz: 7b6aef0b376c2fdcc363825dab219ad9c3348523c56147444cb92b9620e62378
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64fb8b38143510b510b3b39a9e31b57e39af9c34de5a27b6069535d0c3a0b23ed9f44c398bc116dcc576ba2bca32d5c5190c1355908e88b2c834b6354e13ab0e
|
|
7
|
+
data.tar.gz: 3d06ebf9831edcb47a64dc3be60c4956eaf3e9ea18fbb575d63699093e22727d7d2ab93cb014d4d79f8029bf893c12ccb2c8f6ec38b30cee7854cc1ae06cfbbc
|
data/lib/bling_api/client.rb
CHANGED
|
@@ -127,31 +127,31 @@ module BlingApi
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
put("/contatos/#{id}", body: body, timeout:
|
|
130
|
+
put("/contatos/#{id}", body: body, timeout: 30)
|
|
131
131
|
end
|
|
132
132
|
|
|
133
133
|
def get_order(id)
|
|
134
|
-
get("/pedidos/vendas/#{id}", timeout:
|
|
134
|
+
get("/pedidos/vendas/#{id}", timeout: 30) { _1.data }
|
|
135
135
|
end
|
|
136
136
|
|
|
137
137
|
def get_contact(id)
|
|
138
|
-
get("/contatos/#{id}", timeout:
|
|
138
|
+
get("/contatos/#{id}", timeout: 30) { _1.data }
|
|
139
139
|
end
|
|
140
140
|
|
|
141
141
|
def get_seller(id)
|
|
142
|
-
get("/vendedores/#{id}", timeout:
|
|
142
|
+
get("/vendedores/#{id}", timeout: 30) { _1.data }
|
|
143
143
|
end
|
|
144
144
|
|
|
145
145
|
def get_sellers(page, limit, situation)
|
|
146
|
-
get("/vendedores?pagina=#{page}&limite=#{limit}&situacaoContato=#{situation}", timeout:
|
|
146
|
+
get("/vendedores?pagina=#{page}&limite=#{limit}&situacaoContato=#{situation}", timeout: 30) { _1.data }
|
|
147
147
|
end
|
|
148
148
|
|
|
149
149
|
def find_contact_by_document_number(document_number)
|
|
150
|
-
get("/contatos?numeroDocumento=#{document_number.gsub(/\D/, "")}", timeout:
|
|
150
|
+
get("/contatos?numeroDocumento=#{document_number.gsub(/\D/, "")}", timeout: 30) { _1.data }
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
def find_product_by_sku(sku)
|
|
154
|
-
get("/produtos?codigo=#{sku}", timeout:
|
|
154
|
+
get("/produtos?codigo=#{sku}", timeout: 30) { _1.data }
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
def get_payments_to_receivable(
|
|
@@ -185,7 +185,7 @@ module BlingApi
|
|
|
185
185
|
}
|
|
186
186
|
)
|
|
187
187
|
|
|
188
|
-
get("/contas/receber?#{query}", timeout:
|
|
188
|
+
get("/contas/receber?#{query}", timeout: 30) { _1.data }
|
|
189
189
|
end
|
|
190
190
|
|
|
191
191
|
def create_contact(
|
|
@@ -273,7 +273,7 @@ module BlingApi
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
post("/contatos", body: body, timeout:
|
|
276
|
+
post("/contatos", body: body, timeout: 30) { _1.data }
|
|
277
277
|
end
|
|
278
278
|
|
|
279
279
|
# @param itens [Array<BlingApi::Item>] Array de objetos Item contendo codigo, id_produto, quantidade, valor, unidade, desconto, aliquota_ipi, descricao, descricao_detalhada, comissao_base, comissao_aliquota, comissao_valor
|
|
@@ -328,15 +328,15 @@ module BlingApi
|
|
|
328
328
|
observacoesInternas: observacoes_internas,
|
|
329
329
|
numeroPedidoCompra: numero_pedido_compra
|
|
330
330
|
}
|
|
331
|
-
post("/pedidos/vendas", body: body, timeout:
|
|
331
|
+
post("/pedidos/vendas", body: body, timeout: 30) { _1.data }
|
|
332
332
|
end
|
|
333
333
|
|
|
334
334
|
def create_nfe_from_order(order_id)
|
|
335
|
-
post("/pedidos/vendas/#{order_id}/gerar-nfe") { _1.data }
|
|
335
|
+
post("/pedidos/vendas/#{order_id}/gerar-nfe", timeout: 30) { _1.data }
|
|
336
336
|
end
|
|
337
337
|
|
|
338
338
|
def get_nfe(id)
|
|
339
|
-
get("/nfe/#{id}") { _1.data }
|
|
339
|
+
get("/nfe/#{id}", timeout: 30) { _1.data }
|
|
340
340
|
end
|
|
341
341
|
|
|
342
342
|
# @param itens [Array<BlingApi::Item>] Array de objetos Item contendo codigo, id_produto, quantidade, valor, unidade, desconto, aliquota_ipi, descricao, descricao_detalhada, comissao_base, comissao_aliquota, comissao_valor
|
|
@@ -418,7 +418,7 @@ module BlingApi
|
|
|
418
418
|
nomeUsuario: intermediador_nome_usuario
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
post("/nfe", body: body)
|
|
421
|
+
post("/nfe", body: body, timeout: 30)
|
|
422
422
|
end
|
|
423
423
|
|
|
424
424
|
private
|
data/lib/bling_api/version.rb
CHANGED