spree_core 4.4.0 → 4.4.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6f1530fed2a687bd1eb187fbc25fc58fcd257d498f9e9f641291f99991f0e46
|
4
|
+
data.tar.gz: fd670b73289d5515e3e27dd5f80451f3c866865ea278cfb8e8d9b43d3c650a46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d83b92fbf213054613dd642a968a6958c6a54dcdd4177c54385b3a82bf567de92cc5d0c21a18deda0768dfeafb2b955fcf508c1392ded7071e7c499c29afcb73
|
7
|
+
data.tar.gz: c4e3da90f798233259263b922a5ac32999d4e34c46a64b0731e316c5eada252b18bce0c53cc4651e977b3984aa343ef80570cdbf96378600f362d23d3bc2b320
|
@@ -92,7 +92,7 @@ module Spree
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def get_desired_shipment_inventory_unit(state)
|
95
|
-
desired_shipment.inventory_units.find_or_create_by(state: state) do |unit|
|
95
|
+
desired_shipment.inventory_units.find_or_create_by(state: state, variant: variant) do |unit|
|
96
96
|
current_shipment_unit = current_shipment_units.first
|
97
97
|
unit.variant_id = current_shipment_unit.variant_id
|
98
98
|
unit.order_id = current_shipment_unit.order_id
|
@@ -1,6 +1,14 @@
|
|
1
1
|
module Spree
|
2
2
|
class Order < Spree::Base
|
3
3
|
module StoreCredit
|
4
|
+
def add_store_credit_payments(amount = nil)
|
5
|
+
Spree::Dependencies.checkout_add_store_credit_service.constantize.call(order: self, amount: amount)
|
6
|
+
end
|
7
|
+
|
8
|
+
def remove_store_credit_payments
|
9
|
+
Spree::Dependencies.checkout_remove_store_credit_service.constantize.call(order: self)
|
10
|
+
end
|
11
|
+
|
4
12
|
def covered_by_store_credit?
|
5
13
|
return false unless user
|
6
14
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Spree
|
2
|
+
class OrderContents
|
3
|
+
attr_accessor :order, :currency
|
4
|
+
|
5
|
+
def initialize(order)
|
6
|
+
@order = order
|
7
|
+
end
|
8
|
+
|
9
|
+
def add(variant, quantity = 1, options = {})
|
10
|
+
Spree::Dependencies.cart_add_item_service.constantize.call(order: order,
|
11
|
+
variant: variant,
|
12
|
+
quantity: quantity,
|
13
|
+
options: options).value
|
14
|
+
end
|
15
|
+
|
16
|
+
def remove(variant, quantity = 1, options = {})
|
17
|
+
Spree::Dependencies.cart_remove_item_service.constantize.call(order: order,
|
18
|
+
variant: variant,
|
19
|
+
quantity: quantity,
|
20
|
+
options: options).value
|
21
|
+
end
|
22
|
+
|
23
|
+
def remove_line_item(line_item, options = {})
|
24
|
+
Spree::Cart::RemoveLineItem.call(order: @order, line_item: line_item, options: options).value
|
25
|
+
end
|
26
|
+
|
27
|
+
def update_cart(params)
|
28
|
+
Spree::Dependencies.cart_update_service.constantize.call(order: order, params: params).value
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/spree/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.4.
|
4
|
+
version: 4.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -583,6 +583,7 @@ files:
|
|
583
583
|
- app/models/spree/order/emails.rb
|
584
584
|
- app/models/spree/order/payments.rb
|
585
585
|
- app/models/spree/order/store_credit.rb
|
586
|
+
- app/models/spree/order_contents.rb
|
586
587
|
- app/models/spree/order_inventory.rb
|
587
588
|
- app/models/spree/order_merger.rb
|
588
589
|
- app/models/spree/order_promotion.rb
|
@@ -977,9 +978,9 @@ licenses:
|
|
977
978
|
- BSD-3-Clause
|
978
979
|
metadata:
|
979
980
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
980
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v4.4.
|
981
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.4.1
|
981
982
|
documentation_uri: https://dev-docs.spreecommerce.org/
|
982
|
-
source_code_uri: https://github.com/spree/spree/tree/v4.4.
|
983
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.4.1
|
983
984
|
post_install_message:
|
984
985
|
rdoc_options: []
|
985
986
|
require_paths:
|
@@ -995,7 +996,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
995
996
|
- !ruby/object:Gem::Version
|
996
997
|
version: 1.8.23
|
997
998
|
requirements: []
|
998
|
-
rubygems_version: 3.
|
999
|
+
rubygems_version: 3.5.3
|
999
1000
|
signing_key:
|
1000
1001
|
specification_version: 4
|
1001
1002
|
summary: The bare bones necessary for Spree
|