xero_gateway 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/README.textile +57 -5
  2. data/lib/xero_gateway/account.rb +8 -2
  3. data/lib/xero_gateway/credit_note.rb +275 -0
  4. data/lib/xero_gateway/exceptions.rb +3 -1
  5. data/lib/xero_gateway/gateway.rb +119 -3
  6. data/lib/xero_gateway/http.rb +10 -6
  7. data/lib/xero_gateway/oauth.rb +3 -1
  8. data/lib/xero_gateway/response.rb +2 -0
  9. data/lib/xero_gateway/tracking_category.rb +5 -2
  10. data/lib/xero_gateway.rb +1 -0
  11. data/test/integration/create_credit_note_test.rb +49 -0
  12. data/test/integration/get_credit_note_test.rb +48 -0
  13. data/test/integration/get_credit_notes_test.rb +90 -0
  14. data/test/integration/get_tracking_categories_test.rb +3 -2
  15. data/test/test_helper.rb +24 -1
  16. data/test/unit/account_test.rb +3 -2
  17. data/test/unit/credit_note_test.rb +284 -0
  18. data/test/unit/gateway_test.rb +17 -1
  19. data/xero_gateway.gemspec +3 -76
  20. metadata +13 -29
  21. data/CHANGELOG.textile +0 -57
  22. data/test/stub_responses/accounts.xml +0 -1
  23. data/test/stub_responses/api_exception.xml +0 -153
  24. data/test/stub_responses/contact.xml +0 -1
  25. data/test/stub_responses/contacts.xml +0 -2189
  26. data/test/stub_responses/create_invoice.xml +0 -64
  27. data/test/stub_responses/currencies.xml +0 -16
  28. data/test/stub_responses/invalid_api_key_error.xml +0 -1
  29. data/test/stub_responses/invalid_consumer_key +0 -1
  30. data/test/stub_responses/invalid_request_token +0 -1
  31. data/test/stub_responses/invoice.xml +0 -1
  32. data/test/stub_responses/invoice_not_found_error.xml +0 -1
  33. data/test/stub_responses/invoices.xml +0 -1
  34. data/test/stub_responses/organisation.xml +0 -14
  35. data/test/stub_responses/tax_rates.xml +0 -52
  36. data/test/stub_responses/token_expired +0 -1
  37. data/test/stub_responses/tracking_categories.xml +0 -1
  38. data/test/stub_responses/unknown_error.xml +0 -1
  39. data/test/xsd/README +0 -2
  40. data/test/xsd/create_contact.xsd +0 -61
  41. data/test/xsd/create_invoice.xsd +0 -107
@@ -1,64 +0,0 @@
1
- <Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
2
- <Id>ac61eaae-0700-4f95-813d-aefa09eb57c6</Id>
3
- <Status>OK</Status>
4
- <ProviderName>XeroGateway Test</ProviderName>
5
- <DateTimeUTC>2009-10-17T09:17:48.5216708Z</DateTimeUTC>
6
- <Invoices>
7
- <Invoice>
8
- <Type>ACCREC</Type>
9
- <Contact>
10
- <ContactID>3e1d3ba5-609a-4e10-bb1d-75b6d31ce922</ContactID>
11
- <ContactStatus>ACTIVE</ContactStatus>
12
- <Name>AMP</Name>
13
- <Addresses>
14
- <Address>
15
- <AddressType>STREET</AddressType>
16
- </Address>
17
- <Address>
18
- <AddressType>POBOX</AddressType>
19
- </Address>
20
- </Addresses>
21
- <Phones>
22
- <Phone>
23
- <PhoneType>MOBILE</PhoneType>
24
- </Phone>
25
- <Phone>
26
- <PhoneType>DDI</PhoneType>
27
- </Phone>
28
- <Phone>
29
- <PhoneType>DEFAULT</PhoneType>
30
- </Phone>
31
- <Phone>
32
- <PhoneType>FAX</PhoneType>
33
- </Phone>
34
- </Phones>
35
- <UpdatedDateUTC>2009-09-21T23:07:47.49</UpdatedDateUTC>
36
- <IsSupplier>false</IsSupplier>
37
- <IsCustomer>true</IsCustomer>
38
- </Contact>
39
- <DueDate>2009-10-27T00:00:00</DueDate>
40
- <Status>DRAFT</Status>
41
- <LineAmountTypes>Exclusive</LineAmountTypes>
42
- <LineItems>
43
- <LineItem>
44
- <Description>(17 Oct) something</Description>
45
- <Quantity>30.0000</Quantity>
46
- <UnitAmount>100.00</UnitAmount>
47
- <TaxType>OUTPUT</TaxType>
48
- <TaxAmount>375.00</TaxAmount>
49
- <LineAmount>3000.00</LineAmount>
50
- <AccountCode>200</AccountCode>
51
- </LineItem>
52
- </LineItems>
53
- <SubTotal>3000.00</SubTotal>
54
- <TotalTax>375.00</TotalTax>
55
- <Total>3375.00</Total>
56
- <UpdatedDateUTC>2009-10-17T09:17:47.427</UpdatedDateUTC>
57
- <CurrencyCode>NZD</CurrencyCode>
58
- <InvoiceID>a99a9aaa-9999-99a9-9aa9-aaaaaa9a9999</InvoiceID>
59
- <InvoiceNumber>INV-0001</InvoiceNumber>
60
- <AmountDue>3375.00</AmountDue>
61
- <AmountPaid>0.00</AmountPaid>
62
- </Invoice>
63
- </Invoices>
64
- </Response>
@@ -1,16 +0,0 @@
1
- <Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
2
- <Id>244a1123-ca58-4ab8-9893-74bb87b54307</Id>
3
- <Status>OK</Status>
4
- <ProviderName>Xero Gateway Test</ProviderName>
5
- <DateTimeUTC>2009-10-04T03:28:12.048587Z</DateTimeUTC>
6
- <Currencies>
7
- <Currency>
8
- <Code>NZD</Code>
9
- <Description>New Zealand Dollar</Description>
10
- </Currency>
11
- <Currency>
12
- <Code>USD</Code>
13
- <Description>United States Dollar</Description>
14
- </Currency>
15
- </Currencies>
16
- </Response>
@@ -1 +0,0 @@
1
- <html><head><title>Object moved</title></head><body><h2>Object moved to <a href="%2fLogin.xro%2fLogin%3fReturnUrl%3d%252fapi.xro%252f1.0%252finvoice%253fapiKey%253dAN_INVALID_API_KEY%2526xeroKey%253dYWZIMZQ3ZGVJMME1NDCWNTK3YWZMNW%2526invoiceID%253dAN_INVALID_ID%26apiKey%3dAN_INVALID_API_KEY%26xeroKey%3dYWZIMZQ3ZGVJMME1NDCWNTK3YWZMNW%26invoiceID%3dAN_INVALID_ID">here</a>.</h2></body></html>
@@ -1 +0,0 @@
1
- oauth_problem=token_rejected&oauth_problem_advice=Unknown%20consumer
@@ -1 +0,0 @@
1
- oauth_problem=token_rejected&oauth_problem_advice=Unexpected%20token
@@ -1 +0,0 @@
1
- <?xml version="1.0"?><Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ID>a99a9aaa-9999-99a9-9aa9-aaaaaa9a9999</ID><Status>OK</Status><ProviderName>YOUR PROVIDER</ProviderName><DateTimeUTC>2008-10-09T00:59:11.1341229Z</DateTimeUTC><Invoice><Type>ACCREC</Type><InvoiceID>a99a9aaa-9999-99a9-9aa9-aaaaaa9a9999</InvoiceID><Contact><ContactID>a99a9aaa-9999-99a9-9aa9-aaaaaa9a9999</ContactID><ContactStatus>ACTIVE</ContactStatus><Name>CONTACT NAME</Name><EmailAddress>bob@example.com</EmailAddress><Addresses><Address><AddressType>POBOX</AddressType><AddressLine1>LINE 1 OF THE ADDRESS</AddressLine1><AddressLine2></AddressLine2><AddressLine3></AddressLine3><AddressLine4></AddressLine4><City>Somewhere</City><Region></Region><PostalCode></PostalCode><Country>Some Country</Country></Address></Addresses><Phones><Phone><PhoneType>MOBILE</PhoneType><PhoneNumber>1234567</PhoneNumber><PhoneAreaCode>123</PhoneAreaCode><PhoneCountryCode></PhoneCountryCode></Phone><Phone><PhoneType>DEFAULT</PhoneType><PhoneNumber></PhoneNumber><PhoneAreaCode></PhoneAreaCode><PhoneCountryCode></PhoneCountryCode></Phone><Phone><PhoneType>FAX</PhoneType><PhoneNumber></PhoneNumber><PhoneAreaCode></PhoneAreaCode><PhoneCountryCode></PhoneCountryCode></Phone><Phone><PhoneType>DDI</PhoneType><PhoneNumber></PhoneNumber><PhoneAreaCode></PhoneAreaCode><PhoneCountryCode></PhoneCountryCode></Phone></Phones></Contact><Date>2008-10-03T00:00:00</Date><DueDate>2008-10-20T00:00:00</DueDate><InvoiceNumber>INV-0001</InvoiceNumber><Reference></Reference><IncludesTax>true</IncludesTax><SubTotal>1000.0000</SubTotal><TotalTax>125.0000</TotalTax><Total>1125.0000</Total><InvoiceStatus>AUTHORISED</InvoiceStatus><LineItems><LineItem><LineItemID>e5a8a4ee-85ee-4532-a79f-a552ec63a0d7</LineItemID><Description>A LINE ITEM</Description><Quantity>100.0</Quantity><UnitAmount>12.34</UnitAmount><TaxType>OUTPUT</TaxType><TaxAmount>125.0000</TaxAmount><LineAmount>1125.0000</LineAmount><Tracking><TrackingCategory><Name>Region</Name><Option>Central</Option></TrackingCategory></Tracking></LineItem></LineItems></Invoice></Response>
@@ -1 +0,0 @@
1
- <Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Errors><Error><Description>Invoice with invoice number 123 does not exist for this organisation</Description><Exception><DateTime>2008-12-05T21:03:15.4445759Z</DateTime><ExceptionType>Xero.API.Library.Exceptions.ObjectDoesNotExistException</ExceptionType><Message>Invoice with invoice number 123 does not exist for this organisation</Message><Source>Xero.API.Library</Source><StackTrace> at Xero.API.Library.Services.InvoiceService.GetInvoice(Guid organisationID, String invoiceNumber) in D:\Projects\network\project\Xero.API.Library\Services\InvoiceService.cs:line 508 at Xero.API.Web.Controllers.InvoiceController.Get(String apiKey, String xeroKey, String invoiceID, String invoiceNumber) in D:\Projects\network\project\Xero.API.Web\Controllers\InvoiceController.cs:line 37</StackTrace></Exception></Error></Errors><ID>eaf9db6c-d3b2-49e8-939a-d9f23cc7c412</ID><Status>InternalServerError</Status><ProviderName>YOUR PROVIDER</ProviderName><DateTimeUTC>2008-12-05T21:03:15.3508067Z</DateTimeUTC></Response>
@@ -1 +0,0 @@
1
- <?xml version="1.0"?><Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ID>a99a9aaa-9999-99a9-9aa9-aaaaaa9a9999</ID><Status>OK</Status><ProviderName>YOUR PROVIDER</ProviderName><DateTimeUTC>2008-10-09T00:59:11.1341229Z</DateTimeUTC><Invoices><Invoice><InvoiceType>ACCREC</InvoiceType><InvoiceID>a99a9aaa-9999-99a9-9aa9-aaaaaa9a9999</InvoiceID><Contact><ContactID>a99a9aaa-9999-99a9-9aa9-aaaaaa9a9999</ContactID><ContactStatus>ACTIVE</ContactStatus><Name>CONTACT NAME</Name><EmailAddress>bob@example.com</EmailAddress><Addresses><Address><AddressType>POBOX</AddressType><AddressLine1>LINE 1 OF THE ADDRESS</AddressLine1><AddressLine2/><AddressLine3/><AddressLine4/><City>Somewhere</City><Region/><PostalCode/><Country>Some Country</Country></Address></Addresses><Phones><Phone><PhoneType>MOBILE</PhoneType><PhoneNumber>1234567</PhoneNumber><PhoneAreaCode>123</PhoneAreaCode><PhoneCountryCode/></Phone><Phone><PhoneType>DEFAULT</PhoneType><PhoneNumber/><PhoneAreaCode/><PhoneCountryCode/></Phone><Phone><PhoneType>FAX</PhoneType><PhoneNumber/><PhoneAreaCode/><PhoneCountryCode/></Phone><Phone><PhoneType>DDI</PhoneType><PhoneNumber/><PhoneAreaCode/><PhoneCountryCode/></Phone></Phones></Contact><Date>2008-10-03T00:00:00</Date><DueDate>2008-10-20T00:00:00</DueDate><InvoiceNumber>INV-0001</InvoiceNumber><Reference/><IncludesTax>true</IncludesTax><SubTotal>1000.0000</SubTotal><TotalTax>125.0000</TotalTax><Total>1125.0000</Total><InvoiceStatus>AUTHORISED</InvoiceStatus><LineItems/></Invoice><Invoice><InvoiceType>ACCREC</InvoiceType><InvoiceID>a11a1aaa-1111-11a1-1aa1-aaaaaa1a1111</InvoiceID><Contact><ContactID>a11a1aaa-1111-11a1-1aa1-aaaaaa1a1111</ContactID><ContactStatus>ACTIVE</ContactStatus><Name>CONTACT NAME</Name><EmailAddress>bob@example.com</EmailAddress><Addresses><Address><AddressType>POBOX</AddressType><AddressLine1>LINE 1 OF THE ADDRESS</AddressLine1><AddressLine2/><AddressLine3/><AddressLine4/><City>Somewhere</City><Region/><PostalCode/><Country>Some Country</Country></Address></Addresses><Phones><Phone><PhoneType>MOBILE</PhoneType><PhoneNumber>1234567</PhoneNumber><PhoneAreaCode>123</PhoneAreaCode><PhoneCountryCode/></Phone><Phone><PhoneType>DEFAULT</PhoneType><PhoneNumber/><PhoneAreaCode/><PhoneCountryCode/></Phone><Phone><PhoneType>FAX</PhoneType><PhoneNumber/><PhoneAreaCode/><PhoneCountryCode/></Phone><Phone><PhoneType>DDI</PhoneType><PhoneNumber/><PhoneAreaCode/><PhoneCountryCode/></Phone></Phones></Contact><Date>2008-10-03T00:00:00</Date><DueDate>2008-10-20T00:00:00</DueDate><InvoiceNumber>INV-0001</InvoiceNumber><Reference/><IncludesTax>true</IncludesTax><SubTotal>1000.0000</SubTotal><TotalTax>125.0000</TotalTax><Total>1125.0000</Total><InvoiceStatus>AUTHORISED</InvoiceStatus><LineItems/></Invoice></Invoices></Response>
@@ -1,14 +0,0 @@
1
- <Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
2
- <Id>e3431899-bf76-41e8-a919-4c8c923feb12</Id>
3
- <Status>OK</Status>
4
- <DateTimeUTC>2009-10-04T03:26:26.6994434Z</DateTimeUTC>
5
- <Organisations>
6
- <Organisation>
7
- <Name>Demo Company (NZ)</Name>
8
- <LegalName>Demo Company (NZ)</LegalName>
9
- <PaysTax>true</PaysTax>
10
- <Version>NZ</Version>
11
- <BaseCurrency>NZD</BaseCurrency>
12
- </Organisation>
13
- </Organisations>
14
- </Response>
@@ -1,52 +0,0 @@
1
- <Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
2
- <Id>ace3dea1-4025-48cf-a91f-50759c32653e</Id>
3
- <Status>OK</Status>
4
- <ProviderName>Xero Gateway Test</ProviderName>
5
- <DateTimeUTC>2009-10-04T03:29:54.6788414Z</DateTimeUTC>
6
- <TaxRates>
7
- <TaxRate>
8
- <Name>GST on Expenses</Name>
9
- <TaxType>INPUT</TaxType>
10
- <CanApplyToAssets>true</CanApplyToAssets>
11
- <CanApplyToEquity>true</CanApplyToEquity>
12
- <CanApplyToExpenses>true</CanApplyToExpenses>
13
- <CanApplyToLiabilities>true</CanApplyToLiabilities>
14
- <CanApplyToRevenue>false</CanApplyToRevenue>
15
- <DisplayTaxRate>12.5000</DisplayTaxRate>
16
- <EffectiveRate>12.5000</EffectiveRate>
17
- </TaxRate>
18
- <TaxRate>
19
- <Name>GST on Income</Name>
20
- <TaxType>OUTPUT</TaxType>
21
- <CanApplyToAssets>true</CanApplyToAssets>
22
- <CanApplyToEquity>true</CanApplyToEquity>
23
- <CanApplyToExpenses>false</CanApplyToExpenses>
24
- <CanApplyToLiabilities>true</CanApplyToLiabilities>
25
- <CanApplyToRevenue>true</CanApplyToRevenue>
26
- <DisplayTaxRate>12.5000</DisplayTaxRate>
27
- <EffectiveRate>12.5000</EffectiveRate>
28
- </TaxRate>
29
- <TaxRate>
30
- <Name>No GST</Name>
31
- <TaxType>NONE</TaxType>
32
- <CanApplyToAssets>true</CanApplyToAssets>
33
- <CanApplyToEquity>true</CanApplyToEquity>
34
- <CanApplyToExpenses>true</CanApplyToExpenses>
35
- <CanApplyToLiabilities>true</CanApplyToLiabilities>
36
- <CanApplyToRevenue>true</CanApplyToRevenue>
37
- <DisplayTaxRate>0.0000</DisplayTaxRate>
38
- <EffectiveRate>0.0000</EffectiveRate>
39
- </TaxRate>
40
- <TaxRate>
41
- <Name>Zero Rated</Name>
42
- <TaxType>ZERORATED</TaxType>
43
- <CanApplyToAssets>false</CanApplyToAssets>
44
- <CanApplyToEquity>false</CanApplyToEquity>
45
- <CanApplyToExpenses>false</CanApplyToExpenses>
46
- <CanApplyToLiabilities>false</CanApplyToLiabilities>
47
- <CanApplyToRevenue>true</CanApplyToRevenue>
48
- <DisplayTaxRate>0.0000</DisplayTaxRate>
49
- <EffectiveRate>0.0000</EffectiveRate>
50
- </TaxRate>
51
- </TaxRates>
52
- </Response>
@@ -1 +0,0 @@
1
- oauth_problem=token_expired&oauth_problem_advice=Unexpected%20token
@@ -1 +0,0 @@
1
- <?xml version="1.0"?><Response><ID>89a1d50c-f528-470c-b924-c10281ff67d6</ID><Status>OK</Status><ProviderName>XeroTest</ProviderName><DateTimeUTC>2008-04-20T20:16:51.7072529Z</DateTimeUTC><TrackingCategories><TrackingCategory><Name>Activity/Workstream</Name><Options><Option><Name>Documentation</Name></Option><Option><Name>Onsite consultancy</Name></Option><Option><Name>Publications</Name></Option><Option><Name>Support</Name></Option><Option><Name>Training</Name></Option><Option><Name>Website management</Name></Option></Options></TrackingCategory><TrackingCategory><Name>Consultant/Sales person</Name><Options><Option><Name>Felix Wilson</Name></Option><Option><Name>Martin Hudson</Name></Option><Option><Name>Orlena Greenville</Name></Option></Options></TrackingCategory></TrackingCategories></Response>
@@ -1 +0,0 @@
1
- <Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Errors><Error><Description>Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).</Description><Exception><DateTime>2008-12-05T21:02:09.9624179Z</DateTime><ExceptionType>System.FormatException</ExceptionType><Message>Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).</Message><Source>mscorlib</Source><StackTrace> at System.Guid..ctor(String g) at Xero.API.Web.Controllers.InvoiceController.Get(String apiKey, String xeroKey, String invoiceID, String invoiceNumber) in D:\Projects\network\project\Xero.API.Web\Controllers\InvoiceController.cs:line 37</StackTrace></Exception></Error></Errors><ID>225ad11e-601e-4e2a-bdb1-48e8517efbb3</ID><Status>InternalServerError</Status><ProviderName>YOUR PROVIDER</ProviderName><DateTimeUTC>2008-12-05T21:02:09.9467897Z</DateTimeUTC></Response>
data/test/xsd/README DELETED
@@ -1,2 +0,0 @@
1
- These XML schemas are taken directly from https://network.xero.com/Help/Xero%20API%20Reference%201.0.htm
2
- and all XML generated to be sent to Xero should match these schemas
@@ -1,61 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
3
- <xs:element name="Contact">
4
- <xs:complexType>
5
- <xs:sequence>
6
- <xs:element minOccurs="0" name="ContactID" type="xs:string" />
7
- <xs:element minOccurs="0" name="ContactNumber" type="xs:string" />
8
- <xs:element name="Name" type="xs:string" />
9
- <xs:element minOccurs="0" name="ContactStatus" type="xs:string" />
10
- <xs:element minOccurs="0" name="EmailAddress" type="xs:string" />
11
- <xs:element minOccurs="0" name="SkypeUserName" type="xs:string" />
12
- <xs:element minOccurs="0" name="BankAccountDetails" type="xs:string" />
13
- <xs:element minOccurs="0" name="TaxNumber" type="xs:string" />
14
- <xs:element minOccurs="0" name="AccountsRecievableTaxType" type="xs:string" />
15
- <xs:element minOccurs="0" name="AccountsPayableTaxType" type="xs:string" />
16
- <xs:element minOccurs="0" name="FirstName" type="xs:string" />
17
- <xs:element minOccurs="0" name="LastName" type="xs:string" />
18
- <xs:element minOccurs="0" name="IsCustomer" type="xs:boolean" />
19
- <xs:element minOccurs="0" name="IsSupplier" type="xs:boolean" />
20
- <xs:element minOccurs="0" name="DefaultCurrency" type="xs:string" />
21
- <xs:element name="Addresses">
22
- <xs:complexType>
23
- <xs:sequence>
24
- <xs:element name="Address">
25
- <xs:complexType>
26
- <xs:sequence>
27
- <xs:element name="AddressType" type="xs:string" />
28
- <xs:element minOccurs="0" name="AddressLine1" type="xs:string" />
29
- <xs:element minOccurs="0" name="AddressLine2" type="xs:string" />
30
- <xs:element minOccurs="0" name="AddressLine3" type="xs:string" />
31
- <xs:element minOccurs="0" name="AddressLine4" type="xs:string" />
32
- <xs:element minOccurs="0" name="City" type="xs:string" />
33
- <xs:element minOccurs="0" name="Region" type="xs:string" />
34
- <xs:element minOccurs="0" name="PostalCode" type="xs:unsignedShort" />
35
- <xs:element minOccurs="0" name="Country" type="xs:string" />
36
- </xs:sequence>
37
- </xs:complexType>
38
- </xs:element>
39
- </xs:sequence>
40
- </xs:complexType>
41
- </xs:element>
42
- <xs:element name="Phones">
43
- <xs:complexType>
44
- <xs:sequence>
45
- <xs:element maxOccurs="unbounded" name="Phone">
46
- <xs:complexType>
47
- <xs:sequence>
48
- <xs:element name="PhoneType" type="xs:string" />
49
- <xs:element minOccurs="0" name="PhoneNumber" type="xs:unsignedInt" />
50
- <xs:element minOccurs="0" name="PhoneAreaCode" type="xs:unsignedByte" />
51
- <xs:element minOccurs="0" name="PhoneCountryCode" type="xs:unsignedByte" />
52
- </xs:sequence>
53
- </xs:complexType>
54
- </xs:element>
55
- </xs:sequence>
56
- </xs:complexType>
57
- </xs:element>
58
- </xs:sequence>
59
- </xs:complexType>
60
- </xs:element>
61
- </xs:schema>
@@ -1,107 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
3
- <xs:element name="Invoice">
4
- <xs:complexType>
5
- <xs:sequence>
6
- <xs:element name="Type" type="xs:string" />
7
- <xs:element name="Contact">
8
- <xs:complexType>
9
- <xs:sequence>
10
- <xs:element minOccurs="0" name="ContactID" type="xs:string" />
11
- <xs:element minOccurs="0" name="ContactNumber" type="xs:string" />
12
- <xs:element name="Name" type="xs:string" />
13
- <xs:element minOccurs="0" name="ContactStatus" type="xs:string" />
14
- <xs:element minOccurs="0" name="EmailAddress" type="xs:string" />
15
- <xs:element minOccurs="0" name="SkypeUserName" type="xs:string" />
16
- <xs:element minOccurs="0" name="BankAccountDetails" type="xs:string" />
17
- <xs:element minOccurs="0" name="TaxNumber" type="xs:string" />
18
- <xs:element minOccurs="0" name="AccountsRecievableTaxType" type="xs:string" />
19
- <xs:element minOccurs="0" name="AccountsPayableTaxType" type="xs:string" />
20
- <xs:element minOccurs="0" name="FirstName" type="xs:string" />
21
- <xs:element minOccurs="0" name="LastName" type="xs:string" />
22
- <xs:element minOccurs="0" name="DefaultCurrency" type="xs:string" />
23
- <xs:element name="Addresses">
24
- <xs:complexType>
25
- <xs:sequence>
26
- <xs:element name="Address">
27
- <xs:complexType>
28
- <xs:sequence>
29
- <xs:element name="AddressType" type="xs:string" />
30
- <xs:element minOccurs="0" name="AddressLine1" type="xs:string" />
31
- <xs:element minOccurs="0" name="AddressLine2" type="xs:string" />
32
- <xs:element minOccurs="0" name="AddressLine3" type="xs:string" />
33
- <xs:element minOccurs="0" name="AddressLine4" type="xs:string" />
34
- <xs:element minOccurs="0" name="City" type="xs:string" />
35
- <xs:element minOccurs="0" name="Region" type="xs:string" />
36
- <xs:element minOccurs="0" name="PostalCode" type="xs:unsignedShort" />
37
- <xs:element minOccurs="0" name="Country" type="xs:string" />
38
- </xs:sequence>
39
- </xs:complexType>
40
- </xs:element>
41
- </xs:sequence>
42
- </xs:complexType>
43
- </xs:element>
44
- <xs:element minOccurs="0" name="Phones">
45
- <xs:complexType>
46
- <xs:sequence>
47
- <xs:element maxOccurs="unbounded" name="Phone">
48
- <xs:complexType>
49
- <xs:sequence>
50
- <xs:element name="PhoneType" type="xs:string" />
51
- <xs:element minOccurs="0" name="PhoneNumber" type="xs:unsignedInt" />
52
- <xs:element minOccurs="0" name="PhoneAreaCode" type="xs:unsignedByte" />
53
- <xs:element minOccurs="0" name="PhoneCountryCode" type="xs:unsignedByte" />
54
- </xs:sequence>
55
- </xs:complexType>
56
- </xs:element>
57
- </xs:sequence>
58
- </xs:complexType>
59
- </xs:element>
60
- </xs:sequence>
61
- </xs:complexType>
62
- </xs:element>
63
- <xs:element name="Date" type="xs:date" />
64
- <xs:element minOccurs="0" name="DueDate" type="xs:date" />
65
- <xs:element name="InvoiceNumber" type="xs:string" />
66
- <xs:element minOccurs="0" name="Reference" type="xs:string" />
67
- <xs:element minOccurs="0" name="LineAmountTypes" type="xs:string" />
68
- <xs:element minOccurs="0" name="SubTotal" type="xs:decimal" />
69
- <xs:element minOccurs="0" name="TotalTax" type="xs:decimal" />
70
- <xs:element minOccurs="0" name="Total" type="xs:decimal" />
71
- <xs:element name="LineItems">
72
- <xs:complexType>
73
- <xs:sequence>
74
- <xs:element maxOccurs="unbounded" name="LineItem">
75
- <xs:complexType>
76
- <xs:sequence>
77
- <xs:element name="Description" type="xs:string" />
78
- <xs:element minOccurs="0" name="Quantity" type="xs:decimal" />
79
- <xs:element name="UnitAmount" type="xs:decimal" />
80
- <xs:element minOccurs="0" name="TaxType" type="xs:string" />
81
- <xs:element minOccurs="0" name="TaxAmount" type="xs:decimal" />
82
- <xs:element minOccurs="0" name="LineAmount" type="xs:decimal" />
83
- <xs:element name="AccountCode" type="xs:string" />
84
- <xs:element minOccurs="0" name="Tracking">
85
- <xs:complexType>
86
- <xs:sequence>
87
- <xs:element name="TrackingCategory">
88
- <xs:complexType>
89
- <xs:sequence>
90
- <xs:element name="Name" type="xs:string" />
91
- <xs:element name="Option" type="xs:string" />
92
- </xs:sequence>
93
- </xs:complexType>
94
- </xs:element>
95
- </xs:sequence>
96
- </xs:complexType>
97
- </xs:element>
98
- </xs:sequence>
99
- </xs:complexType>
100
- </xs:element>
101
- </xs:sequence>
102
- </xs:complexType>
103
- </xs:element>
104
- </xs:sequence>
105
- </xs:complexType>
106
- </xs:element>
107
- </xs:schema>