var Backbone = require('backbone'),
    ItemInCart = require('./itemInCart'),
    Globals = require('../globals');

var ItemInCartCollection = Backbone.Collection.extend({

    initialize: function() {
        $.ajaxPrefilter(
            function(options, originalOptions, jqXHR) {
                options.xhrFields = {
                    withCredentials: true
                }
            }
        );
    },

    model: ItemInCart,
    url: Globals.ApiUrl + '/cart/item'


});

module.exports = ItemInCartCollection;