Class: SolidusShipstation::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/solidus_shipstation/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_sizeObject

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_keyObject

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_secretObject

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_matcherObject

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_serializerObject

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_thresholdObject

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_notificationObject

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_handlerObject

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_shipmentsObject

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

#passwordObject

Returns the value of attribute password.



5
6
7
# File 'lib/solidus_shipstation/configuration.rb', line 5

def password
  @password
end

#shipment_notice_classObject

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_encryptedObject

Returns the value of attribute ssl_encrypted.



5
6
7
# File 'lib/solidus_shipstation/configuration.rb', line 5

def ssl_encrypted
  @ssl_encrypted
end

#usernameObject

Returns the value of attribute username.



5
6
7
# File 'lib/solidus_shipstation/configuration.rb', line 5

def username
  @username
end

#weight_unitsObject

Returns the value of attribute weight_units.



5
6
7
# File 'lib/solidus_shipstation/configuration.rb', line 5

def weight_units
  @weight_units
end