code: def based_on(self, based_on):
          
          allowed_values = ["shippingAddress", "billingAddress"]
          if based_on is not None and based_on not in allowed_values:
              raise ValueError(
                  "Invalid value for `based_on` ({0}), must be one of {1}"
                  .format(based_on, allowed_values)
              )
  
          self._based_on = based_on
docs: Sets the based_on of this TaxRate.
  
  
          :param based_on: The based_on of this TaxRate.
          :type: str