 		@orderForm = undefined
 		@orderFormId = undefined
 		@_requestingItem = undefined
+		@_requestingSelectableGifts = undefined
 		@_subjectToJqXHRMap = {}
 		@_allOrderFormSections =
 			[

	_getUpdateItemURL: =>
		@_getOrderFormURL() + '/items/update/'

	_getRemoveGiftRegistryURL: =>
		@_getBaseOrderFormURL() + "/giftRegistry/#{@_getOrderFormId()}/remove"


		.done(@_cacheOrderForm)
		.done(broadcastOrderForm)

	# Sends a request to select an available gift
	updateSelectableGifts: (list, selectedGifts, expectedOrderFormSections = @_allOrderFormSections) =>
		updateSelectableGiftsRequest =
			id: list
			selectedGifts: selectedGifts
			expectedOrderFormSections: expectedOrderFormSections

		if @_requestingSelectableGifts isnt undefined
			@_requestingSelectableGifts.abort()

		return @_requestingSelectableGifts = @ajax
			url: @_getUpdateSelectableGifts(list)
			type: 'POST'
			contentType: 'application/json; charset=utf-8'
			dataType: 'json'
			data: JSON.stringify(updateSelectableGiftsRequest)
		.done(=> @_requestingSelectableGifts = undefined)
		.done(@_cacheOrderForm)
		.done(broadcastOrderForm)

	# Sends a request to remove items from the OrderForm.
	removeItems: (items, expectedOrderFormSections = @_allOrderFormSections) =>
		item.quantity = 0 for item in items
