Class: SolidusEasypost::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
# File 'lib/solidus_easypost/configuration.rb', line 9

def initialize
  self.purchase_labels = true
  self.track_all_cartons = false
end

Instance Attribute Details

#parcel_dimension_calculator_classObject



24
25
26
27
# File 'lib/solidus_easypost/configuration.rb', line 24

def parcel_dimension_calculator_class
  @parcel_dimension_calculator_class ||= 'SolidusEasypost::Calculator::WeightDimensionCalculator'
  @parcel_dimension_calculator_class.constantize
end

#purchase_labelsObject

Returns the value of attribute purchase_labels.



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

def purchase_labels
  @purchase_labels
end

#shipping_method_selector_classObject



19
20
21
22
# File 'lib/solidus_easypost/configuration.rb', line 19

def shipping_method_selector_class
  @shipping_method_selector_class ||= 'SolidusEasypost::ShippingMethodSelector'
  @shipping_method_selector_class.constantize
end

#shipping_rate_calculator_classObject



14
15
16
17
# File 'lib/solidus_easypost/configuration.rb', line 14

def shipping_rate_calculator_class
  @shipping_rate_calculator_class ||= 'SolidusEasypost::ShippingRateCalculator'
  @shipping_rate_calculator_class.constantize
end

#track_all_cartonsObject

Returns the value of attribute track_all_cartons.



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

def track_all_cartons
  @track_all_cartons
end

#webhook_handler_classObject



29
30
31
32
# File 'lib/solidus_easypost/configuration.rb', line 29

def webhook_handler_class
  @webhook_handler_class ||= 'SolidusEasypost::TrackerWebhookHandler'
  @webhook_handler_class.constantize
end