Sets the cost_type of this TableRateShipping.


        :param cost_type: The cost_type of this TableRateShipping.
        :type: str

def cost_type(self, cost_type):
        """Sets the cost_type of this TableRateShipping.


        :param cost_type: The cost_type of this TableRateShipping.
        :type: str
        """
        allowed_values = ["orderSubtotal", "weight"]
        if cost_type is not None and cost_type not in allowed_values:
            raise ValueError(
                "Invalid value for `cost_type` ({0}), must be one of {1}"
                .format(cost_type, allowed_values)
            )

        self._cost_type = cost_type