solidus_bling 3.0.2 → 3.0.3
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 +6 -6
- data/app/models/solidus_bling/token.rb +0 -4
- data/app/views/spree/admin/solidus_bling/accounts/_form.html.erb +7 -0
- data/app/views/spree/admin/solidus_bling/accounts/index.html.erb +7 -0
- data/db/migrate/20231110113221_create_solidus_bling_shipping_methods.rb +2 -2
- data/lib/solidus_bling/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe9686f547075a1388e93b0d93ef24e9be44988cce5deb8f7a122ab0ff80ac15
|
|
4
|
+
data.tar.gz: 8d06bef816cc6d034daa37e0c54088e5724ca1098b471d266f88e9684810c0a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bfd59588eea2c8b706ca6dd40f51eaafd56a60f87ca4bf39d05641395437262fbf878731b5e0a0acf142ce1a5b1b646dd0ef70e7f79dbd0f085d389b8dfd47eb
|
|
7
|
+
data.tar.gz: 8c4d46c87072916920882e754055889b54bd78a141b72f55fe9c7896a8c700fe74b289337b3fe4d168d70bb84283ab35553372baa13dfa6fd26d5a9939bb08d8
|
|
@@ -15,7 +15,7 @@ module SolidusBling
|
|
|
15
15
|
observacoes_internas = internal_observations
|
|
16
16
|
transporte = shipment
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
BlingApi::Order.new(
|
|
19
19
|
id_contato: contato.id,
|
|
20
20
|
items: items,
|
|
21
21
|
parcelas: parcelas,
|
|
@@ -80,13 +80,13 @@ module SolidusBling
|
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
def internal_observations
|
|
83
|
-
"Pagamento: #{@parcelas}x R$ #{(@order.total.to_f / @parcelas).round(2)}"
|
|
83
|
+
"Pagamento: #{@parcelas}x R$ #{(@order.total.to_f / @parcelas).round(2)}" \
|
|
84
|
+
"\n" \
|
|
85
|
+
"Forma de envio: #{@order.shipments.last.selected_shipping_rate.name}" \
|
|
84
86
|
"\n" +
|
|
85
|
-
|
|
87
|
+
build_cupons(@order.promotions).to_s +
|
|
86
88
|
"\n" +
|
|
87
|
-
|
|
88
|
-
"\n" +
|
|
89
|
-
"#{build_order_url}"
|
|
89
|
+
build_order_url.to_s
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
def shipment
|
|
@@ -2,10 +2,6 @@ module SolidusBling
|
|
|
2
2
|
class Token < ::Ac::Base
|
|
3
3
|
BASE_URL = "https://www.bling.com.br/Api/v3"
|
|
4
4
|
|
|
5
|
-
def initialize
|
|
6
|
-
super
|
|
7
|
-
end
|
|
8
|
-
|
|
9
5
|
def authorize bling_account, code
|
|
10
6
|
basic_encoded = Base64.strict_encode64("#{bling_account.client_id}:#{bling_account.client_secret}")
|
|
11
7
|
headers = {
|
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
<%= form.text_field :access_token, class: 'fullwidth' %>
|
|
60
60
|
<%= form.error_message_on :access_token %>
|
|
61
61
|
<% end %>
|
|
62
|
+
|
|
63
|
+
<div class="field">
|
|
64
|
+
<%= label_tag :token_expires_in, "Token Expiration" %>
|
|
65
|
+
<div class="fullwidth" id="token_expires_in" name="token_expires_in">
|
|
66
|
+
<%= bling_account.token_expires_in %>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
62
69
|
</div>
|
|
63
70
|
</div>
|
|
64
71
|
</fieldset>
|
|
@@ -54,6 +54,13 @@
|
|
|
54
54
|
<%= label_tag :access_token, "Access Token" %>
|
|
55
55
|
<%= text_field_tag :access_token, account.access_token, class:"fullwidth", disabled: true %>
|
|
56
56
|
</div>
|
|
57
|
+
|
|
58
|
+
<div class="field">
|
|
59
|
+
<%= label_tag :token_expires_in, "Token Expiration" %>
|
|
60
|
+
<div class="fullwidth" id="token_expires_in" name="token_expires_in">
|
|
61
|
+
<%= account.token_expires_in %>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
57
64
|
</div>
|
|
58
65
|
</div>
|
|
59
66
|
</fieldset>
|
|
@@ -3,8 +3,8 @@ class CreateSolidusBlingShippingMethods < ActiveRecord::Migration[7.0]
|
|
|
3
3
|
create_table :solidus_bling_shipping_methods do |t|
|
|
4
4
|
t.string :alias
|
|
5
5
|
t.string :company
|
|
6
|
-
t.integer :account_id, null: false, index:
|
|
7
|
-
t.integer :spree_shipping_method_id, null: false, index:
|
|
6
|
+
t.integer :account_id, null: false, index: {name: "solidus_bling_shipping_account_index"}
|
|
7
|
+
t.integer :spree_shipping_method_id, null: false, index: {name: "solidus_bling_spree_shipping_index"}
|
|
8
8
|
|
|
9
9
|
t.timestamps
|
|
10
10
|
|
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.0.
|
|
4
|
+
version: 3.0.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: 2023-11-
|
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: solidus_core
|