Sha256: ebd3d2053c96b4513fcc42a81a0fecbc526b3ddbbb563e4d8ee24b151f69d3c3
Contents?: true
Size: 1.44 KB
Versions: 6
Compression:
Stored size: 1.44 KB
Contents
# frozen_string_literal: true module SolidusBacktracs class Configuration attr_accessor( :webhook_username, :webhook_password, :weight_units, :ssl_encrypted, :capture_at_notification, :export_canceled_shipments, :api_batch_size, :api_sync_threshold, :api_shipment_serializer, :api_key, :api_secret, :api_shipment_matcher, :error_handler, :shipment_notice_class, :authentication_username, :authentication_password, :api_base, :api_retries, :proxy_address, :proxy_port, :proxy_username, :proxy_password, :default_carrier, :default_ship_method, :default_rp_location, :default_status, :default_property_name, :sku_map, :default_rma_type, :shippable_skus ) def initialize @api_batch_size = 100 @api_sync_threshold = 7.days @error_handler = ->(_error, _extra = {}) { Rails.logger.error "#{error.inspect} (#{extra.inspect})" } @api_shipment_matcher = proc do |backtracs_order, shipments| shipments.find { |shipment| shipment.number == backtracs_order['orderNumber'] } end @shipment_notice_class = 'SolidusBacktracs::ShipmentNotice' end end class << self def configuration @configuration ||= Configuration.new end alias config configuration def configure yield configuration end end end
Version data entries
6 entries across 6 versions & 2 rubygems