spree_core 4.6.4 → 4.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spree/address.rb +1 -1
- data/app/models/spree/asset.rb +1 -1
- data/app/models/spree/calculator/default_tax.rb +1 -1
- data/app/models/spree/cms_page.rb +1 -1
- data/app/models/spree/cms_section.rb +1 -1
- data/app/models/spree/credit_card.rb +1 -1
- data/app/models/spree/customer_return.rb +2 -2
- data/app/models/spree/line_item.rb +1 -1
- data/app/models/spree/option_type.rb +3 -3
- data/app/models/spree/option_value.rb +2 -2
- data/app/models/spree/order/store_credit.rb +8 -0
- data/app/models/spree/order.rb +3 -3
- data/app/models/spree/order_contents.rb +31 -0
- data/app/models/spree/payment.rb +3 -3
- data/app/models/spree/payment_method.rb +1 -1
- data/app/models/spree/payment_source.rb +1 -1
- data/app/models/spree/price.rb +1 -1
- data/app/models/spree/product.rb +7 -6
- data/app/models/spree/promotion.rb +2 -2
- data/app/models/spree/property.rb +2 -2
- data/app/models/spree/prototype.rb +1 -1
- data/app/models/spree/refund.rb +1 -1
- data/app/models/spree/reimbursement.rb +1 -1
- data/app/models/spree/return_authorization.rb +1 -1
- data/app/models/spree/shipment.rb +3 -3
- data/app/models/spree/shipping_method.rb +1 -1
- data/app/models/spree/stock/estimator.rb +1 -1
- data/app/models/spree/stock_item.rb +1 -1
- data/app/models/spree/stock_transfer.rb +3 -3
- data/app/models/spree/store_credit.rb +1 -1
- data/app/models/spree/taxon.rb +3 -3
- data/app/models/spree/taxonomy.rb +2 -2
- data/app/models/spree/variant.rb +2 -2
- data/lib/spree/core/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fae2e48673736c835ed7a9d9b5fdf18a35df19ce09eb27a92c6b13376e62a46e
|
4
|
+
data.tar.gz: e48f60fe8dcbeaa67028bb4ce9e23baba71f33afb32ff04be86636c60c9ed378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 706d673aa098f26442eafe06fd1b7eab7dd7267bb9514b3c6f2f1124eff2ea950c5d1dfdde5f8d1c7258c41c9fb5456e0655a2249fa91331267ebef397bf97c8
|
7
|
+
data.tar.gz: 2bb5c0f817b50bdafd1a83708bf6f85cf0b9d69ca605bb48c936d7225fdf3fcf036a0f44e5e901ed9365bf17fc6b826f5190af5841d0e5eb6c1b5ce02e1e49c2
|
data/app/models/spree/address.rb
CHANGED
data/app/models/spree/asset.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Spree
|
2
2
|
class CustomerReturn < Spree::Base
|
3
3
|
include Spree::Core::NumberGenerator.new(prefix: 'CR', length: 9)
|
4
|
-
include NumberIdentifier
|
5
|
-
include Metadata
|
4
|
+
include Spree::NumberIdentifier
|
5
|
+
include Spree::Metadata
|
6
6
|
if defined?(Spree::Webhooks)
|
7
7
|
include Spree::Webhooks::HasWebhooks
|
8
8
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Spree
|
2
2
|
class OptionType < Spree::Base
|
3
|
-
include UniqueName
|
4
|
-
include Metadata
|
5
|
-
include TranslatableResource
|
3
|
+
include Spree::UniqueName
|
4
|
+
include Spree::Metadata
|
5
|
+
include Spree::TranslatableResource
|
6
6
|
if defined?(Spree::Webhooks)
|
7
7
|
include Spree::Webhooks::HasWebhooks
|
8
8
|
end
|
@@ -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
|
|
data/app/models/spree/order.rb
CHANGED
@@ -20,10 +20,10 @@ module Spree
|
|
20
20
|
include Spree::Core::NumberGenerator.new(prefix: 'R')
|
21
21
|
include Spree::Core::TokenGenerator
|
22
22
|
|
23
|
-
include NumberIdentifier
|
24
|
-
include NumberAsParam
|
23
|
+
include Spree::NumberIdentifier
|
24
|
+
include Spree::NumberAsParam
|
25
25
|
include SingleStoreResource
|
26
|
-
include MemoizedData
|
26
|
+
include Spree::MemoizedData
|
27
27
|
include Spree::Metadata
|
28
28
|
if defined?(Spree::Webhooks)
|
29
29
|
include Spree::Webhooks::HasWebhooks
|
@@ -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/app/models/spree/payment.rb
CHANGED
@@ -3,9 +3,9 @@ require_dependency 'spree/payment/processing'
|
|
3
3
|
module Spree
|
4
4
|
class Payment < Spree::Base
|
5
5
|
include Spree::Core::NumberGenerator.new(prefix: 'P', letters: true, length: 7)
|
6
|
-
include NumberIdentifier
|
7
|
-
include NumberAsParam
|
8
|
-
include Metadata
|
6
|
+
include Spree::NumberIdentifier
|
7
|
+
include Spree::NumberAsParam
|
8
|
+
include Spree::Metadata
|
9
9
|
if defined?(Spree::Webhooks)
|
10
10
|
include Spree::Webhooks::HasWebhooks
|
11
11
|
end
|
data/app/models/spree/price.rb
CHANGED
data/app/models/spree/product.rb
CHANGED
@@ -21,12 +21,13 @@
|
|
21
21
|
module Spree
|
22
22
|
class Product < Spree::Base
|
23
23
|
extend FriendlyId
|
24
|
-
include ProductScopes
|
25
|
-
include MultiStoreResource
|
26
|
-
include TranslatableResource
|
27
|
-
include TranslatableResourceSlug
|
28
|
-
include MemoizedData
|
29
|
-
include Metadata
|
24
|
+
include Spree::ProductScopes
|
25
|
+
include Spree::MultiStoreResource
|
26
|
+
include Spree::TranslatableResource
|
27
|
+
include Spree::TranslatableResourceSlug
|
28
|
+
include Spree::MemoizedData
|
29
|
+
include Spree::Metadata
|
30
|
+
|
30
31
|
if defined?(Spree::Webhooks)
|
31
32
|
include Spree::Webhooks::HasWebhooks
|
32
33
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Spree
|
2
2
|
class Property < Spree::Base
|
3
3
|
include Spree::FilterParam
|
4
|
-
include Metadata
|
5
|
-
include TranslatableResource
|
4
|
+
include Spree::Metadata
|
5
|
+
include Spree::TranslatableResource
|
6
6
|
if defined?(Spree::Webhooks)
|
7
7
|
include Spree::Webhooks::HasWebhooks
|
8
8
|
end
|
data/app/models/spree/refund.rb
CHANGED
@@ -3,9 +3,9 @@ require 'ostruct'
|
|
3
3
|
module Spree
|
4
4
|
class Shipment < Spree::Base
|
5
5
|
include Spree::Core::NumberGenerator.new(prefix: 'H', length: 11)
|
6
|
-
include NumberIdentifier
|
7
|
-
include NumberAsParam
|
8
|
-
include Metadata
|
6
|
+
include Spree::NumberIdentifier
|
7
|
+
include Spree::NumberAsParam
|
8
|
+
include Spree::Metadata
|
9
9
|
if defined?(Spree::Webhooks)
|
10
10
|
include Spree::Webhooks::HasWebhooks
|
11
11
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module Spree
|
2
2
|
class StockTransfer < Spree::Base
|
3
3
|
include Spree::Core::NumberGenerator.new(prefix: 'T')
|
4
|
-
include NumberIdentifier
|
5
|
-
include NumberAsParam
|
6
|
-
include Metadata
|
4
|
+
include Spree::NumberIdentifier
|
5
|
+
include Spree::NumberAsParam
|
6
|
+
include Spree::Metadata
|
7
7
|
if defined?(Spree::Webhooks)
|
8
8
|
include Spree::Webhooks::HasWebhooks
|
9
9
|
end
|
data/app/models/spree/taxon.rb
CHANGED
@@ -3,9 +3,9 @@ require 'stringex'
|
|
3
3
|
|
4
4
|
module Spree
|
5
5
|
class Taxon < Spree::Base
|
6
|
-
include TranslatableResource
|
7
|
-
include TranslatableResourceSlug
|
8
|
-
include Metadata
|
6
|
+
include Spree::TranslatableResource
|
7
|
+
include Spree::TranslatableResourceSlug
|
8
|
+
include Spree::Metadata
|
9
9
|
if defined?(Spree::Webhooks)
|
10
10
|
include Spree::Webhooks::HasWebhooks
|
11
11
|
end
|
data/app/models/spree/variant.rb
CHANGED
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.6.
|
4
|
+
version: 4.6.6
|
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: 2024-
|
12
|
+
date: 2024-04-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -670,6 +670,7 @@ files:
|
|
670
670
|
- app/models/spree/order/emails.rb
|
671
671
|
- app/models/spree/order/payments.rb
|
672
672
|
- app/models/spree/order/store_credit.rb
|
673
|
+
- app/models/spree/order_contents.rb
|
673
674
|
- app/models/spree/order_inventory.rb
|
674
675
|
- app/models/spree/order_merger.rb
|
675
676
|
- app/models/spree/order_promotion.rb
|
@@ -1127,9 +1128,9 @@ licenses:
|
|
1127
1128
|
- BSD-3-Clause
|
1128
1129
|
metadata:
|
1129
1130
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
1130
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v4.6.
|
1131
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.6.6
|
1131
1132
|
documentation_uri: https://dev-docs.spreecommerce.org/
|
1132
|
-
source_code_uri: https://github.com/spree/spree/tree/v4.6.
|
1133
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.6.6
|
1133
1134
|
post_install_message:
|
1134
1135
|
rdoc_options: []
|
1135
1136
|
require_paths:
|
@@ -1145,7 +1146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1145
1146
|
- !ruby/object:Gem::Version
|
1146
1147
|
version: 1.8.23
|
1147
1148
|
requirements: []
|
1148
|
-
rubygems_version: 3.
|
1149
|
+
rubygems_version: 3.5.3
|
1149
1150
|
signing_key:
|
1150
1151
|
specification_version: 4
|
1151
1152
|
summary: The bare bones necessary for Spree
|