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: 6064574ff2f1083d6d90789c4d2c9560fd52aac40545b5117bfadb7f5bb2f14b
4
- data.tar.gz: b0f41b268234fe9fc1951f26751ec79536275bb6afc8aa562d7ef8851c1d7aa8
3
+ metadata.gz: a1a2a13126b2a8d444fd0139e30cf9cc86b3eae8d5d13da23078937f8ad1a6a1
4
+ data.tar.gz: 8ddd59b94186a0944eb04d09bcbadb924714e087ca52373f7247db128053406f
5
5
  SHA512:
6
- metadata.gz: 3f213b7b87c542d60c7c65726bd40564e2d93ae2235f65838e2f4bbd08f5e171f8efc4d56a96f22f3a3563f73dbf305bc2ef35a5f93bb97f362971837fa1ac51
7
- data.tar.gz: 1dd02adbf07965baddab2baccb5aabe4a100025d13cf3b8b6225b0bd5f96b371eee75ba01eb28ec885b6276ce6ae1900bd630b16c1c464e0e7f539d8ed8fe1a2
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, id_method_name: :promotion_id do |cart|
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.rc3
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-27 00:00:00.000000000 Z
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.rc3
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.rc3
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: 1.3.1
317
+ version: '0'
318
318
  requirements: []
319
319
  rubygems_version: 3.0.2
320
320
  signing_key: