本文整理汇总了PHP中QuickBooks_Object::fromQBXML方法的典型用法代码示例。如果您正苦于以下问题:PHP QuickBooks_Object::fromQBXML方法的具体用法?PHP QuickBooks_Object::fromQBXML怎么用?PHP QuickBooks_Object::fromQBXML使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QuickBooks_Object
的用法示例。
在下文中一共展示了QuickBooks_Object::fromQBXML方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_r
</CustomerRet>';
// Create the customer
$Object = QuickBooks_Object::fromQBXML($qbxml);
// Print it out
print_r($Object);
// Does it work for qbXML ADD requests too?
$qbxml = '
<CustomerAdd>
<Name>20706 - Eastern XYZ University</Name>
<CompanyName>Eastern XYZ University</CompanyName>
<FirstName>Keith</FirstName>
<LastName>Palmer</LastName>
<BillAddress>
<Addr1>Eastern XYZ University</Addr1>
<Addr2>College of Engineering</Addr2>
<Addr3>123 XYZ Road</Addr3>
<City>Storrs-Mansfield</City>
<State>CT</State>
<PostalCode>06268</PostalCode>
<Country>United States</Country>
</BillAddress>
<Phone>860-634-1602</Phone>
<AltPhone>860-429-0021</AltPhone>
<Fax>860-429-5183</Fax>
<Email>keith@consolibyte.com</Email>
<Contact>Keith Palmer</Contact>
</CustomerAdd>';
// Create it...
$Object = QuickBooks_Object::fromQBXML($qbxml);
// Print it...
print_r($Object);
示例2:
<TimeModified>2009-10-11T14:26:12</TimeModified>
<EditSequence>1234</EditSequence>
<Name>7lb Box</Name>
<IsActive>true</IsActive>
<UnitOfMeasureType>Weight</UnitOfMeasureType>
<BaseUnit>
<Name>Pounds</Name>
<Abbreviation>lbs</Abbreviation>
</BaseUnit>
<RelatedUnit>
<Name>15lb Box</Name>
<Abbreviation>15lbs</Abbreviation>
<ConversionRatio>2</ConversionRatio>
</RelatedUnit>
<RelatedUnit>
<Name>25lb Box</Name>
<Abbreviation>25lbs</Abbreviation>
<ConversionRatio>4</ConversionRatio>
</RelatedUnit>
<DefaultUnit>
<UnitUsedFor>Sales</UnitUsedFor>
<Unit>Pound</Unit>
</DefaultUnit>
<DefaultUnit>
<UnitUsedFor>Purchase</UnitUsedFor>
<Unit>2 Pounds</Unit>
</DefaultUnit>
</UnitOfMeasureSetRet>';
$UnitOfMeasureSet = QuickBooks_Object::fromQBXML($qbxml);
print_r($UnitOfMeasureSet);
print $UnitOfMeasureSet->asQBXML(QUICKBOOKS_ADD_UNITOFMEASURESET);