Class: Spree::Calculator::Shipping::DigitalDelivery
Class Method Summary
collapse
Instance Method Summary
collapse
#compute_shipment
calculators, #compute, #description, #to_s
Class Method Details
.description ⇒ Object
9
10
11
|
# File 'app/models/spree/calculator/shipping/digital_delivery.rb', line 9
def self.description
Spree.t('digital.digital_delivery')
end
|
Instance Method Details
#available?(package) ⇒ Boolean
17
18
19
|
# File 'app/models/spree/calculator/shipping/digital_delivery.rb', line 17
def available?(package)
package.contents.all? { |content| content.variant.digital? }
end
|
#compute_package(_package = nil) ⇒ Object
13
14
15
|
# File 'app/models/spree/calculator/shipping/digital_delivery.rb', line 13
def compute_package(_package = nil)
preferred_amount
end
|