 
 		return xhr
 
+	# Sends a request to set the used locale.
+	# @param locale [String] the locale string, e.g. "pt-BR", "en-US".
+	# @return [Promise] a promise for the success.
 	sendLocale: (locale='pt-BR') =>
-		attachmentId = 'clientPreferencesData';
-		serializedAttachment = JSON.stringify(locale: locale)
-		@sendAttachment(attachmentId, serializedAttachment, [])
-
-	addOfferingWithInfo: (offeringId, offeringInfo, itemIndex, expectedOrderFormSections) =>
+		@sendAttachment('clientPreferencesData', {locale: locale}, [])
+
+	# Sends a request to add an offering, along with its info, to the OrderForm.
+	# @param offeringId [String, Number] the id of the offering.
+	# @param offeringInfo
+	# @param itemIndex [Number] the index of the item for which the offering applies.
+	# @param expectedOrderFormSections [Array] (default = *all*) an array of attachment names.
+	# @return [Promise] a promise for the updated OrderForm.
+	addOfferingWithInfo: (offeringId, offeringInfo, itemIndex, expectedOrderFormSections = @allOrderFormSections) =>
 		updateItemsRequest =
 			id: offeringId
 			info: offeringInfo
-			expectedOrderFormSections: expectedOrderFormSections ? @expectedFormSections
+			expectedOrderFormSections: expectedOrderFormSections
 
 		@ajax
 			url: @_getAddOfferingsURL(itemIndex)

			dataType: 'json'
			data: JSON.stringify removeAccountIdRequest

	getChangeToAnonymousUserURL: =>
		@HOST_URL + '/checkout/changeToAnonymousUser/' + @_getOrderFormId()

	#
	# PRIVATE
	#

	_getOrderFormId: =>
		@_getOrderFormIdFromCookie() or @_getOrderFormIdFromURL() or ''

	_getOrderFormIdFromCookie: =>
		COOKIE_NAME = 'checkout.vtex.com'
		COOKIE_ORDER_FORM_ID_KEY = '__ofid'

			dataType: 'json'
			data: JSON.stringify clearMessagesRequest

	# Sends a request to remove a payment account from the OrderForm.
	# @param accountId [String] the ID of the payment account.
	# @return [Promise] a promise for the success.
	removeAccountId: (accountId) =>
		removeAccountIdRequest = { expectedOrderFormSections: [] }
		@ajax
