Class: SolidusShipstation::Configuration
- Inherits:
-
Object
- Object
- SolidusShipstation::Configuration
- Defined in:
- lib/solidus_shipstation/configuration.rb
Instance Attribute Summary collapse
-
#api_batch_size ⇒ Object
Returns the value of attribute api_batch_size.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_secret ⇒ Object
Returns the value of attribute api_secret.
-
#api_shipment_matcher ⇒ Object
Returns the value of attribute api_shipment_matcher.
-
#api_shipment_serializer ⇒ Object
Returns the value of attribute api_shipment_serializer.
-
#api_sync_threshold ⇒ Object
Returns the value of attribute api_sync_threshold.
-
#capture_at_notification ⇒ Object
Returns the value of attribute capture_at_notification.
-
#error_handler ⇒ Object
Returns the value of attribute error_handler.
-
#export_canceled_shipments ⇒ Object
Returns the value of attribute export_canceled_shipments.
-
#password ⇒ Object
Returns the value of attribute password.
-
#shipment_notice_class ⇒ Object
Returns the value of attribute shipment_notice_class.
-
#ssl_encrypted ⇒ Object
Returns the value of attribute ssl_encrypted.
-
#username ⇒ Object
Returns the value of attribute username.
-
#weight_units ⇒ Object
Returns the value of attribute weight_units.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/solidus_shipstation/configuration.rb', line 22 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 |shipstation_order, shipments| shipments.find { |shipment| shipment.number == shipstation_order['orderNumber'] } end @shipment_notice_class = 'SolidusShipstation::ShipmentNotice' end |
Instance Attribute Details
#api_batch_size ⇒ Object
Returns the value of attribute api_batch_size.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def api_batch_size @api_batch_size end |
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def api_key @api_key end |
#api_secret ⇒ Object
Returns the value of attribute api_secret.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def api_secret @api_secret end |
#api_shipment_matcher ⇒ Object
Returns the value of attribute api_shipment_matcher.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def api_shipment_matcher @api_shipment_matcher end |
#api_shipment_serializer ⇒ Object
Returns the value of attribute api_shipment_serializer.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def api_shipment_serializer @api_shipment_serializer end |
#api_sync_threshold ⇒ Object
Returns the value of attribute api_sync_threshold.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def api_sync_threshold @api_sync_threshold end |
#capture_at_notification ⇒ Object
Returns the value of attribute capture_at_notification.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def capture_at_notification @capture_at_notification end |
#error_handler ⇒ Object
Returns the value of attribute error_handler.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def error_handler @error_handler end |
#export_canceled_shipments ⇒ Object
Returns the value of attribute export_canceled_shipments.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def export_canceled_shipments @export_canceled_shipments end |
#password ⇒ Object
Returns the value of attribute password.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def password @password end |
#shipment_notice_class ⇒ Object
Returns the value of attribute shipment_notice_class.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def shipment_notice_class @shipment_notice_class end |
#ssl_encrypted ⇒ Object
Returns the value of attribute ssl_encrypted.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def ssl_encrypted @ssl_encrypted end |
#username ⇒ Object
Returns the value of attribute username.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def username @username end |
#weight_units ⇒ Object
Returns the value of attribute weight_units.
5 6 7 |
# File 'lib/solidus_shipstation/configuration.rb', line 5 def weight_units @weight_units end |