Skip to content

Instantly share code, notes, and snippets.

@JDutil
Created August 28, 2012 00:20
Show Gist options
  • Save JDutil/3493735 to your computer and use it in GitHub Desktop.
Save JDutil/3493735 to your computer and use it in GitHub Desktop.
Submitted:
<?xml version="1.0" encoding="UTF-8"?>
<Sale>
<timeStamp type="datetime">2012-08-19T23:22:37Z</timeStamp>
<completed type="boolean">true</completed>
<customerID>1</customerID>
<employeeID type="integer">4</employeeID>
<registerID type="integer">1</registerID>
<shopID type="integer">1</shopID>
<taxCategoryID type="integer">1</taxCategoryID>
<ShipTo>
<firstName>Jeff</firstName>
<lastName>Dutil</lastName>
<company nil="true"></company>
<customerID>1</customerID>
<Contact>
<Addresses>
<ContactAddress>
<address1>234 Woodbine By The LK 2</address1>
<address2></address2>
<city>Colchester</city>
<state>Illinois</state>
<zip>05446</zip>
<country>United States</country>
</ContactAddress>
</Addresses>
<Emails>
<ContactEmail>
<address>[email protected]</address>
<useType>Primary</useType>
</ContactEmail>
</Emails>
<Phones>
<ContactPhone>
<number>555-555-5555</number>
<useType>Home</useType>
</ContactPhone>
</Phones>
<custom></custom>
<noEmail type="boolean">true</noEmail>
<noMail type="boolean">true</noMail>
<noPhone type="boolean">true</noPhone>
</Contact>
</ShipTo>
<SaleLines type="array">
<SaleLine>
<unitQuantity type="integer">1</unitQuantity>
<unitPrice type="decimal">9.0</unitPrice>
<tax type="boolean">true</tax>
<taxCategoryID type="integer">1</taxCategoryID>
<taxClassID>2</taxClassID>
<customerID>1</customerID>
<itemID>2</itemID>
</SaleLine>
<SaleLine>
<unitQuantity type="integer">1</unitQuantity>
<unitPrice type="decimal">39.0</unitPrice>
<tax type="boolean">true</tax>
<taxCategoryID type="integer">1</taxCategoryID>
<taxClassID>6</taxClassID>
<customerID>1</customerID>
<itemID>4</itemID>
</SaleLine>
<SaleLine>
<unitQuantity type="integer">1</unitQuantity>
<unitPrice type="decimal">20.0</unitPrice>
<tax type="boolean">true</tax>
<taxCategoryID type="integer">1</taxCategoryID>
<taxClassID>6</taxClassID>
<customerID>1</customerID>
<itemID>6</itemID>
</SaleLine>
<SaleLine>
<customerID>1</customerID>
<unitQuantity type="integer">1</unitQuantity>
<unitPrice type="decimal">3.0</unitPrice>
<tax type="boolean">false</tax>
<taxClassID type="integer">0</taxClassID>
<itemID>240</itemID>
</SaleLine>
</SaleLines>
<SalePayments type="array">
<SalePayment>
<amount type="decimal">76.81</amount>
<paymentTypeID type="integer">3</paymentTypeID>
</SalePayment>
</SalePayments>
</Sale>
Response:
<?xml version="1.0"?>
<Error>
<httpCode>400</httpCode>
<httpMessage>Bad Request</httpMessage>
<message>Cannot complete an out of balance sale. Balance remaining: -5.81</message>
</Error>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment