solidus_bling 3.0.2 → 3.0.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: '06007929028aa91ff59c2aa725b53c6e68b177ac56d4e5c53a4443b645dabc17'
4
- data.tar.gz: de6672cddf389140fdafb5b2580bc98e93d9c8a989b6769a6dcf5581d982948d
3
+ metadata.gz: fe9686f547075a1388e93b0d93ef24e9be44988cce5deb8f7a122ab0ff80ac15
4
+ data.tar.gz: 8d06bef816cc6d034daa37e0c54088e5724ca1098b471d266f88e9684810c0a8
5
5
  SHA512:
6
- metadata.gz: a55d2735828682b6ab1e53f25683e678fd33f3ec893ea568ed8f963430f908096da5c52b886c0f9905b87facf2909cc7144cd526578336803aff14c3fe5b688e
7
- data.tar.gz: 9cd9a628c2ecdbd68a7f300ce0a6d2dc108ff3679c65812d532421232415c702bb0f80e618e08666a1ba7011ceab7f8729847d78f00b16241297c1a2a984bdf1
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
- bling_order = BlingApi::Order.new(
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
- "Forma de envio: #{@order.shipments.last.selected_shipping_rate.name}" +
87
+ build_cupons(@order.promotions).to_s +
86
88
  "\n" +
87
- "#{build_cupons(@order.promotions)}" +
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: true, index: {name: "solidus_bling_shipping_account_index"}
7
- t.integer :spree_shipping_method_id, null: false, index: true, index: {name: "solidus_bling_spree_shipping_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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusBling
4
- VERSION = "3.0.2"
4
+ VERSION = "3.0.3"
5
5
  end
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.2
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-17 00:00:00.000000000 Z
11
+ date: 2023-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_core