solidus_bling 4.0.1 → 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: fddb81e79337c486bf3524386936870231ab339ce311421f049cbd67f684606e
4
- data.tar.gz: '06109090246a5ff4efa114e5c2b66b626af0c05a30dbb51df5537537dc897325'
3
+ metadata.gz: d4675caa5e07e5a975c083141dd25cc8ad8970efdd74a1fdf2f8c91e8bc6d7bc
4
+ data.tar.gz: b1fbd0872216c0251df21f9f2d356540c2bc2ecb1b932a4060c755b983154eb2
5
5
  SHA512:
6
- metadata.gz: e3f6716ac4d1e093996ebeedd106117baffc154a0dbec8bc0cfb0ad903b1fe10fad8b93abc5d1b2781891870cb7ba5d3a38bc9a9a9d91a507aaabef242810c30
7
- data.tar.gz: b06550c164e7f2c94d0de55793a523dea48b877031426f4ba19183681cddb28ce4b97afa99ff40be69b64f1e4c9a14c38bdd1b56c0bf4e269cee5eaaa5b32f38
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,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusBling
4
- VERSION = "4.0.1"
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.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todas Essas Coisas
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.6.7
111
+ rubygems_version: 3.6.9
112
112
  specification_version: 4
113
113
  summary: Solidus extension to integrate with the Bling
114
114
  test_files: []