effective_orders 6.1.3 → 6.1.4
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 +6 -0
- 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: 4c1bf14140fc511842bc5dfbfd7f5ef1ad41ef96f027a44ecd6386822cee4978
|
4
|
+
data.tar.gz: 390d84968bf785bf8690b027812f9c8233cbf6393880b88114310f32a48718f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f95f8037a92ece1208a9637676d2eec45e5a4ba15d593a1b22d6a9befc1323a30e96c96d70eed847a207583abfc6488cee444f74085ef3911aea4cbf8260b37a
|
7
|
+
data.tar.gz: 78f2caf56e27d306b7a242e6e3a84172a5fcaa01105a6d6516c4da1c8589cd74e7a0513ad4f45f3204461dba8dea39af92691332b2d021eb26821995722dd0d7
|
@@ -17,6 +17,7 @@ module Effective
|
|
17
17
|
end
|
18
18
|
|
19
19
|
acts_as_addressable(billing: { singular: true }, shipping: { singular: true })
|
20
|
+
acts_as_reportable if respond_to?(:acts_as_reportable)
|
20
21
|
|
21
22
|
attr_accessor :terms_and_conditions # Yes, I agree to the terms and conditions
|
22
23
|
attr_accessor :confirmed_checkout # Set on the Checkout Step 1
|
@@ -85,6 +86,11 @@ module Effective
|
|
85
86
|
scope :refunds, -> { purchased.where('total < ?', 0) }
|
86
87
|
scope :pending_refunds, -> { not_purchased.where('total < ?', 0) }
|
87
88
|
|
89
|
+
# effective_reports
|
90
|
+
def reportable_scopes
|
91
|
+
{ purchased: nil, not_purchased: nil, deferred: nil, refunds: nil, pending_refunds: nil }
|
92
|
+
end
|
93
|
+
|
88
94
|
before_validation do
|
89
95
|
self.state ||= EffectiveOrders::PENDING
|
90
96
|
self.state = EffectiveOrders::CONFIRMED if pending? && confirmed_checkout
|
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.1.
|
4
|
+
version: 6.1.4
|
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:
|
11
|
+
date: 2023-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|