spree_api 4.0.0.rc3 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of spree_api might be problematic. Click here for more details.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1a2a13126b2a8d444fd0139e30cf9cc86b3eae8d5d13da23078937f8ad1a6a1
|
4
|
+
data.tar.gz: 8ddd59b94186a0944eb04d09bcbadb924714e087ca52373f7247db128053406f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2efda9d4c22d209afefce2289680c517ad6edf240f02e87ad54864515e24e4bf977de5d9c3f7606923b128fad09f2d35ae5a0f5f210dbbe4bc2d37b7845302d
|
7
|
+
data.tar.gz: 0c89f7f97ae69eafd67ed36ee7d3c0d36996c095eb79b913c80c6bdb8f4207bfbe81adab3e6666b26a77cfe95b2cf2ef2e53ca3050a362f17e72e487d9c3a4d7
|
@@ -12,15 +12,7 @@ module Spree
|
|
12
12
|
|
13
13
|
has_many :line_items
|
14
14
|
has_many :variants
|
15
|
-
has_many :promotions,
|
16
|
-
# we only want to display applied and valid promotions
|
17
|
-
# sometimes Order can have multiple promotions but the promo engine
|
18
|
-
# will only apply those that are more beneficial for the customer
|
19
|
-
# TODO: we should probably move this code out of the serializer
|
20
|
-
promotion_ids = cart.all_adjustments.eligible.nonzero.promotion.map { |a| a.source.promotion_id }.uniq
|
21
|
-
|
22
|
-
cart.order_promotions.where(promotion_id: promotion_ids).uniq(&:promotion_id)
|
23
|
-
end
|
15
|
+
has_many :promotions, object_method_name: :valid_promotions, id_method_name: :valid_promotion_ids
|
24
16
|
has_many :payments do |cart|
|
25
17
|
cart.payments.valid
|
26
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09
|
11
|
+
date: 2019-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jsonapi-rspec
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.0.0
|
33
|
+
version: 4.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.0.0
|
40
|
+
version: 4.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rabl
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -312,9 +312,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
312
312
|
version: 2.5.0
|
313
313
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
314
314
|
requirements:
|
315
|
-
- - "
|
315
|
+
- - ">="
|
316
316
|
- !ruby/object:Gem::Version
|
317
|
-
version:
|
317
|
+
version: '0'
|
318
318
|
requirements: []
|
319
319
|
rubygems_version: 3.0.2
|
320
320
|
signing_key:
|