addBasketColumns
BasketColumn[] addBasketColumns(SessionId sessionId, BasketColumn[] columns)
throws BasketServiceFault;
See also: BasketColumn, SessionId, BasketServiceFault
Add zero or more columns to the basket of the specified session.
The columns, and their initial configuration, are specified by parameter columns.
If the id attribute of a column is an empty string or the NIL UUID, then a random UUID will be generated for this column.
The type attribute must be specified and must not be Undefined or Builtin.
The itemAttrId attribute should be left unspecified. If specified, it must be UserDefined.
The defaultColumn attribute, if specified, must be either an empty string or a properly formatted UUID. If not specified or an empty string it will be replaced by the NIL UUID. The NIL UUID is used to indicate that there is no default column.
The readOnly attribute, if not specified, defaults to false.
The name and title elements must be both present and contain non-empty strings.
The defaultValue element, if not present, defaults to an empty string.
It is an error if the defaultColumn attribute contains an UUID other than the NIL UUID, and the defaultValue element contains a non-empty string.
Columns are added, one after another, in the order they appear in the columns parameter. If addition of a column fails, then all columns added so far by this operation are removed again, and the operation fails.
Possible reasons for the addition of a column to fail are:
-
There is already a column with the same ID.
-
A non-NIL default column ID has been specified, and there is no column with this ID.
If the operation succeeds, it returns information about all added columns. The number and order of elements in the return value is the same as in parameter columns. The information returned is the same as would be returned for the same columns by operation getBasketColumns (§getBasketColumns).
The operation fails with a BasketServiceFault if
-
The session ID is not a properly formatted UUID.
-
The session ID does not reference an existing session.
-
For any of the error conditions described above.