flowcommerce_spree 0.0.1 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +101 -24
- data/SPREE_FLOW.md +6 -28
- data/app/controllers/concerns/current_zone_loader_decorator.rb +40 -25
- data/app/controllers/flowcommerce_spree/inventory_controller.rb +23 -0
- data/app/controllers/flowcommerce_spree/orders_controller.rb +20 -0
- data/app/controllers/flowcommerce_spree/webhooks_controller.rb +23 -13
- data/app/controllers/users/sessions_controller_decorator.rb +28 -0
- data/app/helpers/spree/core/controller_helpers/flow_io_order_helper_decorator.rb +4 -9
- data/app/models/spree/address_decorator.rb +19 -0
- data/app/models/spree/app_configuration_decorator.rb +7 -0
- data/app/models/spree/calculator/flow_io.rb +61 -0
- data/app/models/spree/calculator/shipping/flow_io.rb +40 -0
- data/app/models/spree/flow_io_credit_card_decorator.rb +21 -0
- data/app/models/spree/flow_io_order_decorator.rb +163 -0
- data/app/models/spree/flow_io_product_decorator.rb +2 -2
- data/app/models/spree/flow_io_variant_decorator.rb +4 -2
- data/app/models/spree/gateway/flow_io.rb +153 -0
- data/app/models/spree/{credit_card_decorator.rb → payment_capture_event_decorator.rb} +1 -1
- data/app/models/spree/promotion_handler/coupon_decorator.rb +1 -1
- data/app/models/spree/zones/flow_io_product_zone_decorator.rb +8 -0
- data/app/models/tracking/setup_decorator.rb +40 -0
- data/app/overrides/spree/admin/order_sidebar_summary_flow_link.rb +13 -0
- data/app/overrides/spree/admin/products/order_price_flow_message.rb +9 -0
- data/app/serializers/api/v2/order_serializer_decorator.rb +20 -0
- data/app/services/flowcommerce_spree/import_experience_items.rb +1 -1
- data/app/services/flowcommerce_spree/order_sync.rb +81 -173
- data/app/services/flowcommerce_spree/order_updater.rb +78 -0
- data/app/services/flowcommerce_spree/webhooks/capture_upserted_v2.rb +76 -0
- data/app/services/flowcommerce_spree/webhooks/card_authorization_upserted_v2.rb +66 -0
- data/app/services/flowcommerce_spree/webhooks/experience_upserted_v2.rb +25 -0
- data/app/services/flowcommerce_spree/webhooks/fraud_status_changed.rb +35 -0
- data/app/services/flowcommerce_spree/webhooks/local_item_upserted.rb +40 -0
- data/app/views/spree/admin/payments/source_views/_flow_io_gateway.html.erb +21 -0
- data/config/rails_best_practices.yml +51 -0
- data/config/routes.rb +3 -1
- data/db/migrate/20201021755957_add_meta_to_spree_tables.rb +6 -4
- data/lib/flow/simple_gateway.rb +0 -36
- data/lib/flowcommerce_spree.rb +17 -3
- data/lib/flowcommerce_spree/engine.rb +33 -3
- data/lib/flowcommerce_spree/experience_service.rb +1 -27
- data/lib/flowcommerce_spree/logging_http_client.rb +33 -15
- data/lib/flowcommerce_spree/session.rb +16 -29
- data/lib/flowcommerce_spree/test_support.rb +7 -0
- data/lib/flowcommerce_spree/version.rb +1 -1
- data/lib/tasks/flowcommerce_spree.rake +4 -1
- metadata +90 -22
- data/app/mailers/spree/spree_order_mailer_decorator.rb +0 -24
- data/app/models/spree/gateway/spree_flow_gateway.rb +0 -116
- data/app/models/spree/line_item_decorator.rb +0 -15
- data/app/models/spree/order_decorator.rb +0 -179
- data/app/views/spree/order_mailer/confirm_email.html.erb +0 -86
- data/app/views/spree/order_mailer/confirm_email.text.erb +0 -38
- data/config/initializers/flowcommerce_spree.rb +0 -7
- data/lib/flow/error.rb +0 -73
- data/lib/flow/pay_pal.rb +0 -25
- data/lib/flowcommerce_spree/webhook_service.rb +0 -98
- data/lib/simple_csv_writer.rb +0 -44
data/lib/flowcommerce_spree.rb
CHANGED
@@ -1,16 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'activerecord-postgres-json'
|
4
|
+
require 'active_model_serializers'
|
3
5
|
require 'flowcommerce'
|
4
6
|
require 'flowcommerce_spree/api'
|
5
7
|
require 'flowcommerce_spree/refresher'
|
6
8
|
require 'flowcommerce_spree/engine'
|
7
9
|
require 'flowcommerce_spree/logging_http_client'
|
8
10
|
require 'flowcommerce_spree/logging_http_handler'
|
9
|
-
require 'flowcommerce_spree/webhook_service'
|
10
11
|
require 'flowcommerce_spree/session'
|
11
12
|
require 'flow/simple_gateway'
|
13
|
+
require 'oj'
|
12
14
|
|
13
15
|
module FlowcommerceSpree
|
16
|
+
API_KEY = ENV.fetch('FLOW_TOKEN', 'test_key')
|
17
|
+
ENV['FLOW_TOKEN'] = API_KEY
|
18
|
+
|
14
19
|
def self.client(logger: FlowcommerceSpree.logger, **opts)
|
15
20
|
FlowCommerce.instance(http_handler: LoggingHttpHandler.new(logger: logger), **opts)
|
16
21
|
end
|
@@ -20,11 +25,20 @@ module FlowcommerceSpree
|
|
20
25
|
end
|
21
26
|
|
22
27
|
def self.logger
|
23
|
-
logger = ActiveSupport::Logger.new(STDOUT
|
28
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
29
|
+
|
30
|
+
logger_formatter = proc do |severity, datetime, _progname, msg|
|
31
|
+
"\n#{datetime}, #{severity}: #{msg}\n"
|
32
|
+
end
|
33
|
+
|
34
|
+
logger.formatter = logger_formatter
|
24
35
|
|
25
36
|
# Broadcast the log into the file besides STDOUT, if `log` folder exists
|
26
37
|
if Dir.exist?('log')
|
27
|
-
|
38
|
+
file_logger = ActiveSupport::Logger.new('log/flowcommerce_spree.log', 3, 10_485_760)
|
39
|
+
file_logger.formatter = logger_formatter
|
40
|
+
|
41
|
+
logger.extend(ActiveSupport::Logger.broadcast(file_logger))
|
28
42
|
end
|
29
43
|
logger
|
30
44
|
end
|
@@ -6,22 +6,52 @@ module FlowcommerceSpree
|
|
6
6
|
isolate_namespace FlowcommerceSpree
|
7
7
|
|
8
8
|
config.before_initialize do
|
9
|
+
FlowcommerceSpree::ORGANIZATION = ENV.fetch('FLOW_ORGANIZATION', 'flow.io')
|
10
|
+
FlowcommerceSpree::BASE_COUNTRY = ENV.fetch('FLOW_BASE_COUNTRY', 'USA')
|
11
|
+
FlowcommerceSpree::API_KEY = ENV.fetch('FLOW_TOKEN', 'test_key')
|
12
|
+
FlowcommerceSpree::FLOW_IO_WEBHOOK_USER = ENV.fetch('FLOW_IO_WEBHOOK_USER', 'test_user')
|
13
|
+
FlowcommerceSpree::FLOW_IO_WEBHOOK_PASSWORD = ENV.fetch('FLOW_IO_WEBHOOK_PASSWORD', 'test_password')
|
14
|
+
|
9
15
|
FlowcommerceSpree::Config = FlowcommerceSpree::Settings.new
|
10
16
|
end
|
11
17
|
|
12
|
-
config.
|
18
|
+
config.flowcommerce_spree = ActiveSupport::OrderedOptions.new
|
19
|
+
|
20
|
+
initializer 'flowcommerce_spree.configuration' do |app|
|
21
|
+
# If some Rake tasks will fail in development environment, the cause could be the autoloading.
|
22
|
+
# Uncommenting the following 3 lines will enable eager-loading for the flowcommerce_spree Rake tasks.
|
23
|
+
# if Rails.env.development?
|
24
|
+
# app.config.eager_load = Rake.application.top_level_tasks.any? { |t| t.start_with?('flowcommerce_spree') }
|
25
|
+
# end
|
26
|
+
|
27
|
+
app.config.flowcommerce_spree[:mounted_path] = ENV.fetch('FLOW_MOUNT_PATH', '/flow')
|
28
|
+
|
29
|
+
app.routes.prepend do
|
30
|
+
mount FlowcommerceSpree::Engine => app.config.flowcommerce_spree[:mounted_path]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
config.after_initialize do |app|
|
13
35
|
# init Flow payments as an option
|
14
|
-
|
36
|
+
app.config.spree.payment_methods << Spree::Gateway::FlowIo
|
15
37
|
|
16
|
-
Flow::SimpleGateway.clear_zero_amount_payments = true
|
38
|
+
# Flow::SimpleGateway.clear_zero_amount_payments = true
|
17
39
|
end
|
18
40
|
|
19
41
|
def self.activate
|
20
42
|
Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')).sort.each do |c|
|
21
43
|
Rails.configuration.cache_classes ? require(c) : load(c)
|
22
44
|
end
|
45
|
+
Dir.glob(File.join(File.dirname(__FILE__), '../app/overrides/*.rb')).sort.each do |c|
|
46
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
47
|
+
end
|
23
48
|
end
|
24
49
|
|
25
50
|
config.to_prepare(&method(:activate).to_proc)
|
51
|
+
|
52
|
+
initializer 'spree.flowcommerce_spree.calculators', after: 'spree.register.calculators' do |_app|
|
53
|
+
Rails.application.config.spree.calculators.tax_rates << Spree::Calculator::FlowIo
|
54
|
+
Rails.application.config.spree.calculators.shipping_methods << Spree::Calculator::Shipping::FlowIo
|
55
|
+
end
|
26
56
|
end
|
27
57
|
end
|
@@ -22,18 +22,6 @@ module FlowcommerceSpree
|
|
22
22
|
nil
|
23
23
|
end
|
24
24
|
|
25
|
-
def get_by_subcatalog_id(subcatalog_id)
|
26
|
-
fetch_from_flow.each do |experince|
|
27
|
-
return experince if experince.subcatalog.id == subcatalog_id
|
28
|
-
end
|
29
|
-
|
30
|
-
nil
|
31
|
-
end
|
32
|
-
|
33
|
-
def compact
|
34
|
-
all.map { |exp| [exp.country, exp.key, exp.name] }
|
35
|
-
end
|
36
|
-
|
37
25
|
def default
|
38
26
|
FlowcommerceSpree::ExperienceService
|
39
27
|
.all.select { |exp| exp.key.downcase == ENV.fetch('FLOW_BASE_COUNTRY').downcase }.first
|
@@ -42,24 +30,10 @@ module FlowcommerceSpree
|
|
42
30
|
private
|
43
31
|
|
44
32
|
def fetch_from_flow
|
45
|
-
|
46
|
-
|
47
|
-
experiences = FlowcommerceSpree.client.experiences.get ORGANIZATION
|
33
|
+
FlowcommerceSpree.client.experiences.get ORGANIZATION
|
48
34
|
|
49
35
|
# work with active axperiences only
|
50
36
|
# experiences = experiences.select { |it| it.status.value == 'active' }
|
51
|
-
|
52
|
-
# @cache = [experiences, Time.now]
|
53
|
-
experiences
|
54
|
-
end
|
55
|
-
|
56
|
-
def cache_valid?
|
57
|
-
# cache experinces in worker memory for 1 minute
|
58
|
-
@cache && @cache[1] > Time.now.ago(1.minute)
|
59
|
-
end
|
60
|
-
|
61
|
-
def cached_experinces
|
62
|
-
@cache[0]
|
63
37
|
end
|
64
38
|
end
|
65
39
|
end
|
@@ -14,30 +14,48 @@ module FlowcommerceSpree
|
|
14
14
|
# original_read = client.read_timeout
|
15
15
|
|
16
16
|
start_time = Time.now.utc.round(10)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
# client.open_timeout = 60
|
24
|
-
# client.read_timeout = 60
|
25
|
-
end
|
17
|
+
|
18
|
+
# Contrived example to show how client settings can be adjusted
|
19
|
+
# if request.path.start_with?('/organizations')
|
20
|
+
# client.open_timeout = 60
|
21
|
+
# client.read_timeout = 60
|
22
|
+
# end
|
26
23
|
|
27
24
|
begin
|
28
25
|
response = super
|
29
26
|
rescue Io::Flow::V0::HttpClient::ServerError => e
|
30
|
-
@error = { error: e }
|
27
|
+
@error = { error: Oj.load(e.body), code: e.code, status: e.details }
|
28
|
+
raise exception_to_raise(e), @error.dig(:error, 'messages')
|
31
29
|
ensure
|
32
30
|
# client.open_timeout = original_open
|
33
31
|
# client.read_timeout = original_read
|
34
32
|
|
35
|
-
|
36
|
-
duration = ((end_time - start_time) * 1000).round(0)
|
37
|
-
@logger.info "complete #{request.method} #{request.path} #{duration} ms"
|
38
|
-
@logger.info "response: #{response}"
|
39
|
-
@logger.info "Error: #{e.inspect}" if e
|
33
|
+
log_request(request, response, start_time)
|
40
34
|
end
|
41
35
|
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def exception_to_raise(flow_io_exception)
|
40
|
+
resource = flow_io_exception.uri.split('/').last
|
41
|
+
exception = case resource
|
42
|
+
when 'reversals', 'refunds'
|
43
|
+
'Spree::Core::GatewayError'
|
44
|
+
else
|
45
|
+
'StandardError'
|
46
|
+
end
|
47
|
+
exception.constantize
|
48
|
+
end
|
49
|
+
|
50
|
+
def log_request(request, response, start_time)
|
51
|
+
duration = ((Time.now.utc.round(10) - start_time) * 1000).round(0)
|
52
|
+
|
53
|
+
@logger.info("Started #{request.method} #{request.path}\n"\
|
54
|
+
"headers: #{request.instance_variable_get(:@header)}\nbody: #{request.body}\n"\
|
55
|
+
"response: #{response&.force_encoding('utf-8')}\n"\
|
56
|
+
"Completed #{request.method} #{request.path} #{duration} ms\n")
|
57
|
+
|
58
|
+
@logger.info "Error: #{@error.inspect}" if @error
|
59
|
+
end
|
42
60
|
end
|
43
61
|
end
|
@@ -5,25 +5,34 @@ module FlowcommerceSpree
|
|
5
5
|
class Session
|
6
6
|
attr_accessor :session, :localized, :visitor
|
7
7
|
|
8
|
-
def
|
8
|
+
def self.create(ip:, visitor:, experience: nil)
|
9
|
+
instance = new(ip: ip, visitor: visitor, experience: experience)
|
10
|
+
instance.create
|
11
|
+
instance
|
12
|
+
end
|
13
|
+
|
14
|
+
def initialize(ip:, visitor:, experience: nil)
|
9
15
|
ip = '127.0.0.1' if ip == '::1'
|
10
16
|
|
11
17
|
@ip = ip
|
12
18
|
@visitor = visitor
|
19
|
+
@experience = experience
|
13
20
|
end
|
14
21
|
|
15
|
-
# create session with
|
22
|
+
# create session without or with experience (the latter is useful for creating a new session with the order's
|
23
|
+
# experience on refreshing the checkout_token)
|
16
24
|
def create
|
17
25
|
data = { ip: @ip,
|
18
26
|
visit: { id: @visitor,
|
19
27
|
expires_at: (Time.now + 30.minutes).iso8601 } }
|
28
|
+
data[:experience] = @experience if @experience
|
20
29
|
|
21
30
|
session_model = ::Io::Flow::V0::Models::SessionForm.new data
|
22
31
|
@session = FlowCommerce.instance(http_handler: LoggingHttpHandler.new)
|
23
32
|
.sessions.post_organizations_by_organization(ORGANIZATION, session_model)
|
24
33
|
end
|
25
34
|
|
26
|
-
# if we want to
|
35
|
+
# if we want to manually switch to specific country or experience
|
27
36
|
def update(data)
|
28
37
|
@session = FlowCommerce.instance.sessions.put_by_session(@session.id,
|
29
38
|
::Io::Flow::V0::Models::SessionPutForm.new(data))
|
@@ -34,6 +43,10 @@ module FlowcommerceSpree
|
|
34
43
|
@session.local&.experience
|
35
44
|
end
|
36
45
|
|
46
|
+
def expires_at
|
47
|
+
@session.visit.expires_at
|
48
|
+
end
|
49
|
+
|
37
50
|
def local
|
38
51
|
@session.local
|
39
52
|
end
|
@@ -41,31 +54,5 @@ module FlowcommerceSpree
|
|
41
54
|
def id
|
42
55
|
@session.id
|
43
56
|
end
|
44
|
-
|
45
|
-
def localized?
|
46
|
-
# use flow if we are not in default country
|
47
|
-
return false unless local
|
48
|
-
return false if @localized.class == FalseClass
|
49
|
-
|
50
|
-
local.country.iso_3166_3 != ENV.fetch('FLOW_BASE_COUNTRY').upcase
|
51
|
-
end
|
52
|
-
|
53
|
-
# because we do not get full experience from session, we have to get from exp list
|
54
|
-
def delivered_duty_options
|
55
|
-
return nil unless experience
|
56
|
-
|
57
|
-
return unless (flow_experience = Flow::Experience.get(experience.key))
|
58
|
-
|
59
|
-
Hashie::Mash.new(flow_experience.settings.delivered_duty.to_hash)
|
60
|
-
end
|
61
|
-
|
62
|
-
# if we have more than one choice, we show choice popup
|
63
|
-
def offers_delivered_duty_choice?
|
64
|
-
if (options = delivered_duty_options)
|
65
|
-
options.available.length > 1
|
66
|
-
else
|
67
|
-
false
|
68
|
-
end
|
69
|
-
end
|
70
57
|
end
|
71
58
|
end
|
@@ -47,8 +47,11 @@ namespace :flowcommerce_spree do
|
|
47
47
|
|
48
48
|
while current_page == 0 || !variants.empty?
|
49
49
|
current_page += 1
|
50
|
-
variants = Spree::Variant.order('updated_at desc').page(current_page).per(100).all
|
51
50
|
|
51
|
+
products = Spree::Product.where.not(country_of_origin: nil)
|
52
|
+
.order('updated_at desc')
|
53
|
+
.page(current_page).per(50).includes(:variants_including_master)
|
54
|
+
variants = products.map(&:variants_including_master).flatten
|
52
55
|
variants.each do |variant|
|
53
56
|
total_sum += 1
|
54
57
|
result = variant.sync_product_to_flow
|
metadata
CHANGED
@@ -1,16 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flowcommerce_spree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aurel Branzeanu
|
8
8
|
- Sebastian De Luca
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-04-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: active_model_serializers
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - '='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 0.10.2
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 0.10.2
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: activerecord-postgres-json
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.2.3
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 0.2.3
|
14
42
|
- !ruby/object:Gem::Dependency
|
15
43
|
name: colorize
|
16
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -77,16 +105,16 @@ dependencies:
|
|
77
105
|
name: oj
|
78
106
|
requirement: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
|
-
- -
|
108
|
+
- - '='
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
110
|
+
version: 3.7.12
|
83
111
|
type: :runtime
|
84
112
|
prerelease: false
|
85
113
|
version_requirements: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
|
-
- -
|
115
|
+
- - '='
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
117
|
+
version: 3.7.12
|
90
118
|
- !ruby/object:Gem::Dependency
|
91
119
|
name: pg
|
92
120
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,6 +143,20 @@ dependencies:
|
|
115
143
|
- - "~>"
|
116
144
|
- !ruby/object:Gem::Version
|
117
145
|
version: 2.3.0
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
name: factory_bot_rails
|
148
|
+
requirement: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '4.0'
|
153
|
+
type: :development
|
154
|
+
prerelease: false
|
155
|
+
version_requirements: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '4.0'
|
118
160
|
- !ruby/object:Gem::Dependency
|
119
161
|
name: github_changelog_generator
|
120
162
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,6 +171,20 @@ dependencies:
|
|
129
171
|
- - ">="
|
130
172
|
- !ruby/object:Gem::Version
|
131
173
|
version: '0'
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: rspec-rails
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '3.5'
|
181
|
+
type: :development
|
182
|
+
prerelease: false
|
183
|
+
version_requirements: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '3.5'
|
132
188
|
description: Integration of popular Rails/Spree store framework with e-commerce Flow
|
133
189
|
API
|
134
190
|
email:
|
@@ -145,42 +201,55 @@ files:
|
|
145
201
|
- app/assets/javascripts/flowcommerce_spree/application.js
|
146
202
|
- app/assets/stylesheets/flowcommerce_spree/application.css
|
147
203
|
- app/controllers/concerns/current_zone_loader_decorator.rb
|
204
|
+
- app/controllers/flowcommerce_spree/inventory_controller.rb
|
205
|
+
- app/controllers/flowcommerce_spree/orders_controller.rb
|
148
206
|
- app/controllers/flowcommerce_spree/webhooks_controller.rb
|
207
|
+
- app/controllers/users/sessions_controller_decorator.rb
|
149
208
|
- app/helpers/flowcommerce_spree/application_helper.rb
|
150
209
|
- app/helpers/spree/admin/orders_helper_decorator.rb
|
151
210
|
- app/helpers/spree/core/controller_helpers/flow_io_order_helper_decorator.rb
|
152
|
-
- app/mailers/spree/spree_order_mailer_decorator.rb
|
153
211
|
- app/models/flowcommerce_spree/settings.rb
|
154
|
-
- app/models/spree/
|
212
|
+
- app/models/spree/address_decorator.rb
|
213
|
+
- app/models/spree/app_configuration_decorator.rb
|
214
|
+
- app/models/spree/calculator/flow_io.rb
|
215
|
+
- app/models/spree/calculator/shipping/flow_io.rb
|
216
|
+
- app/models/spree/flow_io_credit_card_decorator.rb
|
217
|
+
- app/models/spree/flow_io_order_decorator.rb
|
155
218
|
- app/models/spree/flow_io_product_decorator.rb
|
156
219
|
- app/models/spree/flow_io_variant_decorator.rb
|
157
|
-
- app/models/spree/gateway/
|
158
|
-
- app/models/spree/
|
159
|
-
- app/models/spree/order_decorator.rb
|
220
|
+
- app/models/spree/gateway/flow_io.rb
|
221
|
+
- app/models/spree/payment_capture_event_decorator.rb
|
160
222
|
- app/models/spree/promotion_decorator.rb
|
161
223
|
- app/models/spree/promotion_handler/coupon_decorator.rb
|
162
224
|
- app/models/spree/spree_user_decorator.rb
|
163
225
|
- app/models/spree/taxon_decorator.rb
|
164
226
|
- app/models/spree/zone_decorator.rb
|
165
227
|
- app/models/spree/zones/flow_io_product_zone_decorator.rb
|
228
|
+
- app/models/tracking/setup_decorator.rb
|
229
|
+
- app/overrides/spree/admin/order_sidebar_summary_flow_link.rb
|
230
|
+
- app/overrides/spree/admin/products/order_price_flow_message.rb
|
231
|
+
- app/serializers/api/v2/order_serializer_decorator.rb
|
166
232
|
- app/services/flowcommerce_spree/import_experience_items.rb
|
167
233
|
- app/services/flowcommerce_spree/import_experiences.rb
|
168
234
|
- app/services/flowcommerce_spree/order_sync.rb
|
235
|
+
- app/services/flowcommerce_spree/order_updater.rb
|
236
|
+
- app/services/flowcommerce_spree/webhooks/capture_upserted_v2.rb
|
237
|
+
- app/services/flowcommerce_spree/webhooks/card_authorization_upserted_v2.rb
|
238
|
+
- app/services/flowcommerce_spree/webhooks/experience_upserted_v2.rb
|
239
|
+
- app/services/flowcommerce_spree/webhooks/fraud_status_changed.rb
|
240
|
+
- app/services/flowcommerce_spree/webhooks/local_item_upserted.rb
|
169
241
|
- app/views/layouts/flowcommerce_spree/application.html.erb
|
170
242
|
- app/views/spree/admin/payments/index.html.erb
|
243
|
+
- app/views/spree/admin/payments/source_views/_flow_io_gateway.html.erb
|
171
244
|
- app/views/spree/admin/promotions/edit.html.erb
|
172
245
|
- app/views/spree/admin/shared/_order_summary.html.erb
|
173
246
|
- app/views/spree/admin/shared/_order_summary_flow.html.erb
|
174
|
-
-
|
175
|
-
- app/views/spree/order_mailer/confirm_email.text.erb
|
176
|
-
- config/initializers/flowcommerce_spree.rb
|
247
|
+
- config/rails_best_practices.yml
|
177
248
|
- config/routes.rb
|
178
249
|
- db/migrate/20201021160159_add_type_and_meta_to_spree_zone.rb
|
179
250
|
- db/migrate/20201021755957_add_meta_to_spree_tables.rb
|
180
251
|
- db/migrate/20201022173210_add_zone_type_to_spree_zone_members.rb
|
181
252
|
- db/migrate/20201022174252_add_kind_to_zone.rb
|
182
|
-
- lib/flow/error.rb
|
183
|
-
- lib/flow/pay_pal.rb
|
184
253
|
- lib/flow/simple_gateway.rb
|
185
254
|
- lib/flowcommerce_spree.rb
|
186
255
|
- lib/flowcommerce_spree/api.rb
|
@@ -190,15 +259,14 @@ files:
|
|
190
259
|
- lib/flowcommerce_spree/logging_http_handler.rb
|
191
260
|
- lib/flowcommerce_spree/refresher.rb
|
192
261
|
- lib/flowcommerce_spree/session.rb
|
262
|
+
- lib/flowcommerce_spree/test_support.rb
|
193
263
|
- lib/flowcommerce_spree/version.rb
|
194
|
-
- lib/flowcommerce_spree/webhook_service.rb
|
195
|
-
- lib/simple_csv_writer.rb
|
196
264
|
- lib/tasks/flowcommerce_spree.rake
|
197
265
|
homepage: https://github.com/mejuri-inc/flowcommerce_spree
|
198
266
|
licenses:
|
199
267
|
- MIT
|
200
268
|
metadata: {}
|
201
|
-
post_install_message:
|
269
|
+
post_install_message:
|
202
270
|
rdoc_options: []
|
203
271
|
require_paths:
|
204
272
|
- lib
|
@@ -213,8 +281,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
281
|
- !ruby/object:Gem::Version
|
214
282
|
version: '0'
|
215
283
|
requirements: []
|
216
|
-
rubygems_version: 3.
|
217
|
-
signing_key:
|
284
|
+
rubygems_version: 3.1.2
|
285
|
+
signing_key:
|
218
286
|
specification_version: 4
|
219
287
|
summary: Integration of Spree with Flow API
|
220
288
|
test_files: []
|