spree_core 4.1.14 → 4.1.15

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: 3c8287bde543c898068e2948a047426bcbb5e889e72d6959b8d3708be3deef05
4
- data.tar.gz: 855883bee8a429ad1517498b487a6f7e7447e9dfadf02b27a408d0020f3f026b
3
+ metadata.gz: 839249efbd80112c669ba2a4790ab353b6c31476be2c845de2edfbda03d6cd6b
4
+ data.tar.gz: 170887f258fae01503d713b33f709fdff05f8f8298c3bdfb11d659881be58a3d
5
5
  SHA512:
6
- metadata.gz: ad62daa6a479e57108a618a9896ea281281f489a729af95c5b3ad36052880b0d1eb3005dae876b85d20a3c9d8816f13933d3a0fddd7ced20660e0e946726af9d
7
- data.tar.gz: b8403ad63e76b14e42ffd5904c00a3b3b483f3315480790244e6ee3a5566e3289acac67784b3486e3ddf89c1297fa926c083fec53af8c1d16f22cd84bec661f0
6
+ metadata.gz: b8492dc3ea5d4c89f2cc6de08ac9aee6b28bbc04fa9518550c72c51c9ccf60bf1930fe0c5db5000a5baee6faa1a2924d84e32c20bfd1fc58cbe3c73db27b593a
7
+ data.tar.gz: 95128587c2913170eccf5dd5bcf1cd39686c5e57cd4ec952e8fcfa89079ff28671f7630c975fd6e2af0243a71c54fab8f6605d01a9b038f368e3aa6dde90c2e8
@@ -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
2
  def self.version
3
- '4.1.14'
3
+ '4.1.15'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.14
4
+ version: 4.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-31 00:00:00.000000000 Z
11
+ date: 2024-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -496,6 +496,7 @@ files:
496
496
  - app/models/spree/order/currency_updater.rb
497
497
  - app/models/spree/order/payments.rb
498
498
  - app/models/spree/order/store_credit.rb
499
+ - app/models/spree/order_contents.rb
499
500
  - app/models/spree/order_inventory.rb
500
501
  - app/models/spree/order_merger.rb
501
502
  - app/models/spree/order_promotion.rb
@@ -1095,9 +1096,9 @@ licenses:
1095
1096
  - BSD-3-Clause
1096
1097
  metadata:
1097
1098
  bug_tracker_uri: https://github.com/spree/spree/issues
1098
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.1.14
1099
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.1.15
1099
1100
  documentation_uri: https://guides.spreecommerce.org/
1100
- source_code_uri: https://github.com/spree/spree/tree/v4.1.14
1101
+ source_code_uri: https://github.com/spree/spree/tree/v4.1.15
1101
1102
  post_install_message:
1102
1103
  rdoc_options: []
1103
1104
  require_paths:
@@ -1113,7 +1114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1113
1114
  - !ruby/object:Gem::Version
1114
1115
  version: 1.8.23
1115
1116
  requirements: []
1116
- rubygems_version: 3.2.3
1117
+ rubygems_version: 3.2.22
1117
1118
  signing_key:
1118
1119
  specification_version: 4
1119
1120
  summary: The bare bones necessary for Spree.