@classmethod
    def create(cls, api_key=None, **params):
        """
            Creates a new transaction object, given a valid rate ID.
            Takes the parameters as a dictionary instead of key word arguments.
        """
        url = cls.class_url()
        requestor = api_requestor.APIRequestor(api_key)
        response, content = requestor.request('post', url, params)
        transaction = convert_to_shippo_object(response, content)
        if 'sync' in params and params['sync']:
            timeout = time.time() + transaction_req_timeout
            while transaction.object_status in ("QUEUED", "WAITING") and time.time() < timeout:
                transaction = cls.retrieve(transaction.object_id)
                continue

        return transaction
dataset/ETHPy150Open goshippo/shippo-python-client/shippo/resource.py/Transaction.create/original