effective_orders 5.2.5 → 5.2.9
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/order.rb +4 -4
- data/lib/effective_orders/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: bc66dfb86e929b29d30edefe87326d4caeae9250f1db593e4c1955eb6fd39c32
|
4
|
+
data.tar.gz: 95239c7500bce2fd5d6a48cc9e1c1fe6667ea0af12f3e028820ffa3c52c0843e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a00bb7a4142c5b326412a69d1cfa1c112825933efdd565eecfc422fdb55fc54f06b56e8cde8335705b701dc43403ba4086ababa4c5c6cbeb609cc30eb1e0599e
|
7
|
+
data.tar.gz: 2ce6a0d26f8e9a0c3be3b5540ff25e68eb65408c126d38e9d35c89bb79109499e9b125e5ca5e9842b537a1eab4e13c16becc6b71cbfa75fb2b8a233a8e7b0c3e
|
@@ -103,7 +103,7 @@ module Effective
|
|
103
103
|
end
|
104
104
|
|
105
105
|
# User validations -- An admin skips these when working in the admin/ namespace
|
106
|
-
with_options unless: -> { pending? || skip_buyer_validations? } do
|
106
|
+
with_options unless: -> { pending? || skip_buyer_validations? || purchased? } do
|
107
107
|
validates :tax_rate, presence: { message: "can't be determined based on billing address" }
|
108
108
|
validates :tax, presence: true
|
109
109
|
|
@@ -318,9 +318,9 @@ module Effective
|
|
318
318
|
Effective::Order.new(self)
|
319
319
|
end
|
320
320
|
|
321
|
-
# For moneris and moneris_checkout. Just a unique value.
|
321
|
+
# For moneris and moneris_checkout. Just a unique value. Must be 50 characters or fewer or will raise moneris error.
|
322
322
|
def transaction_id
|
323
|
-
[to_param, billing_name.to_s.parameterize.presence, Time.zone.now.to_i].compact.join('-')
|
323
|
+
[to_param, billing_name.to_s.parameterize.first(20).presence, Time.zone.now.to_i, rand(1000..9999)].compact.join('-')
|
324
324
|
end
|
325
325
|
|
326
326
|
def billing_first_name
|
@@ -596,7 +596,7 @@ module Effective
|
|
596
596
|
end
|
597
597
|
|
598
598
|
def assign_email
|
599
|
-
self.email = user&.email
|
599
|
+
self.email = user&.email if user&.email.present?
|
600
600
|
end
|
601
601
|
|
602
602
|
def assign_last_address
|
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: 5.2.
|
4
|
+
version: 5.2.9
|
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: 2021-12-
|
11
|
+
date: 2021-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|