 			dataType: 'json'
 			data: JSON.stringify(updateItemsRequest)
 
-	updateItems: (itemsJS, expectedOrderFormSections = @expectedFormSections) =>
+	# Sends a request to update the items in the OrderForm.
+	# @param items [Array] an array of objects representing the items in the OrderForm.
+	# @param expectedOrderFormSections [Array] (default = *all*) an array of attachment names.
+	# @return [Promise] a promise for the updated OrderForm.
+	updateItems: (items, expectedOrderFormSections = @allOrderFormSections) =>
 		updateItemsRequest =
-			orderItems: itemsJS
+			orderItems: items
 			expectedOrderFormSections: expectedOrderFormSections
 
 		if @requestingItem isnt undefined
 			@requestingItem.abort()
-			console.log 'Abortando', @requestingItem
 
 		return @requestingItem = @ajax(
 			url: @_getUpdateItemURL()

			dataType: 'json'
			data: JSON.stringify couponCodeRequest

	removeDiscountCoupon: (expectedOrderFormSections) =>
		return @addDiscountCoupon('', expectedOrderFormSections)

	removeGiftRegistry: (expectedFormSections = @expectedFormSections) =>
		checkoutRequest = { expectedOrderFormSections: expectedFormSections }
		@ajax
			url: "/api/checkout/pub/orderForm/giftRegistry/#{@_getOrderFormId()}/remove"
			type: 'POST'
			contentType: 'application/json; charset=utf-8'
			dataType: 'json'
			data: JSON.stringify(checkoutRequest)

	calculateShipping: (address) =>
		shippingRequest = address: address
		return @sendAttachment('shippingData', JSON.stringify(shippingRequest))

	# Aceita um address com propriedades postalCode e country
	getAddressInformation: (address) =>
		@ajax
			url: @_getPostalCodeURL(address.postalCode, address.country)
			type: 'GET'
			timeout : 20000

	getProfileByEmail: (email, salesChannel) =>
		@ajax
			url: @_getProfileURL()
			type: 'GET'
			data: {email: email, sc: salesChannel}

	startTransaction: (value, referenceValue, interestValue, savePersonalData = false, optinNewsLetter = false, expectedOrderFormSections = @expectedFormSections) =>
		transactionRequest = {
			referenceId: @_getOrderFormId()
			savePersonalData: savePersonalData

			dataType: 'json',
			data: JSON.stringify(transactionRequest)

	# Sends a request to retrieve the orders for a specific orderGroupId.
	# @param orderGroupId [String] the ID of the order group.
	# @return [Promise] a promise for the orders.
	getOrders: (orderGroupId) =>
		@ajax
			url: @_getOrdersURL(orderGroupId)
