solidus_tiny 2.1.1 → 2.2.0

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: a1b98001953a95c8268b59fc514c04a01bda2e3f9747c63b0bd9d8e483acc11b
4
- data.tar.gz: 3317bec3df024cc33e8d890b6ae67ceed1dbffbbd6836052e3cf78b18cb06a54
3
+ metadata.gz: 6736a9c82cd9d1a56d023ba0815957e338f2d815d92ed0865c6f99d1d989cdac
4
+ data.tar.gz: 8ceba70e5a1563d82e47d02da092948e7e46749cf55092faf982cb73f54e495a
5
5
  SHA512:
6
- metadata.gz: 178080d35e943d3d4e1636027ded3cf849b901e5caf5224574d2a8a5f1f14cc701b90c50709e39668e319569ab03ca1fa52d28123289101b6c76ed759ad28e4b
7
- data.tar.gz: 37d689b281e909e3ee56ada4466c9f75db6a5dea5e666fc4802d0e4b4a2a7182238a794c652048e590fd1334377c6872372189356c35530576b2e57c860a56fb
6
+ metadata.gz: 4cae616828443906f5a3c77317f44359a6ec43724dc851a97a861623ab75fbbce1e54128f52439cc509068f6b3398fba365d09ccaa7439939687e3d69aa0d459
7
+ data.tar.gz: 769fd5399e79f1c097869ede4fd6de849096cc12e199009a11f92367f410a93ea8700a45cbaa2c1e338e884d53555d22e38c32b0f912246a7ed3267db130ad30
@@ -8,7 +8,7 @@ module SolidusTiny
8
8
 
9
9
  def send
10
10
  @account = SolidusTiny::Account.first
11
- @client = SolidusTiny::TinyClient.for_account(@account)
11
+ @client = SolidusTiny::TinyClient.for_account(@account)
12
12
 
13
13
  contato = upsert_contact
14
14
  itens = build_tiny_items
@@ -21,7 +21,7 @@ module SolidusTiny
21
21
  data: @order.completed_at.strftime("%Y-%m-%d"),
22
22
  id_contato: contato.id,
23
23
  itens: itens,
24
- valor_desconto: @order.adjustment_total.abs,
24
+ valor_desconto: calculate_discount,
25
25
  valor_frete: @order.shipment_total.to_f,
26
26
  id_natureza_operacao: @account.operation_id,
27
27
  id_vendedor: id_vendedor,
@@ -165,5 +165,9 @@ module SolidusTiny
165
165
  def build_observacoes
166
166
  "Pedido realizado no e-commerce #{build_order_url}"
167
167
  end
168
+
169
+ def calculate_discount
170
+ @order.adjustment_total.abs
171
+ end
168
172
  end
169
173
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusTiny
4
- VERSION = "2.1.1"
4
+ VERSION = "2.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_tiny
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ulysses
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-08 00:00:00.000000000 Z
11
+ date: 2026-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_brazilian_adaptations
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description:
41
+ description:
42
42
  email: ulyssesh.20@gmail.com
43
43
  executables: []
44
44
  extensions: []
@@ -89,7 +89,7 @@ homepage: https://github.com/ulysses-bull/solidus_tiny#readme
89
89
  licenses:
90
90
  - BSD-3-Clause
91
91
  metadata: {}
92
- post_install_message:
92
+ post_install_message:
93
93
  rdoc_options: []
94
94
  require_paths:
95
95
  - lib
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubygems_version: 3.5.3
108
- signing_key:
108
+ signing_key:
109
109
  specification_version: 4
110
110
  summary: ''
111
111
  test_files: []