spree_core 4.6.4 → 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: 1eaae4db080d34b28d92a5fe2d41eceb0bc99114a4be047b3320c7305c176306
4
- data.tar.gz: 9a8948040fda3a08c5f0fb5fd2d6519c4ea9b4fece7cc91131d2a2072f25c982
3
+ metadata.gz: 17f91f49a8988b2ad51ba9d1cdf708ba6d366309995eb8c34988fa37ffe0643a
4
+ data.tar.gz: 79f6c4de591d8ece9ff365b7c94454b14d338c981b2ff99d431f712237fea1fa
5
5
  SHA512:
6
- metadata.gz: 2654308ff6eb25c99a661e2dfa6f4815d9b73bc0ef01c134a59aa2d1eaebcec16ee9f5c1e3fddbf207771e50a6b3a10f28ddf84b424adb5cdd2343360da8e63e
7
- data.tar.gz: 3bfce5acc6964b4a9b0f7dcf12e07918f61d27f57e4fcf69783bbab32c95747d81bc2a764ec1557e86d4238593ddcb0145500c801176c4a7f3bf7582b8f14ac6
6
+ metadata.gz: ae9940718044abfe862d351a66cdc85b95602db15254b51c8fd3aebb68c9d10ded38a6db66626dfa62c0d27aa51084061b385bdd89e88470bfb957a27749a5f8
7
+ data.tar.gz: b318d464f70787feed65272527c710d77cd5661c0da996b5a85791399c16326c340551762165da7a5e1f9ffc6dcc75f10214bfa15e1cea04833e2073703a6cc0
@@ -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.4'.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.4
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: 2024-01-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.4
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.4
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