<commit_before>﻿(function (models, undefined) {

    models.shippingCountry = function (shippingCountryFromServer) {
        
        var self = this;

        if (shippingRegionFromServer == undefined) {
            self.key = "";
            self.name = "";
            self.shippingMethods = [];
        } else {
            self.key = shippingCountryFromServer.key;
            self.name = shippingCountryFromServer.name;
            self.shippingMethods = _.map(shippingCountryFromServer, function (attribute) {
                return new merchello.Models.shippingMethod(attribute);
            });
        }

    };

    models.ShippingMethod = function (shippingMethodFromServer) {

        var self = this;

        if (shippingMethodFromServer == undefined) {
            self.key = "";
            self.name = "";
            self.warehousesSupported = [];
            var 
        } else {

        }

    };

    models.Warehouse = function (warehouseFromServer) {<commit_msg>First draft of Shipping-related models in shipping.models.js, currently without associated methods.<commit_after>﻿(function (models, undefined) {

    models.ShippingCountry = function (shippingCountryFromServer) {
        
        var self = this;

        if (shippingRegionFromServer == undefined) {
            self.key = "";
            self.name = "";
            self.shippingMethods = [];
        } else {
            self.key = shippingCountryFromServer.key;
            self.name = shippingCountryFromServer.name;
            self.shippingMethods = _.map(shippingCountryFromServer, function (attribute) {
                return new merchello.Models.ShippingMethod(attribute);
            });
        }

    };

    models.ShippingMethod = function (shippingMethodFromServer) {

        var self = this;

        if (shippingMethodFromServer == undefined) {
            self.key = "";
            self.name = "";
            self.areWarehousesSupported = [];
            self.type = "";
            self.minVariance = 0;
            self.maxVariance = 0;
            self.cost = 0;
            self.shippingRegions = [];
        } else {
            self.key = shippingMethodFromServer.key;
            self.name = shippingMethodFromServer.name;
            self.areWarehousesSupported = shippingMethodFromServer.areWarehousesSupported;
            self.type = shippingMethodFromServer.type;
            self.minVariance = shippingMethodFromServer.minVariance;
            self.maxVariance = shippingMethodFromServer.maxVariance;
            self.cost = shippingMethodFromServer.cost;
            self.shippingRegions = _.map(shippingMethodFromServer, function (attribute) {
                return new merchello.Models.ShippingRegion(attribute);
            });
        }

    };

    models.ShippingRegion = function (shippingRegionFromServer) {

        var self = this;

        if (shippingRegionFromServer == undefined) {
            self.key = "";
            self.name = "";
            self.adjustRate = 0;
            self.finalRate = 0;
        } else {
            self.key = shippingRegionFromServer.key;
            self.name = shippingRegionFromServer.name;
            self.adjustRate = shippingRegionFromServer.adjustRate;
            self.finalRate = shippingRegionFromServer.finalRate;
        };

    };

    models.Warehouse = function (warehouseFromServer) {
{'fraction_non_alphanumeric': 0.09537914691943128, 'fraction_numerical': 0.001481042654028436, 'mean_word_length': 1.944202266782912, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7490538', 'n_tokens_mistral': 876, 'n_tokens_neox': 840, 'n_words': 150}