def METHOD_NAME(cls, order, method, shipping_method_data):
    order.shipping_method = method
    order.shipping_method_name = method.name
    tax_class = method.tax_class
    if tax_class:
        order.shipping_tax_class = tax_class
        order.shipping_tax_class_name = tax_class.name
        order.shipping_tax_class_private_metadata = tax_class.private_metadata
        order.shipping_tax_class_metadata = tax_class.metadata
    invalidate_order_prices(order)