solidus_bling 4.0.0 → 4.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4675caa5e07e5a975c083141dd25cc8ad8970efdd74a1fdf2f8c91e8bc6d7bc
|
4
|
+
data.tar.gz: b1fbd0872216c0251df21f9f2d356540c2bc2ecb1b932a4060c755b983154eb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41db61c64a14f739f1fa4c1bb695563e0ccfb5e2f5444f31cdc36e0561df239ba8c0b5a31f215092851c5f60309ab704ede409f52bb92f9f6f47fd95e35f90e9
|
7
|
+
data.tar.gz: 93231dab2bd6a2e77b71356952d101ddb3952b7caf97c40b58461ea9029ee674be99af11eeb9e56267a47b79a52a0df34f5c1e23ce596613044e566f8fc7aafb
|
@@ -6,13 +6,7 @@ module SolidusBling
|
|
6
6
|
after_save :falsify_all_others
|
7
7
|
|
8
8
|
def self.upsert_sellers account
|
9
|
-
client =
|
10
|
-
client_id: account.client_id,
|
11
|
-
client_secret: account.client_secret,
|
12
|
-
refresh_token: account.refresh_token,
|
13
|
-
access_token: account.access_token,
|
14
|
-
token_expires_at: account.token_expires_in
|
15
|
-
)
|
9
|
+
client = SolidusBling::BlingClient.for_account(account)
|
16
10
|
sellers = client.get_sellers(1, 100, "A").data
|
17
11
|
upsert_sellers = sellers.map { |seller| {name: seller.contato.nome, external_id: seller.id, account_id: account.id, active: true} }
|
18
12
|
SolidusBling::Seller.upsert_all(upsert_sellers, unique_by: :external_id)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<div class="field">
|
2
2
|
<div style="display: flex; align-items: center; margin-bottom: 6px">
|
3
3
|
<label style="margin-right: 5px; margin-bottom: 0" for="bling_url">URL de autorização</label>
|
4
|
-
<a target="_blank" href="https://
|
4
|
+
<a target="_blank" href="https://api.bling.com.br/Api/v3/oauth/authorize?response_type=code&client_id=<%= bling_account.client_id %>&state=<%= bling_account.state %>&scopes=98308+98309+98310+98313+98314+507943+5990556+6631498+106168710+182224097+199272829+200802821+220621674+318257556+318257565+318257568+318257570+318257583+333936575+363921589+363921590+363921591+363921592+363953167+363953556+791588404+875116881+1869535257+5862218180+13645012997+13645013013">
|
5
5
|
<svg style="width: 18px; height: 18px; color: black" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
6
6
|
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"></path></svg>
|
7
7
|
</a>
|
8
8
|
</div>
|
9
|
-
<input id="bling_url" class="fullwidth" value="https://
|
10
|
-
</div>
|
9
|
+
<input id="bling_url" class="fullwidth" value="https://api.bling.com.br/Api/v3/oauth/authorize?response_type=code&client_id=<%= bling_account.client_id %>&state=<%= bling_account.state %>&scopes=98308+98309+98310+98313+98314+507943+5990556+6631498+106168710+182224097+199272829+200802821+220621674+318257556+318257565+318257568+318257570+318257583+333936575+363921589+363921590+363921591+363921592+363953167+363953556+791588404+875116881+1869535257+5862218180+13645012997+13645013013">
|
10
|
+
</div>
|