solidus_bling 3.2.1 → 3.2.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12f41a4742c1ebfb511d245cf0a258bd1624df645bc7f8411bdffa14c96fbe97
|
4
|
+
data.tar.gz: 3e36ac9d1623bedfa6d99b08b2c2bbcab0851e9ed7fb1217c09215fb603b9f0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b90e04dfd60e38826c4ab00649467ca87e2fd9994dc173f8d46d01016b6ca71d54242244cdea2fe87ceaeffc9dd454684a0746f973d9317f6a6540974a576483
|
7
|
+
data.tar.gz: 434fb97f936ce6c118332e30ca68f01ff146645e9da8b4258e60477fe5e6bdd9d44620981b38ad1f4e1481cfa22f4d25fa0c3ad82d9b46394d8bcc0f62e28b7f
|
@@ -7,7 +7,7 @@ module SolidusBling
|
|
7
7
|
def send
|
8
8
|
@account = SolidusBling::Account.first
|
9
9
|
@account.check_token
|
10
|
-
BlingApi.
|
10
|
+
BlingApi.configure { |config| config.access_token = @account.access_token }
|
11
11
|
|
12
12
|
contato = costumer
|
13
13
|
items = products
|
@@ -105,14 +105,14 @@ module SolidusBling
|
|
105
105
|
nome: transportadora
|
106
106
|
},
|
107
107
|
etiqueta: {
|
108
|
-
nome: @order.ship_address.name,
|
109
|
-
endereco: @order.ship_address.address1,
|
110
|
-
numero: @order.ship_address.number,
|
111
|
-
complemento: @order.ship_address.address2,
|
112
|
-
municipio: @order.ship_address.city,
|
113
|
-
uf: @order.ship_address.state.abbr,
|
114
|
-
bairro: @order.ship_address.district,
|
115
|
-
cep: @order.ship_address.zipcode,
|
108
|
+
nome: @order.ship_address.name.strip,
|
109
|
+
endereco: @order.ship_address.address1.strip,
|
110
|
+
numero: @order.ship_address.number.strip,
|
111
|
+
complemento: @order.ship_address.address2.strip,
|
112
|
+
municipio: @order.ship_address.city.strip,
|
113
|
+
uf: @order.ship_address.state.abbr.strip,
|
114
|
+
bairro: @order.ship_address.district.strip,
|
115
|
+
cep: @order.ship_address.zipcode.strip,
|
116
116
|
nomePais: "Brasil"
|
117
117
|
},
|
118
118
|
volumes: [
|
@@ -126,26 +126,26 @@ module SolidusBling
|
|
126
126
|
|
127
127
|
def build_customer
|
128
128
|
{
|
129
|
-
nome: @order.bill_address.name,
|
130
|
-
telefone: @order.bill_address.phone,
|
131
|
-
email: @order.email,
|
129
|
+
nome: @order.bill_address.name.strip,
|
130
|
+
telefone: @order.bill_address.phone.strip,
|
131
|
+
email: @order.email.strip,
|
132
132
|
endereco: {
|
133
|
-
"endereco" => @order.bill_address.address1,
|
134
|
-
"cep" => @order.bill_address.zipcode,
|
135
|
-
"bairro" => @order.bill_address.district,
|
136
|
-
"municipio" => @order.bill_address.city,
|
137
|
-
"uf" => @order.bill_address.state.abbr,
|
138
|
-
"numero" => @order.bill_address.number,
|
139
|
-
"complemento" => @order.bill_address.address2
|
133
|
+
"endereco" => @order.bill_address.address1.strip,
|
134
|
+
"cep" => @order.bill_address.zipcode.strip,
|
135
|
+
"bairro" => @order.bill_address.district.strip,
|
136
|
+
"municipio" => @order.bill_address.city.strip,
|
137
|
+
"uf" => @order.bill_address.state.abbr.strip,
|
138
|
+
"numero" => @order.bill_address.number.strip,
|
139
|
+
"complemento" => @order.bill_address.address2.strip
|
140
140
|
},
|
141
141
|
endereco_cobranca: {
|
142
|
-
"endereco" => @order.bill_address.address1,
|
143
|
-
"cep" => @order.bill_address.zipcode,
|
144
|
-
"bairro" => @order.bill_address.district,
|
145
|
-
"municipio" => @order.bill_address.city,
|
146
|
-
"uf" => @order.bill_address.state.abbr,
|
147
|
-
"numero" => @order.bill_address.number,
|
148
|
-
"complemento" => @order.bill_address.address2
|
142
|
+
"endereco" => @order.bill_address.address1.strip,
|
143
|
+
"cep" => @order.bill_address.zipcode.strip,
|
144
|
+
"bairro" => @order.bill_address.district.strip,
|
145
|
+
"municipio" => @order.bill_address.city.strip,
|
146
|
+
"uf" => @order.bill_address.state.abbr.strip,
|
147
|
+
"numero" => @order.bill_address.number.strip,
|
148
|
+
"complemento" => @order.bill_address.address2.strip
|
149
149
|
}
|
150
150
|
}
|
151
151
|
end
|
@@ -10,19 +10,10 @@ module SolidusBling
|
|
10
10
|
true
|
11
11
|
end
|
12
12
|
|
13
|
-
def copy_initializer
|
14
|
-
template "initializer.rb", "config/initializers/solidus_bling.rb"
|
15
|
-
end
|
16
|
-
|
17
13
|
def add_migrations
|
18
14
|
run "bin/rails railties:install:migrations FROM=solidus_bling"
|
19
15
|
end
|
20
16
|
|
21
|
-
def install_bling_api
|
22
|
-
puts 'Installing bling_api gem...'
|
23
|
-
run 'bin/rails g bling_api:install'
|
24
|
-
end
|
25
|
-
|
26
17
|
def run_migrations
|
27
18
|
run_migrations = options[:auto_run_migrations] || ["", "y", "Y"].include?(ask("Would you like to run the migrations now? [Y/n]")) # rubocop:disable Layout/LineLength
|
28
19
|
if run_migrations
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_bling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hamilton Tumenas Borges
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|