2016-11-23 9 views
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); 
+0

プロジェクトGitHubのを見ましたか?それはドキュメントへのすべてのリンクを持っています:https://github.com/consolibyte/quickbooks-php - また、あなたはなぜ顧客に会社名を追加しますか?私はかなり確信している企業と顧客は異なるエンティティです。 –

+0

QuickBooksには本当に別の「会社」エンティティという概念はありません。あなたの顧客はB2BかB2Cかに応じて、企業でもよいし、個人でもよい。顧客は実際にQuickBooksに会社名フィールドを持っています。 –

+0

@ KeithPalmerJr.Thanks – zif

答えて

1

Customerオブジェクトに対して使用可能なフィールドのリストは、Intuitのウェブサイトである:

おそらく探している:

以下のコードであります

CompanyName: optional String, maximum of 50 chars, filterable, sortable, default is null The name of the company associated with the person or organization.

当然のことながら、対応するメソッドのカップルがあります:

$Customer->setCompanyName($v); 
$v = $Customer->getCompanyName(); 
関連する問題