         order:
           coupon_code: code
 
-      @put("apply_coupon_code", params)
+      service._request("/api/orders/#{Cart.current.number}/apply_coupon_code", params)
 
     update: ->
       order = Cart.current


      ga "ecommerce:send"

    put: (path, params) ->
      params ||= {}

      config =
        headers:
          'X-Spree-Order-Token': Cart.current.token

      url = _.compact(["/api/checkouts", Cart.current.number, path]).join("/")
      Cart.current.errors = null

      $http.put(url, $.param(params), config)
           .success (response) ->
             Cart.load(response) unless response.error
           .error (response) ->
             Cart.errors(response.errors || response.exception)

    _findPaymentMethodId: ->
      paymentMethod = _.find Env.config.payment_methods, (method) -> method.name == 'Credit Card'

        params['order[shipments_attributes][][id]'] = order.shipment.id
        params['order[shipments_attributes][][selected_shipping_rate_id]'] = order.shippingRate.id

      @put(params)

    complete: ->
      order = Cart.current
