code: function (checkoutModel) {
  
          if (!checkoutModel) {
              return null;
          }
  
          var modelCopy = sofa.Util.clone(checkoutModel);
          var requestModel = {};
  
          if (modelCopy.billingAddress && modelCopy.billingAddress.country) {
              modelCopy.billingAddress.country = checkoutModel.billingAddress.country.value;
              modelCopy.billingAddress.countryLabel = checkoutModel.billingAddress.country.label;
              requestModel.invoiceAddress = JSON.stringify(modelCopy.billingAddress);
          }
  
          if (modelCopy.shippingAddress && modelCopy.shippingAddress.country) {
              modelCopy.shippingAddress.country = checkoutModel.shippingAddress.country.value;
              modelCopy.shippingAddress.countryLabel = checkoutModel.shippingAddress.country.label;
              requestModel.shippingAddress = JSON.stringify(modelCopy.shippingAddress);
          }
  
          if (modelCopy.selectedPaymentMethod && modelCopy.selectedPaymentMethod.method) {
              requestModel.paymentMethod = modelCopy.selectedPaymentMethod.method;
          } else {
              requestModel.paymentMethod = modelCopy.selectedPaymentMethod;
          }
  
          if (modelCopy.selectedShippingMethod && modelCopy.selectedShippingMethod.method) {
              requestModel.shippingMethod = modelCopy.selectedShippingMethod.method;
          }
  
          requestModel.quote = JSON.stringify(self.createQuoteData());
  
          var coupons = basketService.getActiveCoupons().map(function (coupon) {
              return coupon.code;
          });
          requestModel.coupons = JSON.stringify(coupons);
  
          return requestModel;
      }
docs: we need to transform the checkoutModel into something the backend understands