lib/erp_integration.rb in erp_integration-0.2.0 vs lib/erp_integration.rb in erp_integration-0.3.0
- old
+ new
@@ -1,24 +1,28 @@
# frozen_string_literal: true
require 'active_support'
require 'active_support/core_ext/string/inflections'
+require 'active_support/core_ext/module/delegation' # Allows using `delegate`
+require 'active_support/core_ext/module/attribute_accessors' # Allows using `delegate_missing_to`
require 'faraday'
+require 'faraday_middleware'
require 'json'
require_relative 'erp_integration/version'
require_relative 'erp_integration/errors'
require_relative 'erp_integration/configuration'
# Middleware
require_relative 'erp_integration/middleware/error_handling'
-# Resources
-require_relative 'erp_integration/resource'
-require_relative 'erp_integration/order'
-
# HTTP clients
-require_relative 'erp_integration/clients/fulfil_client'
+require_relative 'erp_integration/fulfil/client'
# The `ErpIntegration` integrates Mejuri with third-party ERP vendors.
module ErpIntegration
+ # Resources
+ autoload :Resource, 'erp_integration/resource'
+ autoload :Order, 'erp_integration/order'
+ autoload :PurchaseOrder, 'erp_integration/purchase_order'
+ autoload :PurchaseOrderLine, 'erp_integration/purchase_order_line'
end