spree_core 4.3.2 → 4.3.3

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: 820685ea826057c90007aa5e15403d033c893eb89434a0c0a81eacddf832fad3
4
- data.tar.gz: 9234169687d3714f37741a75fe4a5adc04e86f4cf0c8c0b32253b847f31d9331
3
+ metadata.gz: 96c8f3216e3e5d17e33022ff18a6b6a5eab74963aef31297a70c4c3f1ba4604e
4
+ data.tar.gz: 479e325b608c5d19bdd7acb6f69b0dac29f894850dcb63a14a289ca3b5e80a23
5
5
  SHA512:
6
- metadata.gz: 8c826e57778c119e99d7257084b04a71af06ef3d3c6078a699e9b5c8b7ecf7441e6abb4bbd8c1340b0dffd625ba0c57ab13d5ebbe6d7afa74804bea3e01b6662
7
- data.tar.gz: 75c0eb28a83ed7e71cf5dbc2b70319fa91559e16e361574446431c37688da6e05af45c47fd34123ec5c747c10f9c90fbdbad93a7cae123426f938c4e84f248f7
6
+ metadata.gz: 706ce33cc84d6423d6ed5a120a38dfe84c3aa1515b448fe8521ebb393104e43d541e94fe67dd5105c66b8a022920fa976af00cee7a0b5382ab49351f93da4644
7
+ data.tar.gz: 967829013d91f08dc944a3ecc1d176a95ccf988af3148e0aa142c38a3949a0b9cf21ad7a35464acdf1cb1b76b010d2e1f525298a5e4217ba00e399d633cdea3f
@@ -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.3.2'.freeze
2
+ VERSION = '4.3.3'.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.3.2
4
+ version: 4.3.3
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: 2022-06-01 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
@@ -555,6 +555,7 @@ files:
555
555
  - app/models/spree/order/emails.rb
556
556
  - app/models/spree/order/payments.rb
557
557
  - app/models/spree/order/store_credit.rb
558
+ - app/models/spree/order_contents.rb
558
559
  - app/models/spree/order_inventory.rb
559
560
  - app/models/spree/order_merger.rb
560
561
  - app/models/spree/order_promotion.rb
@@ -1195,9 +1196,9 @@ licenses:
1195
1196
  - BSD-3-Clause
1196
1197
  metadata:
1197
1198
  bug_tracker_uri: https://github.com/spree/spree/issues
1198
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.3.2
1199
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.3.3
1199
1200
  documentation_uri: https://dev-docs.spreecommerce.org/
1200
- source_code_uri: https://github.com/spree/spree/tree/v4.3.2
1201
+ source_code_uri: https://github.com/spree/spree/tree/v4.3.3
1201
1202
  post_install_message:
1202
1203
  rdoc_options: []
1203
1204
  require_paths:
@@ -1213,7 +1214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1213
1214
  - !ruby/object:Gem::Version
1214
1215
  version: 1.8.23
1215
1216
  requirements: []
1216
- rubygems_version: 3.0.9
1217
+ rubygems_version: 3.5.3
1217
1218
  signing_key:
1218
1219
  specification_version: 4
1219
1220
  summary: The bare bones necessary for Spree