Infusionsoft - 使用API​​向公司添加联系人

I'm using novaksolution's Infusionsoft SDK and trying to add a Contact to a Company by setting the Company and CompanyID fields.

All other fields are updating without issue, but the CompanyID field always comes back as 0.

For example:

$contact = new Infusionsoft_Contact(1234);
$contact->CompanyID = 5678;
$contact->Company = 'Test Company Name';

// update other fields
$contact->save();

// Shows CompanyID = 5678
var_dump($contact);

$contact = new Infusionsoft_Contact(1234);

// All other fields updated; CompanyID is 0
var_dump($contact);

Am I going about this the wrong way? What am I missing?

Well, this took me longer to figure out than it should have.

For anyone else stuck on this, you need to set the field AccountId, not CompanyID.