app/models/spree/shipment_decorator.rb
def generate_label!
    raise Spree::ShippingLabels::Error, 'Cannot generate a label without a package type' unless package_type
    raise Spree::ShippingLabels::Error, 'Cannot generate a label without a label-able selected shipping method' unless calculator
    # Restrict to just 5 seconds to get response to avoid appearing slow
    timeout 10 do
      package_type.provider.generate_label! calculator.preferred_service_type, package_type, self
    end
  end
# Will interact with the provider to actually generate a label. The resulting
# image and other data will be assigned to the related label object.
Will interact with the provider to actually generate a label. The resulting
image and other data will be assigned to the related label object.
Will interact with the provider to actually generate a label . The resulting image and other data will be assigned to the related label object .
def generate_label!
    raise Spree::ShippingLabels::Error, 'Cannot generate a label without a package type' unless package_type
    raise Spree::ShippingLabels::Error, 'Cannot generate a label without a label-able selected shipping method' unless calculator
    timeout 10 do
      package_type.provider.generate_label! calculator.preferred_service_type, package_type, self
    end
  end
def generate_label! raise Spree :: ShippingLabels :: Error , 'Cannot generate a label without a package type' unless package_type raise Spree :: ShippingLabels :: Error , 'Cannot generate a label without a label-able selected shipping method' unless calculator timeout 10 do package_type . provider . generate_label! calculator . preferred_service_type , package_type , self end end
Will interact with the provider to actually generate a label.
Will interact with the provider to actually generate a label .
# Restrict to just 5 seconds to get response to avoid appearing slow