effective_orders 6.19.3 → 6.19.5
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/effective/deluxe_api.rb +20 -1
- data/app/views/admin/orders/_order_item_fields.html.haml +3 -2
- data/app/views/effective/acts_as_purchasable/_fields.html.haml +4 -1
- data/config/effective_orders.rb +3 -0
- data/lib/effective_orders/version.rb +1 -1
- data/lib/effective_orders.rb +5 -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: 746dd5ee2144955c3aab3c11981e71972860cf759f149ce5f65d1a34cf151998
|
4
|
+
data.tar.gz: 97f67c034986af44dd68d626dec51dc30f85c03c21a002d8504051e60993ee33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 014db5a1ca6536d3a3e6dfdd050b30fdca4477ba3f320e7a0a05162f81a2b2bcb9019e60ae951f700c67bf193a7d8ee9a0eacf1cb9209ea306a8be7dc349e253
|
7
|
+
data.tar.gz: a4e6f6cdf0af9ff2df925bcecc1601b6b0d41c88d8ddd03de7c75e6cbd732243498dc472859003be022e9f9f412efec841ee8dda6e50d682fca69ae7e80fe3cd
|
@@ -100,7 +100,7 @@ module Effective
|
|
100
100
|
|
101
101
|
# Create Payment
|
102
102
|
def create_payment(order, payment_intent)
|
103
|
-
response =
|
103
|
+
response = post_once('/payments', params: create_payment_params(order, payment_intent))
|
104
104
|
|
105
105
|
# Sanity check response
|
106
106
|
raise('expected responseCode') unless response.kind_of?(Hash) && response['responseCode'].present?
|
@@ -386,6 +386,25 @@ module Effective
|
|
386
386
|
http.read_timeout = (read_timeout || 30)
|
387
387
|
http.use_ssl = true
|
388
388
|
|
389
|
+
result = with_retries do
|
390
|
+
puts "[POST] #{uri} #{params}" if Rails.env.development?
|
391
|
+
|
392
|
+
response = http.post(uri.path, params.to_json, headers)
|
393
|
+
raise Exception.new("#{response.code} #{response.body}") unless response.code == '200'
|
394
|
+
|
395
|
+
response
|
396
|
+
end
|
397
|
+
|
398
|
+
JSON.parse(result.body)
|
399
|
+
end
|
400
|
+
|
401
|
+
def post_once(endpoint, params:)
|
402
|
+
uri = URI.parse(api_url + endpoint)
|
403
|
+
|
404
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
405
|
+
http.read_timeout = (read_timeout || 30)
|
406
|
+
http.use_ssl = true
|
407
|
+
|
389
408
|
puts "[POST] #{uri} #{params}" if Rails.env.development?
|
390
409
|
|
391
410
|
response = http.post(uri.path, params.to_json, headers)
|
@@ -13,7 +13,8 @@
|
|
13
13
|
|
14
14
|
.col= pf.price_field :price
|
15
15
|
|
16
|
-
.
|
17
|
-
.
|
16
|
+
- if EffectiveOrders.use_item_names?
|
17
|
+
.col
|
18
|
+
.mt-4= qb_item_name_field(pf)
|
18
19
|
|
19
20
|
.col= pf.check_box :tax_exempt, label: "Tax Exempt", title: 'When checked, tax will not be applied to this item'
|
data/config/effective_orders.rb
CHANGED
@@ -23,6 +23,9 @@ EffectiveOrders.setup do |config|
|
|
23
23
|
config.use_effective_qb_sync = false
|
24
24
|
config.use_effective_qb_online = false
|
25
25
|
|
26
|
+
# Display the item name field on the orders#new screen
|
27
|
+
config.use_item_names = true
|
28
|
+
|
26
29
|
# If set, the orders#new screen will render effective/orders/_order_note_fields to capture any Note info
|
27
30
|
config.collect_note = false
|
28
31
|
config.collect_note_required = false
|
data/lib/effective_orders.rb
CHANGED
@@ -19,7 +19,7 @@ module EffectiveOrders
|
|
19
19
|
:customers_table_name, :subscriptions_table_name, :products_table_name, :item_names_table_name,
|
20
20
|
:layout,
|
21
21
|
:orders_collection_scope, :order_tax_rate_method,
|
22
|
-
:obfuscate_order_ids, :use_effective_qb_sync, :use_effective_qb_online,
|
22
|
+
:obfuscate_order_ids, :use_effective_qb_sync, :use_effective_qb_online, :use_item_names,
|
23
23
|
:billing_address, :shipping_address,
|
24
24
|
:collect_note, :collect_note_required, :collect_note_message,
|
25
25
|
:terms_and_conditions, :terms_and_conditions_label, :minimum_charge,
|
@@ -212,6 +212,10 @@ module EffectiveOrders
|
|
212
212
|
use_effective_qb_online && defined?(EffectiveQbOnline)
|
213
213
|
end
|
214
214
|
|
215
|
+
def self.use_item_names?
|
216
|
+
use_item_names != false
|
217
|
+
end
|
218
|
+
|
215
219
|
def self.quickbooks?
|
216
220
|
use_effective_qb_sync || use_effective_qb_online
|
217
221
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_orders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.19.
|
4
|
+
version: 6.19.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|