solidus-returnly 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/app/services/refund_methods.rb +7 -3
- data/lib/returnly/engine.rb +2 -1
- data/lib/returnly/refund_calculator.rb +2 -1
- data/lib/returnly/refunds_configuration.rb +4 -0
- data/lib/returnly/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0d71aa3fc918ca44c18793faf76d987bf02f6f7
|
4
|
+
data.tar.gz: dee66d85096e0b8ff6e934d8b2d256e8848727c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deb9e37418ecf8dac19d58a3fb6e93cc4c6efeb8e49f2cec3ea988604d194a1c3204edd8564f7bf4da566ceb1ab562b797728e52d1d123362bf8a7bb19dc525c
|
7
|
+
data.tar.gz: 980a0001ced5190de64c12b3a42370e9c4064ce3b0ae00d78300255688d1f5813d1b18a1dca3d0590e924466220cd0d20e202da36efa1dd2a6c58ba947a2b44a
|
data/README.md
CHANGED
@@ -194,6 +194,7 @@ Returnly.configure do |config|
|
|
194
194
|
config.refunder = CustomRefunder
|
195
195
|
config.refund_calculator = CustomRefunderCalculator
|
196
196
|
config.reimbursement_type_no_items = CustomOriginalPaymentNoItems
|
197
|
+
config.refund_presenter = CustomRefundPresenter
|
197
198
|
end
|
198
199
|
```
|
199
200
|
|
@@ -2,15 +2,19 @@ module RefundMethods
|
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
included do
|
4
4
|
class_attribute :eligible_refund_methods
|
5
|
-
self.eligible_refund_methods = whitelisted_refund_methods
|
5
|
+
self.eligible_refund_methods = whitelisted_refund_methods.empty? ? defined_refund_methods : whitelisted_refund_methods
|
6
6
|
end
|
7
7
|
|
8
8
|
class_methods do
|
9
9
|
def whitelisted_refund_methods
|
10
10
|
# Solidus 2.3.0 deprecates "Spree::Gateway::Bogus" and recommends using "Spree::PaymentMethod::BogusCreditCard" instead.
|
11
11
|
%w[Spree::Gateway::Bogus Spree::PaymentMethod::SimpleBogusCreditCard Spree::PaymentMethod::BogusCreditCard Spree::PaymentMethod::Check Spree::PaymentMethod::StoreCredit].inject([]) do |methods, payment_method|
|
12
|
-
|
13
|
-
|
12
|
+
begin
|
13
|
+
methods << payment_method.constantize
|
14
|
+
methods
|
15
|
+
rescue
|
16
|
+
methods
|
17
|
+
end
|
14
18
|
end
|
15
19
|
end
|
16
20
|
|
data/lib/returnly/engine.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
module Returnly
|
2
2
|
class RefundCalculator
|
3
3
|
attr_accessor :line_items, :order
|
4
|
+
extend ::Returnly::RefundsConfiguration
|
4
5
|
|
5
6
|
def self.process(order, line_items)
|
6
|
-
|
7
|
+
refund_presenter_class.present_estimate new(order, line_items)
|
7
8
|
end
|
8
9
|
|
9
10
|
def initialize(order, line_items)
|
data/lib/returnly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus-returnly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Returnly Technologies, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus
|
@@ -373,7 +373,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
373
373
|
version: '0'
|
374
374
|
requirements: []
|
375
375
|
rubyforge_project:
|
376
|
-
rubygems_version: 2.
|
376
|
+
rubygems_version: 2.6.11
|
377
377
|
signing_key:
|
378
378
|
specification_version: 4
|
379
379
|
summary: Returnly integration with Solidus
|