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: 7efd0c005698628f0d0471a083c711277abd72af98f17aaf9e83ffcea7691890
4
- data.tar.gz: 25aed12e345d68a9815f58a3eed202166c919892e3e6a6e32900bf929e628461
3
+ metadata.gz: d4675caa5e07e5a975c083141dd25cc8ad8970efdd74a1fdf2f8c91e8bc6d7bc
4
+ data.tar.gz: b1fbd0872216c0251df21f9f2d356540c2bc2ecb1b932a4060c755b983154eb2
5
5
  SHA512:
6
- metadata.gz: da4d6eec527a7fe1e41910611d2ce3c2ae4334e7cbcbc6aa9777bf9d33d9bebae2de5de8048c8a5b904caf13a6fe0894b223cc62d3b592469bc0f3a2a7dcb51c
7
- data.tar.gz: 0f30f0daf84d487e3a5fc9001a6b94a230f83ca7352d2e0f73c9ab6c97b0fb28760903571ead67049543c0d68594143770325b766d9ae2952074aa9d1022b131
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 = BlingApi::Client.new(
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://www.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">
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://www.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>
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>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusBling
4
- VERSION = "4.0.0"
4
+ VERSION = "4.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_bling
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todas Essas Coisas