Sha256: 6c54c49a85bd9d7bd10fb4deb6faccf135e9fa9c7df1465275a2c80b7df6e346

Contents?: true

Size: 412 Bytes

Versions: 9

Compression:

Stored size: 412 Bytes

Contents

Spree::Api::V1::ShipmentsController.class_eval do
  def ship
    unless @shipment.tracking.present?
      # We should enforce entering tracking details, otherwise shipments cannot
      # be created through Mollie.
      unprocessable_entity('Please fill in your tracking details')
      return
    end
    @shipment.ship! unless @shipment.shipped?
    respond_with(@shipment, default_template: :show)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree_mollie_gateway-3.2.1 app/controllers/spree/api/v1/shipments_controller_decorator.rb
spree_mollie_gateway-3.2.0 app/controllers/spree/api/v1/shipments_controller_decorator.rb
spree_mollie_gateway-3.1.0 app/controllers/spree/api/v1/shipments_controller_decorator.rb
spree_mollie_gateway-3.0.4 app/controllers/spree/api/v1/shipments_controller_decorator.rb
spree_mollie_gateway-3.0.3 app/controllers/spree/api/v1/shipments_controller_decorator.rb
spree_mollie_gateway-3.0.2 app/controllers/spree/api/v1/shipments_controller_decorator.rb
spree_mollie_gateway-3.0.1 app/controllers/spree/api/v1/shipments_controller_decorator.rb
spree_mollie_gateway-3.0.0 app/controllers/spree/api/v1/shipments_controller_decorator.rb
spree_mollie_gateway-3.0.0.pre.beta app/controllers/spree/api/v1/shipments_controller_decorator.rb