0
新しい顧客を追加するときに会社名を追加しようとしていますが、誰でも手伝えますか? ところで、quickboos-php devkitのドキュメントはどこにありますか?私はそれも見つけられません。(consolibyte)quickbooks-php devkit、会社名を追加するには?
$CustomerService = new QuickBooks_IPP_Service_Customer();
//add basic info
$Customer = new QuickBooks_IPP_Object_Customer();
$Customer->setTitle($title);
$Customer->setGivenName($given_name);
$Customer->setMiddleName($middel_name);
$Customer->setFamilyName($family_name);
$Customer->setDisplayName($display_name);
// Phone #
$PrimaryPhone = new QuickBooks_IPP_Object_PrimaryPhone();
$PrimaryPhone->setFreeFormNumber($primary_phone);
$Customer->setPrimaryPhone($PrimaryPhone);
// Mobile #
$Mobile = new QuickBooks_IPP_Object_Mobile();
$Mobile->setFreeFormNumber($mobile);
$Customer->setMobile($Mobile);
// Bill address
$BillAddr = new QuickBooks_IPP_Object_BillAddr();
$BillAddr->setLine1($bill_address);
$BillAddr->setCity($bill_city);
$BillAddr->setCountrySubDivisionCode($bill_state);
$BillAddr->setCountry($bill_country);
$BillAddr->setPostalCode($bill_zip_code);
$Customer->setBillAddr($BillAddr);
// Shipping address
$ShipAddr = new QuickBooks_IPP_Object_ShipAddr();
$ShipAddr->setLine1($address_1);
$ShipAddr->setLine2($address_2);
$ShipAddr->setCity($city);
$ShipAddr->setCountrySubDivisionCode($province);
$ShipAddr->setCountry($country);
$ShipAddr->setPostalCode($postal_code);
$Customer->setShipAddr($ShipAddr);
$customer_id = $CustomerService->add($Context, $realm, $Customer);
プロジェクトGitHubのを見ましたか?それはドキュメントへのすべてのリンクを持っています:https://github.com/consolibyte/quickbooks-php - また、あなたはなぜ顧客に会社名を追加しますか?私はかなり確信している企業と顧客は異なるエンティティです。 –
QuickBooksには本当に別の「会社」エンティティという概念はありません。あなたの顧客はB2BかB2Cかに応じて、企業でもよいし、個人でもよい。顧客は実際にQuickBooksに会社名フィールドを持っています。 –
@ KeithPalmerJr.Thanks – zif