spree_core 4.6.3 → 4.6.5

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: cfc76e7ab1af8b397215184841f2d4303ee2407111799e9c5c5b042fac17898b
4
- data.tar.gz: b1da196aebc88f74e6c17dea7e4df41fc56c68797e8691dfa8ab2a968fd5143b
3
+ metadata.gz: 17f91f49a8988b2ad51ba9d1cdf708ba6d366309995eb8c34988fa37ffe0643a
4
+ data.tar.gz: 79f6c4de591d8ece9ff365b7c94454b14d338c981b2ff99d431f712237fea1fa
5
5
  SHA512:
6
- metadata.gz: 70240708a3c284ea4c4ef0894be9f3ec90b3665882e6d492c1d682373250c3e186bb0b32c81bfde362cdfe75e146afb27bfbd49d1b6722c28037e9e5507dc31a
7
- data.tar.gz: a612ea4fce2402684bdda0d6da721406b63161659f41827e8e9e05d42b1f899ac248d4b5e12ee5bbf8ca204a17c13c310787677cc7d0c41e87acd225d83e5ac6
6
+ metadata.gz: ae9940718044abfe862d351a66cdc85b95602db15254b51c8fd3aebb68c9d10ded38a6db66626dfa62c0d27aa51084061b385bdd89e88470bfb957a27749a5f8
7
+ data.tar.gz: b318d464f70787feed65272527c710d77cd5661c0da996b5a85791399c16326c340551762165da7a5e1f9ffc6dcc75f10214bfa15e1cea04833e2073703a6cc0
@@ -18,7 +18,7 @@ module Spree
18
18
  end
19
19
 
20
20
  def translation_table_alias
21
- "#{self::Translation.table_name}_#{Mobility.locale}"
21
+ "#{self::Translation.table_name}_#{Mobility.normalize_locale(Mobility.locale)}"
22
22
  end
23
23
  end
24
24
  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
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Spree
2
- VERSION = '4.6.3'.freeze
2
+ VERSION = '4.6.5'.freeze
3
3
 
4
4
  def self.version
5
5
  VERSION
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.3
4
+ version: 4.6.5
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: 2023-11-09 00:00:00.000000000 Z
12
+ date: 2024-04-21 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.3
1131
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.6.5
1131
1132
  documentation_uri: https://dev-docs.spreecommerce.org/
1132
- source_code_uri: https://github.com/spree/spree/tree/v4.6.3
1133
+ source_code_uri: https://github.com/spree/spree/tree/v4.6.5
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.4.1
1149
+ rubygems_version: 3.5.3
1149
1150
  signing_key:
1150
1151
  specification_version: 4
1151
1152
  summary: The bare bones necessary for Spree