|
1015 | 1015 | "type" : "string",
|
1016 | 1016 | "description" : "The Object Type",
|
1017 | 1017 | "enum" : [ "Unknown", "Accpay", "AccPayCredit", "AccPayPayment", "AccRec", "AccRecCredit", "AccRecPayment", "Adjustment", "ApCreditPayment", "ApOverPayment", "ApOverPaymentPayment", "ApOverPaymentSourcePayment", "ApPrepayment", "ApPrepaymentPayment", "ApPrepaymentSourcePayment", "ArCreditPayment", "ArOverPayment", "ArOverpaymentPayment", "ArOverpaymentSourcePayment", "ArPrepayment", "ArPrepaymentPayment", "ArPrepaymentSourcePayment", "CashPaid", "CashRec", "ExpPayment", "ManJournal", "PurchaseOrder", "Receipt", "Transfer", "Account", "Contact", "Business", "Employee", "Person", "User", "Org", "FixedAsset", "PayRun", "PriceListItem", "Bank", "Current", "Equity", "Expense", "Fixed", "Liability", "Prepayment", "Revenue", "Sales", "Overheads", "Depreciatn", "OtherIncome", "DirectCosts", "Currliab", "Termliab", "NonCurrent", "SalesQuote" ]
|
| 1018 | +}; |
| 1019 | + defs["UploadObject"] = { |
| 1020 | + "title" : "", |
| 1021 | + "required" : [ "body", "filename", "name" ], |
| 1022 | + "type" : "object", |
| 1023 | + "properties" : { |
| 1024 | + "body" : { |
| 1025 | + "type" : "string", |
| 1026 | + "format" : "byte" |
| 1027 | + }, |
| 1028 | + "name" : { |
| 1029 | + "type" : "string", |
| 1030 | + "description" : "exact name of the file you are uploading" |
| 1031 | + }, |
| 1032 | + "filename" : { |
| 1033 | + "type" : "string" |
| 1034 | + }, |
| 1035 | + "mimeType" : { |
| 1036 | + "type" : "string" |
| 1037 | + } |
| 1038 | + }, |
| 1039 | + "description" : "" |
1018 | 1040 | };
|
1019 | 1041 | defs["User"] = {
|
1020 | 1042 | "title" : "",
|
@@ -1234,11 +1256,10 @@ <h3>Usage and SDK Samples</h3>
|
1234 | 1256 |
|
1235 | 1257 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
1236 | 1258 | file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
1237 |
| -file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
1238 | 1259 | idempotency_key = 'KEY_VALUE'
|
1239 | 1260 |
|
1240 | 1261 | begin
|
1241 |
| - response = xero_client.accounting_api.create_file_association(xero_tenant_idfile_idassociation, idempotency_key) |
| 1262 | + response = xero_client.accounting_api.create_file_association(xero_tenant_id, file_id, association, idempotency_key) |
1242 | 1263 | return response
|
1243 | 1264 | rescue XeroRuby::ApiError => e
|
1244 | 1265 | puts "Exception when calling create_file_association: #{e}"
|
@@ -1407,7 +1428,7 @@ <h3>Usage and SDK Samples</h3>
|
1407 | 1428 | idempotency_key = 'KEY_VALUE'
|
1408 | 1429 |
|
1409 | 1430 | begin
|
1410 |
| - response = xero_client.accounting_api.create_folder(xero_tenant_idfolder, idempotency_key) |
| 1431 | + response = xero_client.accounting_api.create_folder(xero_tenant_id, folder, idempotency_key) |
1411 | 1432 | return response
|
1412 | 1433 | rescue XeroRuby::ApiError => e
|
1413 | 1434 | puts "Exception when calling create_folder: #{e}"
|
@@ -1541,10 +1562,9 @@ <h3>Usage and SDK Samples</h3>
|
1541 | 1562 |
|
1542 | 1563 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
1543 | 1564 | file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
1544 |
| -file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
1545 | 1565 |
|
1546 | 1566 | begin
|
1547 |
| - response = xero_client.accounting_api.delete_file(xero_tenant_idfile_id) |
| 1567 | + response = xero_client.accounting_api.delete_file(xero_tenant_id, file_id) |
1548 | 1568 | return response
|
1549 | 1569 | rescue XeroRuby::ApiError => e
|
1550 | 1570 | puts "Exception when calling delete_file: #{e}"
|
@@ -1655,12 +1675,10 @@ <h3>Usage and SDK Samples</h3>
|
1655 | 1675 |
|
1656 | 1676 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
1657 | 1677 | file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
1658 |
| -file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
1659 |
| -object_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
1660 | 1678 | object_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
1661 | 1679 |
|
1662 | 1680 | begin
|
1663 |
| - response = xero_client.accounting_api.delete_file_association(xero_tenant_idfile_idobject_id) |
| 1681 | + response = xero_client.accounting_api.delete_file_association(xero_tenant_id, file_id, object_id) |
1664 | 1682 | return response
|
1665 | 1683 | rescue XeroRuby::ApiError => e
|
1666 | 1684 | puts "Exception when calling delete_file_association: #{e}"
|
@@ -1797,10 +1815,9 @@ <h3>Usage and SDK Samples</h3>
|
1797 | 1815 |
|
1798 | 1816 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
1799 | 1817 | folder_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
1800 |
| -folder_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
1801 | 1818 |
|
1802 | 1819 | begin
|
1803 |
| - response = xero_client.accounting_api.delete_folder(xero_tenant_idfolder_id) |
| 1820 | + response = xero_client.accounting_api.delete_folder(xero_tenant_id, folder_id) |
1804 | 1821 | return response
|
1805 | 1822 | rescue XeroRuby::ApiError => e
|
1806 | 1823 | puts "Exception when calling delete_folder: #{e}"
|
@@ -1911,14 +1928,13 @@ <h3>Usage and SDK Samples</h3>
|
1911 | 1928 |
|
1912 | 1929 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
1913 | 1930 | object_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
1914 |
| -object_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
1915 | 1931 | pagesize = 50
|
1916 | 1932 | page = 2
|
1917 | 1933 | sort = 'Associations/{ObjectId}?sort=CreatedDateUtc'
|
1918 | 1934 | direction = 'Associations/{ObjectId}?sort=CreatedDateUtc&direction=DESC'
|
1919 | 1935 |
|
1920 | 1936 | begin
|
1921 |
| - response = xero_client.accounting_api.get_associations_by_object(xero_tenant_idobject_id, pagesizepagesortdirection) |
| 1937 | + response = xero_client.accounting_api.get_associations_by_object(xero_tenant_id, object_id, pagesize, page, sort, direction) |
1922 | 1938 | return response
|
1923 | 1939 | rescue XeroRuby::ApiError => e
|
1924 | 1940 | puts "Exception when calling get_associations_by_object: #{e}"
|
@@ -2120,10 +2136,10 @@ <h3>Usage and SDK Samples</h3>
|
2120 | 2136 | <pre class="prettyprint"><code class="language-ruby">xero_client.set_token_set(user.token_set)
|
2121 | 2137 |
|
2122 | 2138 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
2123 |
| -objectIds = |
| 2139 | +objectIds = [] |
2124 | 2140 |
|
2125 | 2141 | begin
|
2126 |
| - response = xero_client.accounting_api.get_associations_count(xero_tenant_idobjectIds) |
| 2142 | + response = xero_client.accounting_api.get_associations_count(xero_tenant_id, objectIds) |
2127 | 2143 | return response
|
2128 | 2144 | rescue XeroRuby::ApiError => e
|
2129 | 2145 | puts "Exception when calling get_associations_count: #{e}"
|
@@ -2239,10 +2255,9 @@ <h3>Usage and SDK Samples</h3>
|
2239 | 2255 |
|
2240 | 2256 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
2241 | 2257 | file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
2242 |
| -file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
2243 | 2258 |
|
2244 | 2259 | begin
|
2245 |
| - response = xero_client.accounting_api.get_file(xero_tenant_idfile_id) |
| 2260 | + response = xero_client.accounting_api.get_file(xero_tenant_id, file_id) |
2246 | 2261 | return response
|
2247 | 2262 | rescue XeroRuby::ApiError => e
|
2248 | 2263 | puts "Exception when calling get_file: #{e}"
|
@@ -2358,10 +2373,9 @@ <h3>Usage and SDK Samples</h3>
|
2358 | 2373 |
|
2359 | 2374 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
2360 | 2375 | file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
2361 |
| -file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
2362 | 2376 |
|
2363 | 2377 | begin
|
2364 |
| - response = xero_client.accounting_api.get_file_associations(xero_tenant_idfile_id) |
| 2378 | + response = xero_client.accounting_api.get_file_associations(xero_tenant_id, file_id) |
2365 | 2379 | return response
|
2366 | 2380 | rescue XeroRuby::ApiError => e
|
2367 | 2381 | puts "Exception when calling get_file_associations: #{e}"
|
@@ -2477,10 +2491,9 @@ <h3>Usage and SDK Samples</h3>
|
2477 | 2491 |
|
2478 | 2492 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
2479 | 2493 | file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
2480 |
| -file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
2481 | 2494 |
|
2482 | 2495 | begin
|
2483 |
| - response = xero_client.accounting_api.get_file_content(xero_tenant_idfile_id) |
| 2496 | + response = xero_client.accounting_api.get_file_content(xero_tenant_id, file_id) |
2484 | 2497 | return response
|
2485 | 2498 | rescue XeroRuby::ApiError => e
|
2486 | 2499 | puts "Exception when calling get_file_content: #{e}"
|
@@ -2600,7 +2613,7 @@ <h3>Usage and SDK Samples</h3>
|
2600 | 2613 | sort = 'CreatedDateUTC DESC'
|
2601 | 2614 |
|
2602 | 2615 | begin
|
2603 |
| - response = xero_client.accounting_api.get_files(xero_tenant_id, pagesizepagesort) |
| 2616 | + response = xero_client.accounting_api.get_files(xero_tenant_id, pagesize, page, sort) |
2604 | 2617 | return response
|
2605 | 2618 | rescue XeroRuby::ApiError => e
|
2606 | 2619 | puts "Exception when calling get_files: #{e}"
|
@@ -2750,10 +2763,9 @@ <h3>Usage and SDK Samples</h3>
|
2750 | 2763 |
|
2751 | 2764 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
2752 | 2765 | folder_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
2753 |
| -folder_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
2754 | 2766 |
|
2755 | 2767 | begin
|
2756 |
| - response = xero_client.accounting_api.get_folder(xero_tenant_idfolder_id) |
| 2768 | + response = xero_client.accounting_api.get_folder(xero_tenant_id, folder_id) |
2757 | 2769 | return response
|
2758 | 2770 | rescue XeroRuby::ApiError => e
|
2759 | 2771 | puts "Exception when calling get_folder: #{e}"
|
@@ -3065,11 +3077,10 @@ <h3>Usage and SDK Samples</h3>
|
3065 | 3077 |
|
3066 | 3078 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
3067 | 3079 | file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
3068 |
| -file_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
3069 | 3080 | idempotency_key = 'KEY_VALUE'
|
3070 | 3081 |
|
3071 | 3082 | begin
|
3072 |
| - response = xero_client.accounting_api.update_file(xero_tenant_idfile_idfileObject, idempotency_key) |
| 3083 | + response = xero_client.accounting_api.update_file(xero_tenant_id, file_id, fileObject, idempotency_key) |
3073 | 3084 | return response
|
3074 | 3085 | rescue XeroRuby::ApiError => e
|
3075 | 3086 | puts "Exception when calling update_file: #{e}"
|
@@ -3236,11 +3247,10 @@ <h3>Usage and SDK Samples</h3>
|
3236 | 3247 |
|
3237 | 3248 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
3238 | 3249 | folder_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
3239 |
| -folder_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
3240 | 3250 | idempotency_key = 'KEY_VALUE'
|
3241 | 3251 |
|
3242 | 3252 | begin
|
3243 |
| - response = xero_client.accounting_api.update_folder(xero_tenant_idfolder_idfolder, idempotency_key) |
| 3253 | + response = xero_client.accounting_api.update_folder(xero_tenant_id, folder_id, folder, idempotency_key) |
3244 | 3254 | return response
|
3245 | 3255 | rescue XeroRuby::ApiError => e
|
3246 | 3256 | puts "Exception when calling update_folder: #{e}"
|
@@ -3413,7 +3423,7 @@ <h3>Usage and SDK Samples</h3>
|
3413 | 3423 | mimeType = 'mimeType_example'
|
3414 | 3424 |
|
3415 | 3425 | begin
|
3416 |
| - response = xero_client.accounting_api.upload_file(xero_tenant_idbodynamefilename, idempotency_keymimeType) |
| 3426 | + response = xero_client.accounting_api.upload_file(xero_tenant_id, body, name, filename, idempotency_key, mimeType) |
3417 | 3427 | return response
|
3418 | 3428 | rescue XeroRuby::ApiError => e
|
3419 | 3429 | puts "Exception when calling upload_file: #{e}"
|
@@ -3610,15 +3620,14 @@ <h3>Usage and SDK Samples</h3>
|
3610 | 3620 |
|
3611 | 3621 | xero_tenant_id = 'YOUR_XERO_TENANT_ID'
|
3612 | 3622 | folder_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
|
3613 |
| -folder_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' |
3614 | 3623 | body = BYTE_ARRAY_DATA_HERE
|
3615 | 3624 | name = 'name_example'
|
3616 | 3625 | filename = 'filename_example'
|
3617 | 3626 | idempotency_key = 'KEY_VALUE'
|
3618 | 3627 | mimeType = 'mimeType_example'
|
3619 | 3628 |
|
3620 | 3629 | begin
|
3621 |
| - response = xero_client.accounting_api.upload_file_to_folder(xero_tenant_idfolder_idbodynamefilename, idempotency_keymimeType) |
| 3630 | + response = xero_client.accounting_api.upload_file_to_folder(xero_tenant_id, folder_id, body, name, filename, idempotency_key, mimeType) |
3622 | 3631 | return response
|
3623 | 3632 | rescue XeroRuby::ApiError => e
|
3624 | 3633 | puts "Exception when calling upload_file_to_folder: #{e}"
|
|
0 commit comments