solidus_bling 4.0.2 → 4.0.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/app/models/solidus_bling/order.rb +1 -0
- data/app/models/solidus_bling/product.rb +16 -0
- data/lib/solidus_bling/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc6ad69637a925a25e40b775c2d4eb2d910a017dadd726f2ec606e234761ed5e
|
4
|
+
data.tar.gz: a26846e477b408f26d3d72e3423f3010e28367a9cbf703d0d361a4c65161311e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 237013ba1c8611bcc29a0c827bf4b0ac55ca789df1b5f2730b75dc8eda8f7d7914ac3d9034b6803bab5d6b62e3e0365c000c67b091674853bceae755eb0c5f3e
|
7
|
+
data.tar.gz: 59f827ae285ba6593be0c39ffdc5b3797481a06addce03ba54b92a111053624f23d464b78fabbaa5eb3c539386fc258556d662256e9e9670851a6c86e6ec77a0
|
@@ -132,6 +132,7 @@ module SolidusBling
|
|
132
132
|
{
|
133
133
|
nome: @order.nf_name&.strip || @order.bill_address.name.strip,
|
134
134
|
telefone: @order.bill_address.phone.strip,
|
135
|
+
celular: @order.bill_address.phone.strip,
|
135
136
|
email: @order.email.strip,
|
136
137
|
endereco: @order.bill_address.address1.strip,
|
137
138
|
endereco_cep: @order.bill_address.zipcode.strip,
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module SolidusBling
|
2
|
+
class Product
|
3
|
+
def self.find_by_sku sku
|
4
|
+
account = SolidusBling::Account.first
|
5
|
+
client = SolidusBling::BlingClient.for_account(account)
|
6
|
+
|
7
|
+
product = client.find_product_by_sku(sku).data
|
8
|
+
raise "Produto com SKU: #{sku} não encontrado no Bling" if product.blank?
|
9
|
+
{
|
10
|
+
name: product[0].nome,
|
11
|
+
sku: product[0].codigo,
|
12
|
+
price: product[0].preco.to_f
|
13
|
+
}
|
14
|
+
end
|
15
|
+
end
|
16
|
+
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.
|
4
|
+
version: 4.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todas Essas Coisas
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- app/models/solidus_bling/event.rb
|
56
56
|
- app/models/solidus_bling/order.rb
|
57
57
|
- app/models/solidus_bling/payment_method.rb
|
58
|
+
- app/models/solidus_bling/product.rb
|
58
59
|
- app/models/solidus_bling/seller.rb
|
59
60
|
- app/models/solidus_bling/shipping_method.rb
|
60
61
|
- app/models/spree/permission_sets/seller_update.rb
|